private void EndMatch_One(string[] segments) { string matchId = segments[2]; MatchHandler.EndMatch(matchId); MatchEventDispatcher.InvokeMatchEndEvent(new MatchEndEventArgs(matchId)); }
internal static void RemoveUserFromMatch(MatchState match, string accountId) { PlayerState userRemoved; DepartureType departureType = DepartureType.Unknown; match.RemoveUserFromMatch(accountId, out departureType, out userRemoved); if (match.PlayerOne == null & match.PlayerTwo == null) { if (m_Matches.ContainsKey(match.MatchIdentity)) { m_Matches.Remove(match.MatchIdentity); MatchEventDispatcher.InvokeMatchEndEvent (new MatchEndEventArgs(match.MatchIdentity)); } } else { MatchEventDispatcher.InvokeUserDepartedEvent (new UserDepartedEventArgs(match, departureType, userRemoved)); } }