Added Details222.UnitBuff and Details222.UnitDebuff
This commit is contained in:
parent
1d3ae76d84
commit
463fdf65fd
1 changed files with 24 additions and 0 deletions
24
boot.lua
24
boot.lua
|
|
@ -174,6 +174,13 @@
|
|||
|
||||
local GetSpellInfo = GetSpellInfo or C_Spell.GetSpellInfo
|
||||
Details222.GetSpellInfo = GetSpellInfo
|
||||
|
||||
local UnitBuff = UnitBuff or C_UnitAuras.GetBuffDataByIndex
|
||||
Details222.UnitBuff = UnitBuff
|
||||
|
||||
local UnitDebuff = UnitDebuff or C_UnitAuras.GetDebuffDataByIndex
|
||||
Details222.UnitDebuff = UnitDebuff
|
||||
|
||||
if (DetailsFramework.IsWarWow()) then
|
||||
Details222.GetSpellInfo = function(...)
|
||||
local result = GetSpellInfo(...)
|
||||
|
|
@ -181,8 +188,25 @@
|
|||
return result.name, 1, result.iconID
|
||||
end
|
||||
end
|
||||
|
||||
Details222.UnitBuff = function(unitToken, index, filter)
|
||||
local auraData = C_UnitAuras.GetBuffDataByIndex(unitToken, index, filter)
|
||||
if (not auraData) then
|
||||
return nil
|
||||
end
|
||||
return AuraUtil.UnpackAuraData(auraData)
|
||||
end
|
||||
|
||||
Details222.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
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--initialization stuff
|
||||
local _
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue