Modified - non-wc tournaments with no prizes and no cost can be spectated and the chat room is not locked (before only spectate 1v1 tournaments)

This commit is contained in:
jakub.salavec
2025-04-14 15:35:02 +02:00
parent 3e5c46a9ff
commit 5dbd81dfc3

View File

@@ -917,10 +917,11 @@ public class HallServer extends AbstractServer {
private HallTournamentCallback(Tournament tournament) { private HallTournamentCallback(Tournament tournament) {
tournamentId = tournament.getTournamentId(); tournamentId = tournament.getTournamentId();
tournamentName = tournament.getTournamentName(); tournamentName = tournament.getTournamentName();
// Tournaments with just 2 players can be spectated // Tournaments with no prizes and no entry are not competitive
boolean privateGame = tournament.getPlayersInCompetitionCount() != 2; boolean casual = tournament.getInfo().Parameters().prizes == Tournament.PrizeType.NONE
&& tournament.getInfo().Parameters().cost == 0;
tournamentGameSettings = new GameSettings(null, _formatLibrary.getFormat(tournament.getFormatCode()), tournamentGameSettings = new GameSettings(null, _formatLibrary.getFormat(tournament.getFormatCode()),
tournamentId, null, null, true, privateGame, false, tournamentId, null, null, !casual, !casual, false,
false, GameTimer.TOURNAMENT_TIMER, null); false, GameTimer.TOURNAMENT_TIMER, null);
wcGameSettings = new GameSettings(null, _formatLibrary.getFormat(tournament.getFormatCode()), wcGameSettings = new GameSettings(null, _formatLibrary.getFormat(tournament.getFormatCode()),