From 13d80e72f1dc4a26b90da4b2408ad8a70eb024ff Mon Sep 17 00:00:00 2001 From: magenoxx Date: Mon, 11 Aug 2014 13:55:07 +0400 Subject: [PATCH] Fixes #492 : Tarmogoyf p/t stats now also displayed in grave&exile zones --- .../main/java/mage/client/game/PlayerPanelExt.java | 4 ++-- .../main/java/mage/client/util/gui/ArrowUtil.java | 6 +++--- Mage.Common/src/mage/view/PlayerView.java | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java index 9f9d9b2d85..e43cc91b87 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java @@ -783,7 +783,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { graveyard = new ShowCardsDialog(); }*/ //graveyard.loadCards(player.getName() + " graveyard", player.getGraveyard(), bigCard, Config.dimensions, gameId, false); - DialogManager.getManager(gameId).showGraveyardDialog(CardsViewUtil.convertSimple(player.getGraveyard(), MageFrame.getGame(gameId).getLoadedCards()), bigCard, gameId); + DialogManager.getManager(gameId).showGraveyardDialog(player.getGraveyard(), bigCard, gameId); } private void btnCommandZoneActionPerformed(java.awt.event.ActionEvent evt) { @@ -791,7 +791,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { } private void btnExileZoneActionPerformed(java.awt.event.ActionEvent evt) { - DialogManager.getManager(gameId).showExileDialog(CardsViewUtil.convertSimple(player.getExile(), MageFrame.getGame(gameId).getLoadedCards()), bigCard, gameId); + DialogManager.getManager(gameId).showExileDialog(player.getExile(), bigCard, gameId); } private void btnCheatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCheatActionPerformed diff --git a/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java b/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java index cafc0bc7c0..917107e219 100644 --- a/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java +++ b/Mage.Client/src/main/java/mage/client/util/gui/ArrowUtil.java @@ -5,11 +5,11 @@ import mage.cards.action.TransferData; import mage.client.MageFrame; import mage.client.game.PlayAreaPanel; import mage.client.game.PlayerPanelExt; +import mage.view.CardsView; import mage.view.PlayerView; -import mage.view.SimpleCardsView; import java.awt.*; -import java.util.*; +import java.util.UUID; /** * @author noxx @@ -98,7 +98,7 @@ public class ArrowUtil { PlayerView view = panel.getPlayerPanel().getPlayer(); if (view != null) { - SimpleCardsView graveyard = view.getGraveyard(); + CardsView graveyard = view.getGraveyard(); if (graveyard.containsKey(uuid)) { p = MageFrame.getGame(data.gameId).getPlayers().get(view.getPlayerId()); if (p != null) { diff --git a/Mage.Common/src/mage/view/PlayerView.java b/Mage.Common/src/mage/view/PlayerView.java index c4ae12e3e0..8d6c046517 100644 --- a/Mage.Common/src/mage/view/PlayerView.java +++ b/Mage.Common/src/mage/view/PlayerView.java @@ -59,8 +59,8 @@ public class PlayerView implements Serializable { private final boolean hasPriority; private final boolean hasLeft; private final ManaPoolView manaPool; - private final SimpleCardsView graveyard = new SimpleCardsView(); - private final SimpleCardsView exile = new SimpleCardsView(); + private final CardsView graveyard = new CardsView(); + private final CardsView exile = new CardsView(); private final Map battlefield = new LinkedHashMap<>(); private final CardView topCard; private final UserDataView userDataView; @@ -81,14 +81,14 @@ public class PlayerView implements Serializable { this.hasPriority = player.getId().equals(state.getPriorityPlayerId()); this.hasLeft = player.hasLeft(); for (Card card: player.getGraveyard().getCards(game)) { - graveyard.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.isFaceDown(), card.getTokenSetCode())); + graveyard.put(card.getId(), new CardView(card)); } for (ExileZone exileZone : game.getExile().getExileZones()) { for (Card card : exileZone.getCards(game)) { if (!player.getId().equals(card.getOwnerId())) { break; } - exile.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.isFaceDown(), card.getTokenSetCode())); + exile.put(card.getId(), new CardView(card)); } } for (Permanent permanent: state.getBattlefield().getAllPermanents()) { @@ -171,11 +171,11 @@ public class PlayerView implements Serializable { return this.manaPool; } - public SimpleCardsView getGraveyard() { + public CardsView getGraveyard() { return this.graveyard; } - public SimpleCardsView getExile() { + public CardsView getExile() { return exile; }