private void OnTeamOutfitChangeEvent(object sender, TeamOutfitChangeEventArgs e) { if (MatchConfiguration.IsManualWorldId) { return; } int?worldId; var message = e.Message; var changeType = message.ChangeType; bool isRollBack = false; if (changeType == TeamChangeType.Add) { worldId = e.Message.Outfit.WorldId; } else { worldId = _teamsManager.GetNextWorldId(MatchConfiguration.WorldId); isRollBack = true; } if (worldId == null) { MatchConfiguration.ResetWorldId(); SendMatchConfigurationUpdateMessage(); } else if (MatchConfiguration.TrySetWorldId((int)worldId, false, isRollBack)) { SendMatchConfigurationUpdateMessage(); } }
protected virtual void OnRaiseTeamOutfitChangeEvent(TeamOutfitChangeEventArgs e) { RaiseTeamOutfitChangeEvent?.Invoke(this, e); }