If deck doesn't have ring - do not attempt to validate it.

This commit is contained in:
marcin.sciesinski
2017-11-10 12:56:16 -08:00
parent a1bd7343eb
commit 1b5b2a3ada
2 changed files with 4 additions and 3 deletions

View File

@@ -75,7 +75,8 @@ public class DefaultLotroGame implements LotroGame {
cards.put(playerId, deck);
ringBearers.put(playerId, lotroDeck.getRingBearer());
rings.put(playerId, lotroDeck.getRing());
if (lotroDeck.getRing() != null)
rings.put(playerId, lotroDeck.getRing());
}
_gameState = new GameState();
@@ -100,7 +101,6 @@ public class DefaultLotroGame implements LotroGame {
}
@Override
public boolean shouldAutoPass(String playerId, Phase phase) {
final Set<Phase> passablePhases = _autoPassConfiguration.get(playerId);

View File

@@ -609,7 +609,8 @@ public class HallServer extends AbstractServer {
CardCollection ownedCollection = _collectionsManager.getPlayerCollection(player, "permanent+trophy");
LotroDeck filteredSpecialCardsDeck = new LotroDeck(lotroDeck.getDeckName());
filteredSpecialCardsDeck.setRing(filterCard(lotroDeck.getRing(), ownedCollection));
if (lotroDeck.getRing() != null)
filteredSpecialCardsDeck.setRing(filterCard(lotroDeck.getRing(), ownedCollection));
filteredSpecialCardsDeck.setRingBearer(filterCard(lotroDeck.getRingBearer(), ownedCollection));
for (String site : lotroDeck.getSites())