So apparently blizz changed how GetUnitBuff, GetUnitDebuff, and GetUnitAuras work, and it broke one of my favourite weak auras.
This is how part of it looked before
Code:
function()
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId
= UnitDebuff("target", "Moonfire", nil, "PLAYER")
if duration ~= nil then
return true
else return false
end
end
WeakAuras posted on twitter:
Code:
For our custom coders: Blizzard changed UnitAura/Buff/Debuff in 8.0 to no longer work off names, we added a few helper functions to ease the pain:
Usage: WA_GetUnitAura("player", spellName | spellID, filter)
There are:
WA_GetUnitAura
WA_GetUnitBuff
WA_GetUnitDebuff
but I'm not sure how to go about fixing mine, I tried all kind of combinations changing the "UnitDebuff("target", "Moonfire", nil, "PLAYER")" to "WA_GetUnitDebuff("target" Moonfire, player)" and can't seem to get it working.
Any tips?