Implemented Issue#73: Enchant Player enchantments - show enchanted player

This commit is contained in:
magenoxx 2013-01-14 18:57:13 +04:00
parent 17b8619b3e
commit 55f40d2e9d
7 changed files with 64 additions and 5 deletions

View file

@ -61,6 +61,7 @@ public class PlayerView implements Serializable {
private CardView topCard;
private UserDataView userDataView;
private List<EmblemView> emblemList = new ArrayList<EmblemView>();
private List<UUID> attachments = new ArrayList<UUID>();
public PlayerView(Player player, GameState state, Game game) {
this.playerId = player.getId();
@ -100,6 +101,10 @@ public class PlayerView implements Serializable {
}
}
}
if (player.getAttachments() != null) {
attachments.addAll(player.getAttachments());
}
}
private boolean showInBattlefield(Permanent permanent, GameState state) {
@ -171,4 +176,12 @@ public class PlayerView implements Serializable {
public List<EmblemView> getEmblemList() {
return emblemList;
}
public List<UUID> getAttachments() {
return attachments;
}
public boolean hasAttachments() {
return attachments != null && attachments.size() > 0;
}
}