From d836bfadc50fc111a5f63c319a3ccc2bb10d3bad Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Fri, 2 Dec 2011 17:24:18 +0000 Subject: [PATCH] Format name for leagues. --- .../main/java/com/gempukku/lotro/hall/HallServer.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 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 0de430453..2cdc2855f 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 @@ -76,11 +76,16 @@ public class HallServer extends AbstractServer { */ public synchronized void createNewTable(String type, Player player, String deckName) throws HallException { LotroFormat format = _supportedFormats.get(type); + String formatName = null; + if (format != null) + formatName = _supportedFormatNames.get(type); // Maybe it's a league format? if (format == null) { final League league = _leagueService.getLeagueByType(type); - if (league != null) + if (league != null) { format = _leagueService.getLeagueFormat(league, player); + formatName = league.getName(); + } } if (format == null) throw new HallException("This format is not supported: " + type); @@ -88,7 +93,7 @@ public class HallServer extends AbstractServer { LotroDeck lotroDeck = validateUserAndDeck(type, format, player, deckName); String tableId = String.valueOf(_nextTableId++); - AwaitingTable table = new AwaitingTable(type, _supportedFormatNames.get(type), format); + AwaitingTable table = new AwaitingTable(type, formatName, format); _awaitingTables.put(tableId, table); joinTableInternal(tableId, player.getName(), table, deckName, lotroDeck);