Quantcast

Revert "Bind spells by spell id, see if this resolves the Blizzard issues"

James Whitehead II [10-23-10 - 18:32]
Revert "Bind spells by spell id, see if this resolves the Blizzard issues"

This reverts commit 8ff7cf608b83438e06c409b50c594105e7022755.
Filename
BindConfig.lua
Clique.lua
Utils.lua
diff --git a/BindConfig.lua b/BindConfig.lua
index 2212f3f..227a3fb 100755
--- a/BindConfig.lua
+++ b/BindConfig.lua
@@ -173,7 +173,6 @@ 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)

@@ -185,7 +184,7 @@ function CliqueConfig:Spellbook_OnBinding(button, key)
     local succ, err = addon:AddBinding{
         key = key,
         type = "spell",
-        spell = id,
+        spell = name,
         icon = texture
     }

diff --git a/Clique.lua b/Clique.lua
index a17e0a7..2dd68c0 100755
--- a/Clique.lua
+++ b/Clique.lua
@@ -494,10 +494,6 @@ 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 2ae8abf..706662a 100644
--- a/Utils.lua
+++ b/Utils.lua
@@ -154,11 +154,7 @@ function addon:GetBindingActionText(btype, binding)
     elseif btype == "target" then
         return L["Target clicked unit"]
     elseif btype == "spell" then
-        local name = binding.spell
-        if tonumber(binding.spell) then
-            name = GetSpellInfo(binding.spell) or "Unknown"
-        end
-        return L["Cast %s"]:format(tostring(name))
+        return L["Cast %s"]:format(tostring(binding.spell))
     elseif btype == "macro" and type(binding) == "table" then
         return L["Run macro '%s'"]:format(tostring(binding.macrotext))
     elseif btype == "macro" then