--Search is for Rank <n> to avoid lines like "x has risen through the ranks" or something else along those lines.
ifmsg:find(L.Rank1,1,true)ormsg:find(L.Rank2,1,true)ormsg:find(L.Rank3,1,true)ormsg:find(L.Rank4,1,true)ormsg:find(L.Rank5,1,true)ormsg:find(L.Rank6,1,true)ormsg:find(L.Rank7,1,true)ormsg:find(L.Rank8,1,true)then-- fix for ruRU clients.
currentFighter=target
elseifmsg:find(L.Rumbler)then
--self:SendSync("MatchEnd")--End any other matches in progress
--isMatchBegin = false--And start a new match instead?
specWarnRumble:Show()
--He's targeting current fighter but it's not a match begin yell, the only other times this happens is on match end and 10 second pre berserk warning.
--This tries to filter pre berserk warnings then pass match end in a way that will definitely catch them all
--but might also incorrectly cancel berserk timer at 10 second pre berserk warning if a message filter isn't localized yet
--But it's still better to cancel berserk 10 seconds early, than to fail to end a match at all.
ifself:LatencyCheck()ornotIsInGroup()then--If not in group always send sync regardless of latency, better to start match late then never start it at all.
self:SendSync("MatchBegin")
end
end
--Only boss with a custom berserk timer. His is 1 minute, but starts at different yell than 2 min berserk, so it's not actually 60 sec shorter but more like 50-55 sec shorter
--Need the yells for meatball too i guess? he has a 1 minute berserk as well?
ifmodsStoppedthenreturnend--Don't need this to fire every time you change zones after the first.
self:Stop()
self:UnregisterShortTermEvents()
eventsRegistered=false
fori=1,7do
localmod2=DBM:GetModByName("BrawlRank"..i)
ifmod2then
mod2:Stop()--Stop all timers and warnings
end
end
localmod3=DBM:GetModByName("BrawlChallenges")
ifmod3then
mod3:Stop()--Stop all timers and warnings
end
localmod4=DBM:GetModByName("BrawlLegacy")
ifmod4then
mod4:Stop()--Stop all timers and warnings
end
localmod5=DBM:GetModByName("BrawlRumble")
ifmod5then
mod5:Stop()--Stop all timers and warnings
end
setDialog(self)
modsStopped=true
end
localstartCallbacks,endCallbacks={},{}
functionmod:OnMatchStart(callback)
table.insert(startCallbacks,callback)
end
functionmod:OnMatchEnd(callback)
table.insert(endCallbacks,callback)
end
--Most group up for this so they can buff eachother for matches. Syncing should greatly improve reliability, especially for match end since the person fighting definitely should detect that (probably missing yells still)