From a1d260a2b04723f6742cd5a2ed67e03b27c90dd3 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 4 Jul 2012 10:23:45 +0000 Subject: [PATCH] Last changes before deploying test queue to production server. --- .../main/java/com/gempukku/lotro/hall/HallInfoVisitor.java | 2 +- .../src/main/java/com/gempukku/lotro/hall/HallServer.java | 6 +++--- .../lotro/tournament/SingleEliminationRecurringQueue.java | 5 +++++ .../java/com/gempukku/lotro/tournament/TournamentQueue.java | 2 ++ .../main/java/com/gempukku/lotro/server/HallResource.java | 3 ++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallInfoVisitor.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallInfoVisitor.java index e16e5e469..990d7fe6d 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallInfoVisitor.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallInfoVisitor.java @@ -9,5 +9,5 @@ public interface HallInfoVisitor { public void runningPlayerGame(String gameId); - public void visitTournamentQueue(String tournamentQueueKey, String collectionName, String formatName, String tournamentQueueName, int playerCount, boolean playerSignedUp); + public void visitTournamentQueue(String tournamentQueueKey, int cost, String collectionName, String formatName, String tournamentQueueName, int playerCount, boolean playerSignedUp); } 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 5773d5609..f9d5bd089 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 @@ -63,7 +63,7 @@ public class HallServer extends AbstractServer { _runningTournaments.addAll(tournamentService.getLiveTournaments()); _tournamentQueues.put("fotr_queue", new SingleEliminationRecurringQueue(0, "fotr_block", - new CollectionType("default", "All cards"), "fotrQueue-", "Fellowship Block 4-man", 2, + new CollectionType("default", "All cards"), "fotrQueue-", "Test Fellowship Block 4-man", 4, tournamentService)); } @@ -280,7 +280,7 @@ public class HallServer extends AbstractServer { for (Map.Entry tournamentQueueEntry : _tournamentQueues.entrySet()) { String tournamentQueueKey = tournamentQueueEntry.getKey(); TournamentQueue tournamentQueue = tournamentQueueEntry.getValue(); - visitor.visitTournamentQueue(tournamentQueueKey, tournamentQueue.getCollectionType().getFullName(), + visitor.visitTournamentQueue(tournamentQueueKey, tournamentQueue.getCost(), tournamentQueue.getCollectionType().getFullName(), tournamentQueue.getFormat(), tournamentQueue.getTournamentQueueName(), tournamentQueue.getPlayerCount(), tournamentQueue.isPlayerSignedUp(player.getName())); } @@ -538,7 +538,7 @@ public class HallServer extends AbstractServer { @Override public void broadcastMessage(String message) { - _hallChat.sendMessage("System", message); + _hallChat.sendMessage("TournamentSystem", message); } } } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationRecurringQueue.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationRecurringQueue.java index 910a06aa1..438e87851 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationRecurringQueue.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationRecurringQueue.java @@ -34,6 +34,11 @@ public class SingleEliminationRecurringQueue implements TournamentQueue { _tournamentService = tournamentService; } + @Override + public int getCost() { + return _cost; + } + @Override public String getFormat() { return _format; diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentQueue.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentQueue.java index 1e22ff30a..a198d3023 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentQueue.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentQueue.java @@ -6,6 +6,8 @@ import com.gempukku.lotro.game.Player; import com.gempukku.lotro.logic.vo.LotroDeck; public interface TournamentQueue { + public int getCost(); + public String getFormat(); public CollectionType getCollectionType(); diff --git a/gemp-lotr/gemp-lotr-web-server/src/main/java/com/gempukku/lotro/server/HallResource.java b/gemp-lotr/gemp-lotr-web-server/src/main/java/com/gempukku/lotro/server/HallResource.java index f8f6541d5..874772de6 100644 --- a/gemp-lotr/gemp-lotr-web-server/src/main/java/com/gempukku/lotro/server/HallResource.java +++ b/gemp-lotr/gemp-lotr-web-server/src/main/java/com/gempukku/lotro/server/HallResource.java @@ -267,10 +267,11 @@ public class HallResource extends AbstractResource { } @Override - public void visitTournamentQueue(String tournamentQueueKey, String collectionName, String formatName, + public void visitTournamentQueue(String tournamentQueueKey, int cost, String collectionName, String formatName, String tournamentQueueName, int playerCount, boolean playerSignedUp) { Element tournamentQueue = _doc.createElement("tournamentQueue"); tournamentQueue.setAttribute("id", tournamentQueueKey); + tournamentQueue.setAttribute("cost", String.valueOf(cost)); tournamentQueue.setAttribute("tournament", tournamentQueueName); tournamentQueue.setAttribute("players", String.valueOf(playerCount)); tournamentQueue.setAttribute("format", formatName);