public void PartySubmitted(Player player, PBETeamShell teamShell) { if (_state != ServerState.WaitingForParties) { return; } lock (this) { if (_state != ServerState.WaitingForParties) { return; } foreach (PBEPokemonShell shell in teamShell) { try { // Not currently necessary, but it would be necessary eventually because PBEMovesetBuilder cannot check if a moveset "makes sense" for the method the Pokémon was obtained in // Eventually we would probably want to store that sort of information in PBEPokemonShell PBELegalityChecker.MoveLegalityCheck(shell.Moveset); } catch (Exception e) { Console.WriteLine($"Illegal moveset received from {player.TrainerName}"); Console.WriteLine(e.Message); CancelMatch(); return; } } PBEBattle.CreateTeamParty(_battle.Teams[player.BattleId], teamShell, player.TrainerName); } }
public void PartySubmitted(Player player) { if (state != ServerState.WaitingForParties) { return; } lock (this) { if (state != ServerState.WaitingForParties) { return; } PBEBattle.CreateTeamParty(battle.Teams[player.BattleId], player.Party); } }
public void PartySubmitted(Player player) { if (_state != ServerState.WaitingForParties) { return; } lock (this) { if (_state != ServerState.WaitingForParties) { return; } PBEBattle.CreateTeamParty(_battle.Teams[player.BattleId], player.TeamShell, player.TrainerName); } }