Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-10-10, 02:03 PM   #19
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,936
*hint* .. you want to test for the aura/buff when the event occurs

If we walk through your code it may help you.
1. Addon is loaded and creates a frame to handle events.
2. Addon registers the UNIT_AURA event to watch for
4. Addon checks to see if Righteous Fury buff is active on player
5. hasrf variable defined but not initialised and thus treated as false
6 to 13 define event handler to handle events being watched ( but not executed at this time )
14. We can now activate the event watching by telling the frame what function to run when handling its watched events.

The addon will now only use the event handler function when UNIT_AURA is triggered. Thus at present your test for Righteous Fury happens once at the beginning but is never tested again.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » First Addon - need help


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