Thread Tools Display Modes
08-17-15, 06:15 PM   #1
Haithomy
A Defias Bandit
Join Date: Aug 2015
Posts: 3
Hostile Attack

I am trying to show my own Target Frame using the function below

Code:
function TargetContainer_OnEvent(self, event, ...)
  if (event == "PLAYER_REGEN_DISABLED") then
    TargetContainer:Show();
  end -- Hostile Attack

  if (event == "PLAYER_TARGET_CHANGED") then
    if (UnitExists("target")) then
      ModalFrame:SetUnit("target");
      TargetContainer:Show(); --An action was blocked in combat because of taint from NewAge - <unnamed>:Show()
    else
      TargetContainer:Hide(); --An action was blocked in combat because of taint from NewAge - <unnamed>:Hide()
    end
  end
end
as you can see the event "PLAYER_TARGET_CHANGED" is show my frame when I click on target and hide it when I click on game UI.

with event "PLAYER_REGEN_DISABLED" I am try to show the fame when my player get hostile attack but the problem is it show my frame
whithout target values because the target is not exists yet.

if anyone have a solution for that problem, thanks

note: This addon is for Wow 3.3.5a only
 
08-17-15, 06:31 PM   #2
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Originally Posted by Haithomy View Post
note: This addon is for Wow 3.3.5a only
There was no need to mention that really

 
08-17-15, 07:12 PM   #3
Haithomy
A Defias Bandit
Join Date: Aug 2015
Posts: 3
Just in case version 3.3.5 is difference from overs versions
 
08-17-15, 07:31 PM   #4
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
They're vastly different, and also against the site rules.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
 
08-17-15, 08:46 PM   #5
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
As Torhal said, discussion of Private Servers, in any manner other than theoretical, is completely against our rules. We are an Official Fan Site. We follow Blizzard's rules, on top of our own rules.

Threads requesting assistance with Private Servers get locked. Repeated postings get you banned.
__________________
“Do what you feel in your heart to be right — for you’ll be criticized anyway.” ~ Eleanor Roosevelt
~~~~~~~~~~~~~~~~~~~
Co-Founder & Admin: MMOUI
FaceBook Profile, Page, Group
Avatar Image by RaffaeleMarinetti
 
08-17-15, 08:49 PM   #6
Haithomy
A Defias Bandit
Join Date: Aug 2015
Posts: 3
sorry for that
 

WoWInterface » Developer Discussions » Lua/XML Help » Hostile Attack

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off