From 3f7be982b0fc6d9cc71328f2e1b6486354a2abaf Mon Sep 17 00:00:00 2001 From: Flamanis Date: Fri, 13 Sep 2024 08:52:45 -0500 Subject: [PATCH 1/2] Change usage and check for GetSpellInfo and UnitAura --- boot.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/boot.lua b/boot.lua index d094e9b95..d7cd7b6f3 100644 --- a/boot.lua +++ b/boot.lua @@ -222,16 +222,18 @@ 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 @@ -239,7 +241,7 @@ 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 From 675e56dea17a912ddb5c4522218bf853bbb64e33 Mon Sep 17 00:00:00 2001 From: Flamanis Date: Fri, 13 Sep 2024 08:53:37 -0500 Subject: [PATCH 2/2] Change order for unitbuff and unitdebuff --- boot.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot.lua b/boot.lua index d7cd7b6f3..c65eb67b6 100644 --- a/boot.lua +++ b/boot.lua @@ -216,10 +216,10 @@ local GetSpellInfo = C_Spell and C_Spell.GetSpellInfo or GetSpellInfo Details222.GetSpellInfo = GetSpellInfo - local UnitBuff = UnitBuff or C_UnitAuras.GetBuffDataByIndex + local UnitBuff = C_UnitAuras and C_UnitAuras.GetBuffDataByIndex or UnitBuff Details222.UnitBuff = UnitBuff - local UnitDebuff = UnitDebuff or C_UnitAuras.GetDebuffDataByIndex + local UnitDebuff = C_UnitAuras and C_UnitAuras.GetDebuffDataByIndex or UnitDebuff Details222.UnitDebuff = UnitDebuff if (C_Spell and C_Spell.GetSpellInfo) then