Fix bug where details for some cards were not being shown when tutoring

This commit is contained in:
drdev
2014-10-03 09:41:22 +00:00
parent be7a646ba4
commit f04a47b15e
2 changed files with 3 additions and 8 deletions

View File

@@ -452,13 +452,10 @@ public abstract class LocalGameView implements IGameView {
} }
private void writeCardToView(final Card c, final CardView view, final LocalGameView gameView) { private void writeCardToView(final Card c, final CardView view, final LocalGameView gameView) {
// First, write the values independent of other views. // First, write the values independent of other views
boolean mayShowCard = gameView.mayShowCard(c); ViewUtil.writeNonDependentCardViewProperties(c, view, gameView.mayShowCard(c), gameView.mayShowCardFace(c));
ViewUtil.writeNonDependentCardViewProperties(c, view, mayShowCard, gameView.mayShowCardFace(c));
// Next, write the values that depend on other views if card can be shown
if (!mayShowCard) { return; }
// Next, write the values that depend on other views
final Combat combat = game.getCombat(); final Combat combat = game.getCombat();
view.setOwner(getPlayerView(c.getOwner(), false)); view.setOwner(getPlayerView(c.getOwner(), false));
view.setController(getPlayerView(c.getController(), false)); view.setController(getPlayerView(c.getController(), false));

View File

@@ -38,8 +38,6 @@ public final class ViewUtil {
view.setMayBeShown(mayShowCard); view.setMayBeShown(mayShowCard);
view.setZone(c.getZone() == null ? null : c.getZone().getZoneType()); view.setZone(c.getZone() == null ? null : c.getZone().getZoneType());
view.setHasAltState(hasAltState); view.setHasAltState(hasAltState);
if (!mayShowCard) { return; } //remaining properties aren't needed if card can't be shown
view.setFaceDown(c.isFaceDown()); view.setFaceDown(c.isFaceDown());
view.setCloned(c.isCloned()); view.setCloned(c.isCloned());
view.setFlipCard(c.isFlipCard()); view.setFlipCard(c.isFlipCard());