Fixes #492 : Tarmogoyf p/t stats now also displayed in grave&exile zones

This commit is contained in:
magenoxx 2014-08-11 13:55:07 +04:00
parent b60e224098
commit 13d80e72f1
3 changed files with 11 additions and 11 deletions

View file

@ -783,7 +783,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
graveyard = new ShowCardsDialog(); graveyard = new ShowCardsDialog();
}*/ }*/
//graveyard.loadCards(player.getName() + " graveyard", player.getGraveyard(), bigCard, Config.dimensions, gameId, false); //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) { 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) { 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 private void btnCheatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCheatActionPerformed

View file

@ -5,11 +5,11 @@ import mage.cards.action.TransferData;
import mage.client.MageFrame; import mage.client.MageFrame;
import mage.client.game.PlayAreaPanel; import mage.client.game.PlayAreaPanel;
import mage.client.game.PlayerPanelExt; import mage.client.game.PlayerPanelExt;
import mage.view.CardsView;
import mage.view.PlayerView; import mage.view.PlayerView;
import mage.view.SimpleCardsView;
import java.awt.*; import java.awt.*;
import java.util.*; import java.util.UUID;
/** /**
* @author noxx * @author noxx
@ -98,7 +98,7 @@ public class ArrowUtil {
PlayerView view = panel.getPlayerPanel().getPlayer(); PlayerView view = panel.getPlayerPanel().getPlayer();
if (view != null) { if (view != null) {
SimpleCardsView graveyard = view.getGraveyard(); CardsView graveyard = view.getGraveyard();
if (graveyard.containsKey(uuid)) { if (graveyard.containsKey(uuid)) {
p = MageFrame.getGame(data.gameId).getPlayers().get(view.getPlayerId()); p = MageFrame.getGame(data.gameId).getPlayers().get(view.getPlayerId());
if (p != null) { if (p != null) {

View file

@ -59,8 +59,8 @@ public class PlayerView implements Serializable {
private final boolean hasPriority; private final boolean hasPriority;
private final boolean hasLeft; private final boolean hasLeft;
private final ManaPoolView manaPool; private final ManaPoolView manaPool;
private final SimpleCardsView graveyard = new SimpleCardsView(); private final CardsView graveyard = new CardsView();
private final SimpleCardsView exile = new SimpleCardsView(); private final CardsView exile = new CardsView();
private final Map<UUID, PermanentView> battlefield = new LinkedHashMap<>(); private final Map<UUID, PermanentView> battlefield = new LinkedHashMap<>();
private final CardView topCard; private final CardView topCard;
private final UserDataView userDataView; private final UserDataView userDataView;
@ -81,14 +81,14 @@ public class PlayerView implements Serializable {
this.hasPriority = player.getId().equals(state.getPriorityPlayerId()); this.hasPriority = player.getId().equals(state.getPriorityPlayerId());
this.hasLeft = player.hasLeft(); this.hasLeft = player.hasLeft();
for (Card card: player.getGraveyard().getCards(game)) { 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 (ExileZone exileZone : game.getExile().getExileZones()) {
for (Card card : exileZone.getCards(game)) { for (Card card : exileZone.getCards(game)) {
if (!player.getId().equals(card.getOwnerId())) { if (!player.getId().equals(card.getOwnerId())) {
break; 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()) { for (Permanent permanent: state.getBattlefield().getAllPermanents()) {
@ -171,11 +171,11 @@ public class PlayerView implements Serializable {
return this.manaPool; return this.manaPool;
} }
public SimpleCardsView getGraveyard() { public CardsView getGraveyard() {
return this.graveyard; return this.graveyard;
} }
public SimpleCardsView getExile() { public CardsView getExile() {
return exile; return exile;
} }