Skip to content

Commit

Permalink
Fixed CardInfoMessage when changing zone
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Sep 19, 2014
1 parent 2a2489d commit 7c865cf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ public TCGGame(Server server, int id) {
}

private void zoneChange(ZoneChangeEvent event) {
Entity cardEntity = event.getCard();
for (ClientIO io : this.getPlayers()) {
Entity player = playerFor(io);
io.sendToClient(new ZoneChangeMessage(event.getCard().getId(), event.getSource().getZoneId(), event.getDestination().getZoneId()));
if (event.getDestination().isKnownTo(player) && !event.getSource().isKnownTo(player)) {
sendCard(io, event.getCard());
io.sendToClient(new CardInfoMessage(event.getDestination().getZoneId(), cardEntity.getId(), Resources.map(cardEntity)));
}
}
}
Expand Down

0 comments on commit 7c865cf

Please sign in to comment.