fixed emblems not being removed when a player leaves a multiplayer game

This commit is contained in:
Evan Kranzler 2017-09-28 19:41:31 -04:00
parent f177ce14d2
commit 851b729b0e
2 changed files with 15 additions and 1 deletions

View file

@ -2361,7 +2361,9 @@ public abstract class GameImpl implements Game, Serializable {
//Remove all emblems the player controls
for (Iterator<CommandObject> it = this.getState().getCommand().iterator(); it.hasNext();) {
if (it.next().getControllerId().equals(playerId)) {
CommandObject obj = it.next();
if (obj instanceof Emblem && obj.getControllerId().equals(playerId)) {
((Emblem) obj).discardEffects();// This may not be the best fix but it works
it.remove();
}
}