From 63c7e9987bb029a37aa6630a0ed9df560f3b510e Mon Sep 17 00:00:00 2001 From: Kevin Krol Date: Thu, 20 Jun 2024 00:02:46 +0200 Subject: [PATCH] Fix various more errors --- Clicked/Core/BindingProcessor.lua | 2 +- Clicked/Core/Utils.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Clicked/Core/BindingProcessor.lua b/Clicked/Core/BindingProcessor.lua index 81a03e21..71e55c0a 100644 --- a/Clicked/Core/BindingProcessor.lua +++ b/Clicked/Core/BindingProcessor.lua @@ -873,7 +873,7 @@ function Addon:UpdateTalentCacheAndReloadBindings(delay, ...) if isValid then local entryId = nodeInfo.activeEntry ~= nil and nodeInfo.activeEntry.entryID or 0 local entryInfo = entryId ~= nil and C_Traits.GetEntryInfo(configId, entryId) or nil - local definitionInfo = entryInfo ~= nil and C_Traits.GetDefinitionInfo(entryInfo.definitionID) or nil + local definitionInfo = entryInfo ~= nil and entryInfo.definitionID ~= nil and C_Traits.GetDefinitionInfo(entryInfo.definitionID) or nil if definitionInfo ~= nil then local name = StripColorCodes(TalentUtil.GetTalentNameFromInfo(definitionInfo)) diff --git a/Clicked/Core/Utils.lua b/Clicked/Core/Utils.lua index 02ce388b..318075dc 100644 --- a/Clicked/Core/Utils.lua +++ b/Clicked/Core/Utils.lua @@ -17,6 +17,7 @@ local DisableAddOn = C_AddOns.DisableAddOn or DisableAddOn -- Deprecated in 10.2.0 local IsEquippedItem = C_Item.IsEquippedItem or IsEquippedItem -- Deprecated in 10.2.6 local GetItemInfo = C_Item.GetItemInfo or GetItemInfo -- Deprecated in 10.2.6 +local GetSpellSubtext = C_Spell.GetSpellSubtext or GetSpellSubtext -- Deprecated in 11.0.0 local AceGUI = LibStub("AceGUI-3.0") @@ -413,9 +414,8 @@ function Addon:GetBindingValue(binding) assert(type(binding) == "table", "bad argument #1, expected table but got " .. type(binding)) if binding.type == Addon.BindingTypes.SPELL then - local spell = binding.action.spellValue - local spell = self:GetSpellInfo(value, not binding.action.spellMaxRank) - return spell ~= nil and spell.name ~= nil and spell.name or value + local spell = self:GetSpellInfo(binding.action.spellValue, not binding.action.spellMaxRank) + return spell ~= nil and spell.name ~= nil and spell.name or binding.action.spellValue end if binding.type == Addon.BindingTypes.ITEM then