Not sure if this is an appropriate programming question or not; but here goes....
I've written a very simple add-on that displays text/plays a sound when certain spells become usable (Overpower / Revenge).
But I've been unable to find the appropriate event to listen for to check this. My hack-ish approach is to simply check the state of the spells I care about whenever any event is passed to me.
Is there a specific event that I can be using? I went through the docs on WoWWiki and didn't seem to find anything relevant.
There used to be an addon that kept you spelled up, I forgot its name... it was GREAT! For a while I had more rage than I knew what to do with. But Blizzard decided that that was taking too much action out of player hands, so they stopped generating events for this kinda thing. Specifically, since about 2 years ago their policy is that no player actions (moving, casting, etc.) can be initiated by game events.
Nowadays, addons hook into things like the movement keys and check the status of spellups whenever the player moves around. It's klutzy, but comes reasonably close to doing what you want.
Still, you're not looking to initiate player action, just diddle with the GUI. That should still be possible. Lemme take a look...
One of the best resources for WOW addon programming is the WoW Wiki, from which I've just quoted a link to the buff event list. It looks like the UNIT_AURA
event might be the one you're looking for, but go see for yourself!
I'd recommend using COMBAT_LOG_EVENT_UNFILTERED
.I use it in an addon I wrote to notify me of certain spell procs and it works great.
I usually use wowprogramming.com for API documentation but in this case wowwiki does have a better description of the event and how to use it.
With the recent 3.3 patch this event isn't firing correctly for certain spell procs so just keep that in mind if it doesn't seem to be working for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With