From 80100e2d16f4711d51ff0a6557c2787c798ae6ae Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Thu, 22 Sep 2011 23:24:59 +0000 Subject: [PATCH] Fixing problem with skirmish where FP char was removed (ie. killed). --- .../game/GatheringParticipantCommunicationChannel.java | 5 ++++- gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/GatheringParticipantCommunicationChannel.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/GatheringParticipantCommunicationChannel.java index 864613821..e76ad86be 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/GatheringParticipantCommunicationChannel.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/GatheringParticipantCommunicationChannel.java @@ -46,7 +46,10 @@ public class GatheringParticipantCommunicationChannel implements GameStateListen @Override public void startSkirmish(PhysicalCard freePeople, List minions) { - _events.add(new GameEvent(START_SKIRMISH).cardId(freePeople.getCardId()).opposingCardIds(getCardIds(minions))); + GameEvent gameEvent = new GameEvent(START_SKIRMISH).opposingCardIds(getCardIds(minions)); + if (freePeople != null) + gameEvent.cardId(freePeople.getCardId()); + _events.add(gameEvent); } @Override diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js index c61b956cd..77480cb8d 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js @@ -654,10 +654,15 @@ var GempLotrGameUI = Class.extend({ var cardId = element.getAttribute("cardId"); var opposingCardIds = element.getAttribute("opposingCardIds").split(","); - $(".card:cardId(" + opposingCardIds + "," + cardId + ")").each(function() { + $(".card:cardId(" + opposingCardIds + ")").each(function() { $(this).data("card").skirmish = true; }); + if (cardId != null) + $(".card:cardId(" + cardId + ")").each(function() { + $(this).data("card").skirmish = true; + }); + this.fpStrengthDiv = $("
"); this.shadowStrengthDiv = $("
");