mirror of
https://github.com/parnic/LibDogTag-Unit-3.0.git
synced 2025-06-16 13:40:13 -05:00
Add UnitAura function shim
Fixes error with Aura-based tags such as NumAura, RaidStacks, Druid forms, and any tag checking for the existence of specific buffs/debuffs. Fixes #15
This commit is contained in:
@ -8,6 +8,17 @@ end
|
||||
local select, pairs, rawget, GetTime, setmetatable = select, pairs, rawget, GetTime, setmetatable
|
||||
local UnitAura, UnitIsFriend, UnitClass, UnitPowerType =
|
||||
UnitAura, UnitIsFriend, UnitClass, UnitPowerType
|
||||
|
||||
if not UnitAura and C_UnitAuras and C_UnitAuras.GetAuraDataByIndex then
|
||||
UnitAura = function(unitToken, index, filter)
|
||||
local auraData = C_UnitAuras.GetAuraDataByIndex(unitToken, index, filter)
|
||||
if not auraData then
|
||||
return nil
|
||||
end
|
||||
|
||||
return AuraUtil.UnpackAuraData(auraData)
|
||||
end
|
||||
end
|
||||
|
||||
-- GetSpellInfo removed in WoW 11.0
|
||||
local GetSpellName = C_Spell and C_Spell.GetSpellName or GetSpellInfo
|
||||
|
Reference in New Issue
Block a user