diff --git a/Mage.Server/src/main/java/mage/server/TableManager.java b/Mage.Server/src/main/java/mage/server/TableManager.java index d488a1ca06..603d770cef 100644 --- a/Mage.Server/src/main/java/mage/server/TableManager.java +++ b/Mage.Server/src/main/java/mage/server/TableManager.java @@ -319,8 +319,8 @@ public class TableManager { if (player != null && player.isHuman()) { canBeRemoved = false; } - /* temporarily fix for issue #262 */ - if(table.getGameType().equals("Two Player Duel")){ + // tournament sub tables may not be removed, will be done by the tournament itself + if(table.isTournamentSubTable()){ canBeRemoved = false; } } diff --git a/Mage.Server/src/main/java/mage/server/tournament/TournamentController.java b/Mage.Server/src/main/java/mage/server/tournament/TournamentController.java index 762fabf865..77591b6187 100644 --- a/Mage.Server/src/main/java/mage/server/tournament/TournamentController.java +++ b/Mage.Server/src/main/java/mage/server/tournament/TournamentController.java @@ -196,6 +196,7 @@ public class TournamentController { try { TableManager tableManager = TableManager.getInstance(); Table table = tableManager.createTable(GamesRoomManager.getInstance().getMainRoomId(), matchOptions); + table.setTournamentSubTable(true); TournamentPlayer player1 = pair.getPlayer1(); TournamentPlayer player2 = pair.getPlayer2(); tableManager.addPlayer(getPlayerSessionId(player1.getPlayer().getId()), table.getId(), player1.getPlayer(), player1.getPlayerType(), player1.getDeck()); diff --git a/Mage/src/mage/game/Table.java b/Mage/src/mage/game/Table.java index be237492e0..9ff16f8ca4 100644 --- a/Mage/src/mage/game/Table.java +++ b/Mage/src/mage/game/Table.java @@ -56,7 +56,7 @@ public class Table implements Serializable { private Seat[] seats; private int numSeats; private boolean isTournament; - private boolean isTournamentSubTable; + private boolean tournamentSubTable; private DeckValidator validator; private TableState state = TableState.WAITING; private Match match; @@ -227,4 +227,12 @@ public class Table implements Serializable { return controllerName; } + public boolean isTournamentSubTable() { + return tournamentSubTable; + } + + public void setTournamentSubTable(boolean tournamentSubTable) { + this.tournamentSubTable = tournamentSubTable; + } + }