diff --git a/DiesalGUI-2.0/Objects/Button.lua b/DiesalGUI-2.0/Objects/Button.lua index cbf391e..44a9d16 100644 --- a/DiesalGUI-2.0/Objects/Button.lua +++ b/DiesalGUI-2.0/Objects/Button.lua @@ -11,7 +11,6 @@ local min, max = math.min, math.max -- ~~| WoW Upvalues |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ local CreateFrame, UIParent, GetCursorPosition = CreateFrame, UIParent, GetCursorPosition local GetScreenWidth, GetScreenHeight = GetScreenWidth, GetScreenHeight -local GetSpellInfo, GetBonusBarOffset, GetDodgeChance = GetSpellInfo, GetBonusBarOffset, GetDodgeChance local GetCombatRatingBonus = GetCombatRatingBonus -- ~~| Button |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ local Type = "DiesalButton" diff --git a/DiesalGUI-2.0/Objects/CheckBox.lua b/DiesalGUI-2.0/Objects/CheckBox.lua index e2d2bbf..e1c0faf 100644 --- a/DiesalGUI-2.0/Objects/CheckBox.lua +++ b/DiesalGUI-2.0/Objects/CheckBox.lua @@ -14,7 +14,6 @@ local min, max = math.min, math.max -- ~~| WoW Upvalues |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ local CreateFrame, UIParent, GetCursorPosition = CreateFrame, UIParent, GetCursorPosition local GetScreenWidth, GetScreenHeight = GetScreenWidth, GetScreenHeight -local GetSpellInfo, GetBonusBarOffset, GetDodgeChance = GetSpellInfo, GetBonusBarOffset, GetDodgeChance local GetCombatRatingBonus = GetCombatRatingBonus -- ~~| Button |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ local Type = "DiesalCheckBox" diff --git a/DiesalTools-2.0/DiesalTools-2.0.lua b/DiesalTools-2.0/DiesalTools-2.0.lua index 4742181..3278501 100644 --- a/DiesalTools-2.0/DiesalTools-2.0.lua +++ b/DiesalTools-2.0/DiesalTools-2.0.lua @@ -659,8 +659,11 @@ function DiesalTools.AttachSpellIcon(spell, text, position) text = text or spell:GetName() icon = spell:GetIcon() elseif type(spell) == "number" then - text = text or GetSpellInfo(spell) - icon = select(3, GetSpellInfo(spell)) + local spellInfo = C_Spell.GetSpellInfo(spell) + if spellInfo then + text = text or spellInfo.name + icon = spellInfo.iconID + end end return string.format("%s %s", position == "start" and DiesalTools.CreateTextureString(icon) or text, position == "end" and DiesalTools.CreateTextureString(icon) or text)