Привет, нужна помощь
в одном из постов http://www.arenajunkies.com/topic/20...pillar-timers/ есть код для аддона, показывающего таймер столбов на арене доблести
Возникла проблема: в начале арены не появляется значок с таймером.
командаработает, с таймером все окКод HTML:/script RoV_Timer_Event(nil,nil,"reset")
В коде с аренаджанкис изменил сообщение на "Бой на арене начинается!" - на моем англ клиенте выводит именно такое
и тип сообщения на "CHAT_MSG_RAID_BOSS_EMOTE"
в начале арены таймера по-прежнему нет
Код:local b=CreateFrame("Frame") b:SetPoint("CENTER",-200,-220) -- Change positioning b:SetSize(50,50) -- Change size b.c=CreateFrame("Cooldown") b.c:SetAllPoints( b ) b.t=b:CreateTexture(nil,"BORDER") b.t:SetAllPoints() b.t:SetTexture("Interface\\Icons\\trade_engineering") b:Hide() local pillar local timeElapsed=0 local timeElapsed2=0 local RoV_Timer_Test = 1 local function RoV_Timer_Disable() b:Hide() b:SetScript("OnUpdate",nil) CooldownFrame_SetTimer(b.c, GetTime(), 0, 1) pillar=nil timeElapsed=0 end local function RoV_Timer_Update(self, elapsed) timeElapsed = timeElapsed + elapsed timeElapsed2 = timeElapsed2 + elapsed if ( timeElapsed2 >= RoV_Timer_Test) then timeElapsed2=0 if not IsActiveBattlefieldArena() then RoV_Timer_Disable() end end if not pillar then if ( timeElapsed >= 7 ) then CooldownFrame_SetTimer(b.c, GetTime(), 20, 1) pillar=20 timeElapsed = 0 end elseif pillar==20 then if ( timeElapsed >= 20 ) then CooldownFrame_SetTimer(b.c, GetTime(), 25, 1) pillar=25 timeElapsed = 0 end elseif pillar==25 then if ( timeElapsed >= 25 ) then CooldownFrame_SetTimer(b.c, GetTime(), 20, 1) pillar=20 timeElapsed = 0 end end end function RoV_Timer_Event(self, event, msg) if msg=="Бой на арене начинается!" then if GetRealZoneText()=="The Ring of Valor" then b:Show() CooldownFrame_SetTimer(b.c, GetTime(), 7, 1) b:SetScript("OnUpdate",RoV_Timer_Update) end elseif msg=="test" then RoV_Timer_Test = 1000000000 b:Show() CooldownFrame_SetTimer(b.c, GetTime(), 7, 1) b:SetScript("OnUpdate",RoV_Timer_Update) print("RoV Timer Test") elseif msg=="reset" then RoV_Timer_Test = 1 RoV_Timer_Disable() print("RoV Timer Reset") end end b:RegisterEvent("CHAT_MSG_RAID_BOSS_EMOTE") b:SetScript("OnEvent",RoV_Timer_Event) --[[ /script RoV_Timer_Event(nil,nil,"test") /script RoV_Timer_Event(nil,nil,"reset") ]]


Ответить с цитированием


