-
-
Save Shadowed/b7787f72dd066ae82f4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Add the rest of the arena messages here | |
local arenaStart = {[L.ARENA_60] = 6, [L.ARENA_45] = 5, [L.ARENA_START] = 8} | |
function atroxArenaViewer:CHAT_MSG_BG_SYSTEM_NEUTRAL(event, msg) | |
if (msg == L.ARENA_START) then | |
if (atroxArenaViewerData.current.record == true) then | |
atroxArenaViewerData.current.entered = self:getCurrentTime() | |
atroxArenaViewerData.current.time = GetTime() | |
M:setBracket(self:getCurrentBracket()) | |
self:sendNewMatchInfo() -- match starts | |
for i = 1, 5 do | |
if (UnitExists("raid" .. i)) then | |
local key, player = M:updateMatchPlayers(1, "raid" .. i) | |
--self:ScheduleTimer("initArenaMatchUnits", AAV_INITOFFTIME, {"raid" .. i, 1}) | |
--self:initArenaMatchUnits({"raid" .. i, 1}) | |
self:sendPlayerInfo(key, player) | |
end | |
end | |
self:handleEvents("register") | |
self:handleQueueTimer("start") | |
end | |
end | |
if( arenaStart[msg] ) then | |
currentstate = arenaStart[msg] | |
if (atroxArenaViewerData.current.broadcast) then | |
message["std"] = { | |
event = AAV_COMM_EVENT["cmd_status"], | |
target = nil, | |
version = nil, | |
state = currentstate, | |
} | |
self:SendCommMessage(AAV_COMM_LOOKUPBROADCAST, self:Serialize(message["std"]), "GUILD", nil) | |
message["std"].state = nil | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment