Thread: MoP Debuffs
View Single Post
10-09-12, 02:30 AM   #9
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Normally you are fine. Only two problems can appear:

The spellname of the ability differs from the spellname of the debuff. That way tracking the spellid of the ability would result in a different spellname and thus in an insufficient UnitAura() match.

The other problem can occur if different auras are applied of the same name but different effects. This can only circumvented by testing the spellid return value of UnitAura() against the spellid used for GetSpellInfo().

There is one problem with auras of the same name though. At least if checking UnitAura with spellname+rank and not via index. If two auras of the same name are applied: which one will be returned?

Btw this is the buff list SacriRaidBuffed is using:

Food:
Lua Code:
  1. {104267, }
Flask:
Lua Code:
  1. {105693, 105689, 105691, 105694, 105696, }
Buffs:
Lua Code:
  1. stat        =   { 90363, 20217, 115921, 1126 },
  2.     stamina     =   { 469, 6307, 103127, 90364, 21562},
  3.     atkpwr      =   { 19506, 57330, 6673 },
  4.     atkspeed    =   { 55610, 113742, 30809, 128432, 128433 },
  5.     spllpwr     =   { 77747, 109773, 126309, 61316, 1459 },
  6.     spllhaste   =   { 24907, 15473, 51470, 49868 },
  7.     crit        =   { 17007, 1459, 61316, 116781, 97229, 24604, 90309, 126373, 126309 },
  8.     mastery     =   { 116956, 19740, 93435, 128997 },

Btw...we now got: http://www.wowpedia.org/API_Frame_RegisterUnitEvent

Which is pretty awesome for this kind of buff/debuff tracking.

Code:
frame:RegisterUnitEvent("UNIT_AURA", "unitId")
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 10-09-12 at 03:24 AM.