* Fixed a problem that Emblems created by permanents where its owner left the game caused errors in clients. Some handling cganges of emblems.

This commit is contained in:
LevelX2 2016-12-27 16:00:22 +01:00
parent 81caed134f
commit 8075ea2e50
56 changed files with 894 additions and 850 deletions

View file

@ -35,7 +35,6 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import mage.cards.Card;
import mage.constants.CardType;
import mage.counters.Counters;
import mage.game.ExileZone;
import mage.game.Game;
@ -139,17 +138,7 @@ public class PlayerView implements Serializable {
if (commandObject instanceof Emblem) {
Emblem emblem = (Emblem) commandObject;
if (emblem.getControllerId().equals(this.playerId)) {
Card sourceCard = game.getCard(((CommandObject) emblem).getSourceId());
if (sourceCard != null) {
if (!sourceCard.getCardType().contains(CardType.PLANESWALKER)) {
if (sourceCard.getSecondCardFace() != null) {
sourceCard = sourceCard.getSecondCardFace();
}
}
commandList.add(new EmblemView(emblem, sourceCard));
} else {
commandList.add(new EmblemView(emblem));
}
commandList.add(new EmblemView(emblem));
}
} else if (commandObject instanceof Commander) {
Commander commander = (Commander) commandObject;