From 656dd5a680006ad25def2de084bc5a303eb85545 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Fri, 17 Apr 2009 07:48:50 +0000 Subject: [PATCH] Added preliminary support for Blizzard's arena frames --- Clique.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Clique.lua b/Clique.lua index 6389bfd..ec3b9bc 100644 --- a/Clique.lua +++ b/Clique.lua @@ -70,6 +70,7 @@ function Clique:Enable() self:RegisterEvent("LEARNED_SPELL_IN_TAB") self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") + self:RegisterEvent("ADDON_LOADED") -- Change to correct profile based on talent spec if self.db.char.switchSpec then @@ -120,6 +121,11 @@ function Clique:Enable() -- Place the Clique tab self:LEARNED_SPELL_IN_TAB() + + -- Register the arena frames, if they're already loaded + if IsAddOnLoaded("Blizzard_ArenaUI") then + self:EnableArenaFrames() + end end function Clique:EnableFrames() @@ -734,3 +740,23 @@ function Clique:ACTIVE_TALENT_GROUP_CHANGED(event, newGroup, prevGroup) end end +function Clique:EnableArenaFrames() + local arenaFrames = { + ArenaEnemyFrame1, + ArenaEnemyFrame2, + ArenaEnemyFrame3, + ArenaEnemyFrame4, + ArenaEnemyFrame5, + } + + for idx,frame in ipairs(arenaFrames) do + rawset(self.ccframes, frame, true) + end +end + + +function Clique:ADDON_LOADED(event, addon) + if addon == "Blizzard_ArenaUI" then + self:EnableArenaFrames() + end +end -- 1.7.9.5