diff --git a/Mage.Client/src/main/java/mage/client/MageFrame.java b/Mage.Client/src/main/java/mage/client/MageFrame.java index 5b6204f1d8..3d6d685e4c 100644 --- a/Mage.Client/src/main/java/mage/client/MageFrame.java +++ b/Mage.Client/src/main/java/mage/client/MageFrame.java @@ -1034,8 +1034,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { if (window instanceof DeckEditorPane) { DeckEditorPane deckEditorPane = (DeckEditorPane) window; if (deckEditorPane.getDeckEditorMode() == DeckEditorMode.LIMITED_BUILDING - || deckEditorPane.getDeckEditorMode() == DeckEditorMode.SIDEBOARDING - || deckEditorPane.getDeckEditorMode() == DeckEditorMode.VIEW_LIMITED_DECK) { + || deckEditorPane.getDeckEditorMode() == DeckEditorMode.SIDEBOARDING) { deckEditorPane.removeFrame(); } } @@ -1045,7 +1044,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { public void showDeckEditor(DeckEditorMode mode, Deck deck, UUID tableId, int time) { String name; - if (mode == DeckEditorMode.SIDEBOARDING || mode == DeckEditorMode.LIMITED_BUILDING || mode == DeckEditorMode.VIEW_LIMITED_DECK) { + if (mode == DeckEditorMode.SIDEBOARDING || mode == DeckEditorMode.LIMITED_BUILDING) { name = "Deck Editor - " + tableId.toString(); } else { if (deck != null) { diff --git a/Mage.Client/src/main/java/mage/client/constants/Constants.java b/Mage.Client/src/main/java/mage/client/constants/Constants.java index 29456b65f6..a71ccc5750 100644 --- a/Mage.Client/src/main/java/mage/client/constants/Constants.java +++ b/Mage.Client/src/main/java/mage/client/constants/Constants.java @@ -91,8 +91,7 @@ public final class Constants { FREE_BUILDING, LIMITED_BUILDING, - SIDEBOARDING, - VIEW_LIMITED_DECK + SIDEBOARDING } public enum SortBy { diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPane.java b/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPane.java index cfc1db5812..7d547a41bc 100644 --- a/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPane.java +++ b/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPane.java @@ -80,8 +80,6 @@ public class DeckEditorPane extends MagePane { public void show(DeckEditorMode mode, Deck deck, String name, UUID tableId, int time) { if (mode == DeckEditorMode.SIDEBOARDING || mode == DeckEditorMode.LIMITED_BUILDING) { this.setTitle("Deck Editor - " + tableId.toString()); - } else if (mode == DeckEditorMode.VIEW_LIMITED_DECK) { - this.setTitle("Deck Editor - Current Deck"); } else if (deck != null) { this.setTitle("Deck Editor - " + deck.getName()); } else { diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java b/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java index 9ac1a9c49d..6ac79cc17b 100644 --- a/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java +++ b/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java @@ -233,24 +233,6 @@ public class DeckEditorPanel extends javax.swing.JPanel { this.deckArea.showSideboard(true); this.txtTimeRemaining.setVisible(false); break; - case VIEW_LIMITED_DECK: - this.btnExit.setVisible(true); - this.btnAddLand.setVisible(false); - this.btnGenDeck.setVisible(false); - this.btnImport.setVisible(false); - this.btnLoad.setVisible(false); - this.btnNew.setVisible(false); - this.btnSave.setVisible(false); - this.btnSubmit.setVisible(false); - this.btnSubmitTimer.setVisible(false); - this.cardSelector.loadCards(this.bigCard); - this.cardSelector.setVisible(false); - this.deckArea.setOrientation(/*limitedBuildingOrientation = */true); - this.deckArea.showSideboard(true); - this.lblDeckName.setVisible(false); - this.txtDeckName.setVisible(false); - this.txtTimeRemaining.setVisible(false); - break; } init(); this.deckArea.setDeckEditorMode(mode); diff --git a/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java b/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java index 2e90009550..8650c9d175 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java @@ -472,17 +472,6 @@ public class PlayAreaPanel extends javax.swing.JPanel { } }); - - popupMenu.addSeparator(); - - menuItem = new JMenuItem("View current deck"); - menuItem.setMnemonic(KeyEvent.VK_V); - popupMenu.add(menuItem); - - // View limited deck - menuItem.addActionListener(e -> { - SessionHandler.sendPlayerAction(PlayerAction.VIEW_LIMITED_DECK, gameId, null); - }); } private void addPopupMenuWatcher() { diff --git a/Mage.Client/src/main/java/mage/client/remote/CallbackClientImpl.java b/Mage.Client/src/main/java/mage/client/remote/CallbackClientImpl.java index 639cf37792..6386622235 100644 --- a/Mage.Client/src/main/java/mage/client/remote/CallbackClientImpl.java +++ b/Mage.Client/src/main/java/mage/client/remote/CallbackClientImpl.java @@ -324,13 +324,6 @@ public class CallbackClientImpl implements CallbackClient { } break; } - case VIEW_LIMITED_DECK: { - TableClientMessage message = (TableClientMessage) callback.getData(); - DeckView deckView = message.getDeck(); - Deck deck = DeckUtil.construct(deckView); - viewLimitedDeck(deck, message.getTableId(), message.getTime()); - break; - } case CONSTRUCT: { TableClientMessage message = (TableClientMessage) callback.getData(); DeckView deckView = message.getDeck(); @@ -519,10 +512,6 @@ public class CallbackClientImpl implements CallbackClient { frame.showDeckEditor(DeckEditorMode.LIMITED_BUILDING, deck, tableId, time); } - protected void viewLimitedDeck(Deck deck, UUID tableId, int time) { - frame.showDeckEditor(DeckEditorMode.VIEW_LIMITED_DECK, deck, tableId, time); - } - private void handleException(Exception ex) { logger.fatal("Client error\n", ex); frame.showError("Error: " + ex.getMessage()); diff --git a/Mage.Common/src/main/java/mage/interfaces/callback/ClientCallbackMethod.java b/Mage.Common/src/main/java/mage/interfaces/callback/ClientCallbackMethod.java index 9a74ad6e2a..9e3180f3a8 100644 --- a/Mage.Common/src/main/java/mage/interfaces/callback/ClientCallbackMethod.java +++ b/Mage.Common/src/main/java/mage/interfaces/callback/ClientCallbackMethod.java @@ -13,7 +13,6 @@ public enum ClientCallbackMethod { START_DRAFT("startDraft"), START_TOURNAMENT("startTournament"), SIDEBOARD("sideboard"), - VIEW_LIMITED_DECK("viewLimitedDeck"), CONSTRUCT("construct"), SHOW_USERMESSAGE("showUserMessage"), WATCHGAME("watchGame"), diff --git a/Mage.Server/src/main/java/mage/server/User.java b/Mage.Server/src/main/java/mage/server/User.java index e4853b7629..ee7e96fd71 100644 --- a/Mage.Server/src/main/java/mage/server/User.java +++ b/Mage.Server/src/main/java/mage/server/User.java @@ -269,10 +269,6 @@ public class User { sideboarding.put(tableId, deck); } - public void ccViewLimitedDeck(final Deck deck, final UUID tableId, final int time, boolean limited) { - fireCallback(new ClientCallback(ClientCallbackMethod.VIEW_LIMITED_DECK, tableId, new TableClientMessage(deck, tableId, time, limited))); - } - public void ccConstruct(final Deck deck, final UUID tableId, final int time) { fireCallback(new ClientCallback(ClientCallbackMethod.CONSTRUCT, tableId, new TableClientMessage(deck, tableId, time))); } diff --git a/Mage.Server/src/main/java/mage/server/game/GameController.java b/Mage.Server/src/main/java/mage/server/game/GameController.java index be85b1f9a8..06d0cab7d5 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameController.java +++ b/Mage.Server/src/main/java/mage/server/game/GameController.java @@ -546,9 +546,6 @@ public class GameController implements GameCallback { requestPermissionToSeeHandCards(userId, (UUID) data); } break; - case VIEW_LIMITED_DECK: - viewLimitedDeck(getPlayerId(userId), userId); - break; default: game.sendPlayerAction(playerAction, getPlayerId(userId), data); } @@ -605,23 +602,6 @@ public class GameController implements GameCallback { } } - private void viewLimitedDeck(UUID userIdRequester, UUID origId) { - Player viewLimitedDeckPlayer = game.getPlayer(userIdRequester); - if (viewLimitedDeckPlayer != null) { - if (viewLimitedDeckPlayer.isHuman()) { - System.out.println("Origid: " + origId + " req:" + userIdRequester); - for (MatchPlayer p : TableManager.instance.getTable(tableId).getMatch().getPlayers()) { - if (p.getPlayer().getId() == userIdRequester) { - Optional u = UserManager.instance.getUser(origId); - if (u != null && u.isPresent() && p.getDeck() != null) { - u.get().ccViewLimitedDeck(p.getDeck(), tableId, requestsOpen, true); - } - } - } - } - } - } - public void cheat(UUID userId, UUID playerId, DeckCardLists deckList) { try { Deck deck = Deck.load(deckList, false, false); diff --git a/Mage/src/main/java/mage/constants/PlayerAction.java b/Mage/src/main/java/mage/constants/PlayerAction.java index cdee7edd3a..cbff2a1384 100644 --- a/Mage/src/main/java/mage/constants/PlayerAction.java +++ b/Mage/src/main/java/mage/constants/PlayerAction.java @@ -83,6 +83,5 @@ public enum PlayerAction { CLIENT_RECONNECT, CLIENT_REPLAY_ACTION, HOLD_PRIORITY, - UNHOLD_PRIORITY, - VIEW_LIMITED_DECK + UNHOLD_PRIORITY }