From 9012bbe072ec846ac892efb594a36f893532ff78 Mon Sep 17 00:00:00 2001 From: marcins78 Date: Thu, 19 Dec 2013 10:29:58 +0000 Subject: [PATCH] Further check on joining multiple league games at the same times. --- .../main/java/com/gempukku/lotro/hall/HallServer.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java index 5f56f1181..9e3b110f9 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java @@ -279,10 +279,15 @@ public class HallServer extends AbstractServer { if (awaitingTable.hasPlayer(player.getName())) throw new HallException("You can't play against yourself"); - if (awaitingTable.getLeague() != null && !_leagueService.isPlayerInLeague(awaitingTable.getLeague(), player)) - throw new HallException("You're not in that league"); + final League league = awaitingTable.getLeague(); + if (league != null) { + if (!_leagueService.isPlayerInLeague(league, player)) + throw new HallException("You're not in that league"); - LotroDeck lotroDeck = validateUserAndDeck(awaitingTable.getLotroFormat(), player, deckName, awaitingTable.getCollectionType(), awaitingTable.getLeague() != null); + verifyNotPlayingLeagueGame(player, league); + } + + LotroDeck lotroDeck = validateUserAndDeck(awaitingTable.getLotroFormat(), player, deckName, awaitingTable.getCollectionType(), league != null); joinTableInternal(tableId, player.getName(), awaitingTable, lotroDeck);