Color by status seems to have been broken all of a sudden.
Surarn opened this issue · 3 comments
Coloring healthbars depending on debuff type started messing up today(Perhaps yesterday), the moment i enter dungeons it starts to color what i think is randoms units.
It also seems to be tracking Magic Buffs as Debuffs.
If i have Exhaustion (Bloodlust debuff) and then put Regrowth on myself it changes color on my frame. So it seems like having a debuff + magic buff fills the criteria for Magic Debuff. If i add Exhaustion to the Filtered Debuffs list it doesnt trigger with the same combo.
Using Grid2-2.7.6-beta
My Health-Multibar layout is https://i.imgur.com/LMjvRMB.png
Retail.
Dumping Exhaustion returns 600 as dispelType?
https://i.imgur.com/c9V4mYS.png
while dumping Regrowth returns Magic
https://i.imgur.com/QtbaFiS.png
https://i.imgur.com/SSXGuGa.png
I guess index 4 is skipped, but i dont think that matters when i think this is how grid2 fetches the information that is then used in coloring?
name, textures[j], counts[j], debuffType, durations[j], expirations[j], caster, _, _, sid, _, boss = UnitAura(unit, i, 'HARMFUL')
Okey, i seem to have tracked down the problem.
On row 66 in StatusAuras.lua there is
local s = DebuffTypes[typ or 'Typeless']
on row 39 in the same file we fetch the information for retail client, however we do not set typ, its fine because row 66 should handle it but it seems like the variable typ is within the scope of both helpful and harmful aura checks and the helpful ones happens first. So typ have a value from the previous aura when row 66 assumes it doesnt.
Simply changing row 39 where we fetch the information from
if a then fill, nam, sid, cas = true, a.name, a.spellId, a.sourceUnit; return true; end
to
if a then fill, nam, sid, cas, typ = true, a.name, a.spellId, a.sourceUnit, a.dispelName or 'Typeless'; return true; end
solves it.
UnitAura() is not used anymore in Grid2 retail version. Blizzard for some reason decided to use a new (and more slow) API, and now i have to use some convoluted code to to mantain compatibility with different wow clients.
I introduced a bug while refactoring the code to use the new API in the previous beta version..
Update to version 2.7.7-beta.