Fix up uses of UnitBuff and UnitDebuff for 11.0.2

This commit is contained in:
Parnic
2024-07-21 14:00:48 -05:00
parent f15dda769d
commit 40efe6a551
4 changed files with 48 additions and 0 deletions

View File

@ -42,6 +42,18 @@ if C_Spell and C_Spell.GetSpellName then
GetSpellName = C_Spell.GetSpellName
end
local UnitDebuff = UnitDebuff
if not UnitDebuff and C_UnitAuras and AuraUtil then
UnitDebuff = function(unitToken, index, filter)
local auraData = C_UnitAuras.GetDebuffDataByIndex(unitToken, index, filter)
if not auraData then
return nil
end
return AuraUtil.UnpackAuraData(auraData)
end
end
StaggerBar.prototype.StaggerDuration = 0
StaggerBar.prototype.StaggerEndTime = 0