mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Make it possible to join a constructed tournament when the decktype is set to "limited".
This commit is contained in:
parent
e7205391ba
commit
22de97aa18
1 changed files with 4 additions and 4 deletions
|
@ -425,7 +425,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
UUID tableId = (UUID) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN + 3);
|
||||
UUID gameId = (UUID) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN + 2);
|
||||
String action = (String) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN);
|
||||
String deckType = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_DECK_TYPE);
|
||||
String gameType = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_GAME_TYPE);
|
||||
boolean isTournament = (Boolean) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN + 1);
|
||||
String owner = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_OWNER);
|
||||
String pwdColumn = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_PASSWORD);
|
||||
|
@ -454,14 +454,14 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
}
|
||||
if (isTournament) {
|
||||
LOGGER.info("Joining tournament " + tableId);
|
||||
if (deckType.startsWith("Limited")) {
|
||||
if (!gameType.startsWith("Constructed")) {
|
||||
if (TablesTableModel.PASSWORD_VALUE_YES.equals(pwdColumn)) {
|
||||
joinTableDialog.showDialog(roomId, tableId, true, deckType.startsWith("Limited"));
|
||||
joinTableDialog.showDialog(roomId, tableId, true, !gameType.startsWith("Constructed"));
|
||||
} else {
|
||||
SessionHandler.joinTournamentTable(roomId, tableId, SessionHandler.getUserName(), PlayerType.HUMAN, 1, null, "");
|
||||
}
|
||||
} else {
|
||||
joinTableDialog.showDialog(roomId, tableId, true, deckType.startsWith("Limited"));
|
||||
joinTableDialog.showDialog(roomId, tableId, true, !gameType.startsWith("Constructed"));
|
||||
}
|
||||
} else {
|
||||
LOGGER.info("Joining table " + tableId);
|
||||
|
|
Loading…
Reference in a new issue