From 8ff7cf608b83438e06c409b50c594105e7022755 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Fri, 22 Oct 2010 10:11:02 +0100 Subject: [PATCH] Bind spells by spell id, see if this resolves the Blizzard issues --- BindConfig.lua | 3 ++- Clique.lua | 4 ++++ Utils.lua | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/BindConfig.lua b/BindConfig.lua index 227a3fb..2212f3f 100755 --- a/BindConfig.lua +++ b/BindConfig.lua @@ -173,6 +173,7 @@ function CliqueConfig:Spellbook_OnBinding(button, key) end local slot = SpellBook_GetSpellBookSlot(button:GetParent()); + local stype, id = GetSpellBookItemInfo(slot, SpellBookFrame.bookType) local name, subtype = GetSpellBookItemName(slot, SpellBookFrame.bookType) local texture = GetSpellBookItemTexture(slot, SpellBookFrame.bookType) @@ -184,7 +185,7 @@ function CliqueConfig:Spellbook_OnBinding(button, key) local succ, err = addon:AddBinding{ key = key, type = "spell", - spell = name, + spell = id, icon = texture } diff --git a/Clique.lua b/Clique.lua index 4a8df6f..33faac4 100755 --- a/Clique.lua +++ b/Clique.lua @@ -476,6 +476,10 @@ function addon:AddBinding(entry) entry.sets = {default = true} end + if entry.type == "spell" and tonumber(entry.spell) then + entry.spellName = GetSpellInfo(entry.spell) + end + table.insert(self.bindings, entry) self:UpdateAttributes() return true diff --git a/Utils.lua b/Utils.lua index 8d9dc96..e3ea6b4 100644 --- a/Utils.lua +++ b/Utils.lua @@ -154,7 +154,11 @@ function addon:GetBindingActionText(btype, binding) elseif btype == "target" then return L["Target clicked unit"] elseif btype == "spell" then - return L["Cast %s"]:format(tostring(binding.spell)) + local name = binding.spell + if tonumber(binding.spell) then + name = GetSpellInfo(binding.spell) or "Unknown" + end + return L["Cast %s"]:format(tostring(name)) elseif btype == "macro" and type(binding) == "table" then return L["Run macro '%s'"]:format(tostring(binding.macrotext)) elseif btype == "macro" then -- 1.7.9.5