View Single Post
01-09-10, 09:00 PM   #2
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
You are pretty close:

"UNIT_AURA_PLAYER_RIGHTEOUS FURY" is not an event. "UNIT_AURA" is, and that's all you should put there.

Therefore, in your OnEvent function, you need to check for...
1. Is this event firing for the player
2. If so, does the player currently have the aura.
3. If so, did the player not have it the last time I checked -- to prevent the addon from spamming every time you gain/loose an aura while that one is active.

The way to do #1 is to check the event's arg1, which is the unit the event fired for e.g.
Code:
if ... == "player" then
The way to do #2 is with UnitAura e.g.
Code:
UnitAura("player", "Righteous Fury")
The way to do #3 is to save the result of each check in a variable, and check it before announcing.
  Reply With Quote