View Single Post
08-12-12, 07:29 AM   #211
Meorawr
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 193
UnitAura seems to have changed but I couldn't find this mentioned anywhere. More importantly it's behaving in a really horrible way.

On live there's 13 return values (name through to isBossDebuff) plus an additional 3 return values for tooltip information.

In the latest build there's a minimum of 14 return values, the last one being a boolean. You'd expect the 3 tooltip values to then be values 15-17, however here's how it works for the following two buffs:

Legacy of the White Tiger:

14 return values, last one is a boolean. Values 15-17 aren't returned (so they're nil, effectively).

Life Cocoon:

17 return values, however 14-16 are the tooltip values, whereas this mystery boolean is #17.

Basically it's a major pain now because whereas we could (hopefully) have assumed #14-16 to be nil/number values, we now have to check if #17 is not nil in order to determine whether or not tooltip values exist.

Of course I could be completely missing something here so do correct me if I'm wrong

/dump's of the returns:
Code:
Dump: value=UnitAura("player", 1, "HELPFUL")
[1]="Legacy of the White Tiger",
[2]="",
[3]="Interface\\Icons\\ability_monk_prideofthetiger",
[4]=0,
[5]="Magic",
[6]=3600,
[7]=7377.351,
[8]="player",
[10]=1,
[11]=116781,
[12]=true,
[14]=true -- Mystery boolean, ooOOooOOoooOO!

Dump: value=UnitAura("player", 1, "HELPFUL")
[1]="Life Cocoon",
[2]="",
[3]="Interface\\Icons\\ability_monk_chicocoon",
[4]=0,
[5]="Magic",
[6]=12,
[7]=3926.258,
[8]="player",
[11]=116849,
[12]=true,
[14]=36848, -- Tooltip value #1 (absorb damage)
[15]=50, -- Tooltip value #2 (periodic healing bonus %)
[16]=0, -- Unused value #3
[17]=true, -- Mystery boolean, ooOOooOOoooOO!
In short the stack needs 0's or nil's at 14-16 for the first case

Last edited by Meorawr : 08-12-12 at 08:02 AM.