From bfe4947437a8315d54cf10b157afd2e9a182890a Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Thu, 2 Sep 2010 13:40:35 +0000 Subject: [PATCH] Initial fixed for Cataclysm --- Clique.lua | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/Clique.lua b/Clique.lua index 85f3e8f..303198a 100644 --- a/Clique.lua +++ b/Clique.lua @@ -154,11 +154,11 @@ function Clique:EnableFrames() end function Clique:SpellBookButtonPressed(frame, button) - local id = SpellBook_GetSpellID(this:GetParent():GetID()); - local texture = GetSpellTexture(id, SpellBookFrame.bookType) - local name, rank = GetSpellName(id, SpellBookFrame.bookType) + local slot = SpellBook_GetSpellBookSlot(frame:GetParent()); + local name, subtype = GetSpellBookItemName(slot, SpellBookFrame.bookType) + local texture = GetSpellBookItemTexture(slot, SpellBookFrame.bookType) - if rank == L.RACIAL_PASSIVE or rank == L.PASSIVE then + if subtype == L.RACIAL_PASSIVE or subtype == L.PASSIVE then StaticPopup_Show("CLIQUE_PASSIVE_SKILL") return end @@ -173,19 +173,13 @@ function Clique:SpellBookButtonPressed(frame, button) button = self:GetButtonNumber(button) end - -- Clear the rank if "Show all spell ranks" is selected - if not GetCVarBool("ShowAllSpellRanks") then - rank = nil - end - -- Build the structure local t = { ["button"] = button, ["modifier"] = self:GetModifierText(), - ["texture"] = GetSpellTexture(id, SpellBookFrame.bookType), - ["type"] = type, + ["texture"] = texture, + ["type"] = type, ["arg1"] = name, - ["arg2"] = rank, } local key = t.modifier .. t.button -- 1.7.9.5