Skip to content

Commit

Permalink
Change usage and check for GetSpellInfo and UnitAura
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamanis committed Sep 13, 2024
1 parent 05a5bb5 commit 3f7be98
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -222,24 +222,26 @@
local UnitDebuff = UnitDebuff or C_UnitAuras.GetDebuffDataByIndex
Details222.UnitDebuff = UnitDebuff

if (DetailsFramework.IsWarWow()) then
if (C_Spell and C_Spell.GetSpellInfo) then
Details222.GetSpellInfo = function(...)
local result = GetSpellInfo(...)
if result then
return result.name, 1, result.iconID
end
end

end

if (C_UnitAuras and C_UnitAuras.GetAuraDataByIndex) then
Details222.UnitBuff = function(unitToken, index, filter)
local auraData = C_UnitAuras.GetBuffDataByIndex(unitToken, index, filter)
local auraData = UnitBuff(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)
local auraData = UnitDebuff(unitToken, index, filter)
if (not auraData) then
return nil
end
Expand Down

0 comments on commit 3f7be98

Please sign in to comment.