fix entering arena in combat bug

This commit is contained in:
Sumsebrum 2021-07-26 12:58:40 +02:00
parent 5767bc7ae3
commit 755a3e52b5

View File

@ -251,11 +251,12 @@ function Gladdy:OnEnable()
self:RegisterEvent("UPDATE_BATTLEFIELD_STATUS") self:RegisterEvent("UPDATE_BATTLEFIELD_STATUS")
self:RegisterEvent("PLAYER_ENTERING_WORLD") self:RegisterEvent("PLAYER_ENTERING_WORLD")
if (IsAddOnLoaded("Clique")) then
for i = 1, 5 do for i = 1, 5 do
self:CreateButton(i) self:CreateButton(i)
end end
self:UpdateFrame()
if (IsAddOnLoaded("Clique")) then
ClickCastFrames = ClickCastFrames or {} ClickCastFrames = ClickCastFrames or {}
ClickCastFrames[self.buttons.arena1.secure] = true ClickCastFrames[self.buttons.arena1.secure] = true
ClickCastFrames[self.buttons.arena2.secure] = true ClickCastFrames[self.buttons.arena2.secure] = true
@ -424,14 +425,7 @@ function Gladdy:JoinedArena()
self.curBracket = 2 self.curBracket = 2
end end
for i = 1, self.curBracket do
if (not self.buttons["arena" .. i]) then
self:CreateButton(i)
end
end
self:SendMessage("JOINED_ARENA") self:SendMessage("JOINED_ARENA")
self:UpdateFrame()
self.frame:Show() self.frame:Show()
for i=1, self.curBracket do for i=1, self.curBracket do
self.buttons["arena" .. i]:SetAlpha(1) self.buttons["arena" .. i]:SetAlpha(1)