From c5455a8385cf5173cb7c0fc0fcecef2115bbead9 Mon Sep 17 00:00:00 2001 From: "jakub.salavec" Date: Tue, 17 Jun 2025 14:13:45 +0200 Subject: [PATCH] Modified - removed separate queue and tournament sections from hall; made new sections to display info about scheduled events; the default place for queues is waiting tables, for tournaments playing tables --- .../gemp-lotr-async/src/main/web/hall.html | 64 +++--- .../src/main/web/js/gemp-022/hallUi.js | 184 +++++++++--------- .../lotro/hall/HallCommunicationChannel.java | 6 +- .../gempukku/lotro/hall/HallInfoVisitor.java | 3 +- .../tournament/ImmediateRecurringQueue.java | 6 + .../lotro/tournament/PlayerMadeQueue.java | 5 + .../tournament/RecurringScheduledQueue.java | 6 + .../tournament/ScheduledTournamentQueue.java | 9 + .../lotro/tournament/TournamentQueue.java | 2 + .../lotro/tournament/TournamentService.java | 3 +- 10 files changed, 169 insertions(+), 119 deletions(-) diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/hall.html b/gemp-lotr/gemp-lotr-async/src/main/web/hall.html index 3ebefa626..5f58495ab 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/hall.html +++ b/gemp-lotr/gemp-lotr-async/src/main/web/hall.html @@ -185,11 +185,12 @@ - + + - - - + + +
FormatEventCollectionEvent Name StartsSystemPlayersActionsSystemCostPrizes
@@ -199,34 +200,47 @@ - + + - - - -
FormatEventCollectionEvent Name System Stage RoundPlayersActions
- - -
Tournament Queues(0)
-
- - - - - - - - - - - +
FormatCollectionQueue nameStartsSystemPlayersCostPrizesActionsPlayers
-
Tournaments & Limited Games
+
Scheduled Events(0)
+
+ + + + + + + + + + +
FormatCollectionEvent NameStartsSystemCostPrizes
+
+ +
Recurring Events(0)
+
+ + + + + + + + + + +
FormatCollectionEvent NameNext StartSystemCostPrizes
+
+ +
Create Tournaments & Limited Games
diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js index 2c93dab39..e8327caaa 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js @@ -126,14 +126,10 @@ var GempLotrHallUI = Class.extend({ this.initTable(hallSettings[2] == "1", "finishedTablesHeader", "finishedTablesContent"); this.initTable(hallSettings[3] == "1", "wcQueuesHeader", "wcQueuesContent"); this.initTable(hallSettings[4] == "1", "wcEventsHeader", "wcEventsContent"); - this.initTable(hallSettings[5] == "1", "tournamentQueuesHeader", "tournamentQueuesContent"); - this.initTable(hallSettings[6] == "1", "queueSpawnerHeader", "queueSpawnerContent"); - - $('#wcQueuesHeader').hide(); - $('#wcQueuesContent').hide(); - $('#wcEventsHeader').hide(); - $('#wcEventsContent').hide(); - + this.initTable(hallSettings[5] == "1", "scheduledQueuesHeader", "scheduledQueuesContent"); + this.initTable(hallSettings[6] == "1", "recurringQueuesHeader", "recurringQueuesContent"); + this.initTable(hallSettings[7] == "1", "queueSpawnerHeader", "queueSpawnerContent"); + $("#deckbuilder-button").button(); $("#bug-button").button(); $("#report-button").button(); @@ -543,7 +539,7 @@ var GempLotrHallUI = Class.extend({ return $(visibilityToggle[index]).hasClass("hidden") ? "0" : "1"; }; - var newHallSettings = getSettingValue(0) + "|" + getSettingValue(1) + "|" + getSettingValue(2) + "|" + getSettingValue(3) + "|" + getSettingValue(4)+ "|" + getSettingValue(5) + "|" + getSettingValue(6) + "|" + getSettingValue(7) + "|" + getSettingValue(8); + var newHallSettings = getSettingValue(0) + "|" + getSettingValue(1) + "|" + getSettingValue(2) + "|" + getSettingValue(3) + "|" + getSettingValue(4)+ "|" + getSettingValue(5) + "|" + getSettingValue(6) + "|" + getSettingValue(7); console.log("New settings: " + newHallSettings); $.cookie("hallSettings", newHallSettings, { expires:365 }); }, @@ -755,6 +751,9 @@ var GempLotrHallUI = Class.extend({ var queue = queues[i]; var id = queue.getAttribute("id"); var isWC = queue.getAttribute("wc") == "true"; + var isRecurring = queue.getAttribute("recurring") == "true"; + var isScheduled = queue.getAttribute("scheduled") == "true"; + var displayInWaitingTables = queue.getAttribute("displayInWaitingTables") == "true"; var action = queue.getAttribute("action"); if (action == "add" || action == "update") { var actionsField = $(""); @@ -772,7 +771,7 @@ var GempLotrHallUI = Class.extend({ var queueId = queueInfo.getAttribute("id"); var type = queueInfo.getAttribute("type"); - if(type !== null) + if (type !== null) type = type.toLowerCase(); var queueName = queueInfo.getAttribute("queue"); var queueStart = queueInfo.getAttribute("start"); @@ -788,36 +787,35 @@ var GempLotrHallUI = Class.extend({ if(type === "sealed") { message = "You have signed up to participate in the " + queueName + " tournament.

When the event begins, you will be issued sealed packs to open and make a deck. " + - "At any time during the deckbuilding phase and for a short time after it ends, you will need to lock-in your deck before the tournament begins.

" + - "Deckbuilding begins at " + queueStart + ". Good luck!"; + "At any time during the deck building phase, you will need to lock-in your deck before the tournament begins.

" + + "Deck building begins at " + queueStart + ". Good luck!"; } if(type === "solodraft") { message = "You have signed up to participate in the " + queueName - + " tournament.

When the event begins, use the 'Go to Draft' button in the Active Tournaments Section, and then build your deck in the Deck Builder. " + - "At any time during the deckbuilding phase and for a short time after it ends, you will need to lock-in your deck before the tournament begins.

" + - "Deckbuilding begins at " + queueStart + ". Good luck!"; + + " tournament.

When the event begins, use the 'Go to Draft' button in the Playing Tables Section, and then build your deck in the Deck Builder. " + + "At any time during the deck building phase, you will need to lock-in your deck before the tournament begins.

" + + "Deck building begins at " + queueStart + ". Good luck!"; } if(type === "table_solodraft") { message = "You have signed up to participate in the " + queueName - + " tournament.

When the event begins, use the 'Go to Draft' button in the Active Tournaments Section, and then build your deck in the Deck Builder. " + - "At any time during the deckbuilding phase and for a short time after it ends, you will need to lock-in your deck before the tournament begins.

" + - "Deckbuilding begins at " + queueStart + ". Good luck!"; + + " tournament.

When the event begins, use the 'Go to Draft' button in the Playing Tables Section, and then build your deck in the Deck Builder. " + + "At any time during the deck building phase, you will need to lock-in your deck before the tournament begins.

" + + "Deck building begins at " + queueStart + ". Good luck!"; } if(type === "table_draft") { message = "You have signed up to participate in the " + queueName - + " tournament.

When the event begins, use the 'Go to Draft' button in the Active Tournaments Section, and then build your deck in the Deck Builder. " + - "At any time during the deckbuilding phase and for a short time after it ends, you will need to lock-in your deck before the tournament begins.

" + + + " tournament.

When the event begins, use the 'Go to Draft' button in the Playing Tables Section, and then build your deck in the Deck Builder. " + + "At any time during the deck building phase, you will need to lock-in your deck before the tournament begins.

" + "Draft begins at " + queueStart + ". Good luck!"; } that.showDialog("Joined Tournament", message, 320); } }, that.hallErrorMap()); }; - } - )(queue)); + })(queue)); actionsField.append(but); } else if (joined == "true") { that.inTournament = true; @@ -833,8 +831,6 @@ var GempLotrHallUI = Class.extend({ if(result) { that.inTournament = false; - that.showDialog("Left Tournament", "You have been removed from the " + queueName - + " tournament.

If you wish to rejoin, you will need to requeue before it starts at " + queueStart + ".", 230); } }); } @@ -855,10 +851,10 @@ var GempLotrHallUI = Class.extend({ actionsField.append(startBut); } - if (+queue.getAttribute("readyCheckSecsRemaining") > -1) { + if (+queue.getAttribute("readyCheckSecsRemaining") > -1) { // The '+' sign converts string to number if ($("button:contains('READY CHECK')").length === 0 && queue.getAttribute("confirmedReadyCheck") == "false") { that.showDialog("Ready Check", "Ready Check started for the " + queue.getAttribute("queue") - + " tournament.

To confirm you are present, click the Ready Check button within next " + + " tournament.

To confirm you are present, click the Ready Check button in the Waiting Tables Section within the next " + queue.getAttribute("readyCheckSecsRemaining") + " seconds.", 230); } var checkBut = $(""); @@ -892,44 +888,34 @@ var GempLotrHallUI = Class.extend({ else if (type === "table_draft") { type = "Table Draft"; } + else if (type === "constructed") { + type = "Constructed"; + } var rowstr = "" + queue.getAttribute("format") + ""; + var collectionTd = "" + queue.getAttribute("collection") + ""; + var queueNameTd = "" + queue.getAttribute("queue") + ""; var startTd = "" + queue.getAttribute("start") + ""; var systemTd = "" + queue.getAttribute("system") + ""; - var playersTd = "
" + queue.getAttribute("playerCount") + "
"; var costPrizesTds = "" + formatPrice(queue.getAttribute("cost")) + "" + queue.getAttribute("prizes") + ""; - if (isWC) { // assumes that wc queue is always constructed - rowstr += "" + queue.getAttribute("queue") + "" + - startTd + - systemTd + - playersTd + - ""; - } else if (type.includes("Sealed") || type.includes("Draft")) { - // No prizes and cost displayed for limited games - rowstr += "" + type + ""; - rowstr += "" + - startTd + - systemTd + - playersTd + - costPrizesTds + - ""; + if (type.includes("Sealed") || type.includes("Draft")) { + collectionTd = "" + type + ""; - } else { - rowstr += "" + queue.getAttribute("collection") + "" + - "" + queue.getAttribute("queue") + "" + + queueNameTd = ""; + + } + rowstr += collectionTd + + queueNameTd + startTd + systemTd + - playersTd + costPrizesTds + ""; - } var row = $(rowstr); - row.append(actionsField); // Row for tournament queue waiting table var tablesRow = $(""); @@ -948,28 +934,33 @@ var GempLotrHallUI = Class.extend({ tablesRow.append(htmlTd); tablesRow.append("" + queue.getAttribute("start") + ""); tablesRow.append("" + queue.getAttribute("playerList") + ""); - var actionsFieldClone = actionsField.clone(true); - tablesRow.append(actionsFieldClone); - if (joined == "true") + tablesRow.append(actionsField); + if (joined == "true") { tablesRow.addClass("played"); + } else if (isWC) { + tablesRow.addClass("wc-events"); + } if (action == "add") { if(isWC) { $("table.wc-queues", this.tablesDiv) .append(row); - } else { - $("table.queues", this.tablesDiv) + } else if (isRecurring) { + $("table.recurringQueues", this.tablesDiv) + .append(row); + } else if (isScheduled) { + $("table.scheduledQueues", this.tablesDiv) .append(row); } - // Display queues with waiting players also as waiting tables - if (queue.getAttribute("playerCount") != 0 || isWC) { + // Display queues in waiting tables section + if (displayInWaitingTables) { $("table.waitingTables", this.tablesDiv) .append(tablesRow); } } else if (action == "update") { $(".queue" + id, this.tablesDiv).replaceWith(row); // Display queues with waiting players also as waiting tables - if (queue.getAttribute("playerCount") != 0) { + if (displayInWaitingTables) { var existingRow = $(".table" + id, this.tablesDiv); if (existingRow.length > 0) { // If the row exists, replace it @@ -978,7 +969,7 @@ var GempLotrHallUI = Class.extend({ // If the row does not exist, append it $("table.waitingTables", this.tablesDiv).append(tablesRow); } - } else if (queue.getAttribute("playerCount") == 0) { + } else { // Remove tournaments displayed as tables $(".table" + id, this.tablesDiv).remove(); } @@ -987,8 +978,8 @@ var GempLotrHallUI = Class.extend({ this.animateRowUpdate(".queue" + id); } else if (action == "remove") { + // Remove from both the Waiting Tables Section and Queue Sections $(".queue" + id, this.tablesDiv).remove(); - // Remove tournaments displayed as tables $(".table" + id, this.tablesDiv).remove(); } } @@ -1000,6 +991,13 @@ var GempLotrHallUI = Class.extend({ $('#wcQueuesHeader').show(); } + if($('.scheduledQueues tr').length <= 1) { + $('#scheduledQueuesHeader').hide(); + $('#scheduledQueuesContent').hide(); + } else { + $('#scheduledQueuesHeader').show(); + } + var tournaments = root.getElementsByTagName("tournament"); for (var i = 0; i < tournaments.length; i++) { var tournament = tournaments[i]; @@ -1125,28 +1123,24 @@ var GempLotrHallUI = Class.extend({ } } + // Tournament for for tournament table (not in Playing Tables Section) var rowstr = ""; - - if(isWC) { - rowstr += "" + tournament.getAttribute("format") + ""; - } else { - rowstr += "" + tournament.getAttribute("format") + ""; - if(type === "sealed") { - rowstr += "Sealed"; - } - else if (type === "solodraft") { - rowstr += "Solo Draft"; + rowstr += "" + tournament.getAttribute("format") + ""; + if(type === "sealed") { + rowstr += "Sealed"; + } + else if (type === "solodraft") { + rowstr += "Solo Draft"; - } - else if (type === "table_solodraft") { - rowstr += "Solo Table Draft"; - } - else if (type === "table_draft") { - rowstr += "Table Draft"; - } - else { - rowstr += "" + tournament.getAttribute("collection") + ""; - } + } + else if (type === "table_solodraft") { + rowstr += "Solo Table Draft"; + } + else if (type === "table_draft") { + rowstr += "Table Draft"; + } + else { + rowstr += "" + tournament.getAttribute("collection") + ""; } rowstr += "" + tournament.getAttribute("name") + "" + "" + tournament.getAttribute("system") + ""; @@ -1157,9 +1151,7 @@ var GempLotrHallUI = Class.extend({ } rowstr += "" + tournament.getAttribute("round") + "" + "
" + tournament.getAttribute("playerCount") + "
"; - var row = $(rowstr); - row.append(actionsField); // Row for tournament playing table var displayType = type; @@ -1175,21 +1167,29 @@ var GempLotrHallUI = Class.extend({ else if (type === "table_draft") { displayType = "Table Draft"; } + else if (type === "constructed") { + displayType = "Constructed"; + } var tablesRow = $(""); tablesRow.append("" + tournament.getAttribute("format") + ""); - tablesRow.append(" Tournament - " + displayType + " - " + tournament.getAttribute("name") + ""); + tablesRow.append("" + tournament.getAttribute("system") + " Tournament - " + displayType + " - " + tournament.getAttribute("name") + ""); if (tournament.hasAttribute("timeRemaining")) { tablesRow.append("" + tournament.getAttribute("stage") + " - " + tournament.getAttribute("timeRemaining") + ""); + } else if (tournament.getAttribute("stage") === "Playing Games") { + tablesRow.append("" + tournament.getAttribute("stage") + " - Round " + tournament.getAttribute("round") + ""); } else { tablesRow.append("" + tournament.getAttribute("stage") + ""); } tablesRow.append("" + tournament.getAttribute("playerList") + ""); - var actionsFieldClone = actionsField.clone(true); - tablesRow.append(actionsFieldClone); - if (joined == "true") + tablesRow.append(actionsField); + if (joined == "true") { tablesRow.addClass("played"); // red highlight + } else if (isWC) { + tablesRow.addClass("wc-events"); // yellow highlight + } if (action == "add") { + // Right now the only tournament section is for WC events if (isWC) { $("table.wc-events", this.tablesDiv) .append(row); @@ -1213,9 +1213,10 @@ var GempLotrHallUI = Class.extend({ } } else if (action == "update") { + // Update row in tournaments sections $(".tournament" + id, this.tablesDiv).replaceWith(row); - // Display tournaments also as playing tables + // Update row in playing tables section var existingRow = $(".table" + id, this.tablesDiv); if (existingRow.length > 0) { // If the row exists, replace it @@ -1228,8 +1229,8 @@ var GempLotrHallUI = Class.extend({ this.animateRowUpdate(".tournament" + id); } else if (action == "remove") { + // Remove tournament both from playing tables section and tournament sections $(".tournament" + id, this.tablesDiv).remove(); - // Remove tournaments displayed as tables $(".table" + id, this.tablesDiv).remove(); } } @@ -1426,7 +1427,8 @@ var GempLotrHallUI = Class.extend({ } } - $(".count", $(".eventHeader.queues")).html("(" + ($("tr", $("table.queues")).length - 1) + ")"); + $(".count", $(".eventHeader.recurringQueues")).html("(" + ($("tr", $("table.recurringQueues")).length - 1) + ")"); + $(".count", $(".eventHeader.scheduledQueues")).html("(" + ($("tr", $("table.scheduledQueues")).length - 1) + ")"); $(".count", $(".eventHeader.waitingTables")).html("(" + ($("tr", $("table.waitingTables")).length - 1) + ")"); $(".count", $(".eventHeader.playingTables")).html("(" + ($("tr", $("table.playingTables")).length - 1) + ")"); $(".count", $(".eventHeader.finishedTables")).html("(" + ($("tr", $("table.finishedTables")).length - 1) + ")"); diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallCommunicationChannel.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallCommunicationChannel.java index 6e9e88ccf..5b0e35d44 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallCommunicationChannel.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallCommunicationChannel.java @@ -107,7 +107,8 @@ public class HallCommunicationChannel implements LongPollableResource { @Override public void visitTournamentQueue(String tournamentQueueKey, int cost, String collectionName, String formatName, String type, String tournamentQueueName, String tournamentPrizes, String pairingDescription, String startCondition, int playerCount, String playerList, boolean playerSignedUp, - boolean joinable, boolean startable, int readyCheckSecsRemaining, boolean confirmedReadyCheck, boolean wc, String draftCode) { + boolean joinable, boolean startable, int readyCheckSecsRemaining, boolean confirmedReadyCheck, boolean wc, String draftCode, + boolean recurring, boolean scheduled, boolean displayInWaitingTables) { Map props = new HashMap<>(); props.put("cost", String.valueOf(cost)); props.put("collection", collectionName); @@ -128,6 +129,9 @@ public class HallCommunicationChannel implements LongPollableResource { if (draftCode != null) { props.put("draftCode", draftCode); } + props.put("recurring", String.valueOf(recurring)); + props.put("scheduled", String.valueOf(scheduled)); + props.put("displayInWaitingTables", String.valueOf(displayInWaitingTables)); tournamentQueuesOnServer.put(tournamentQueueKey, props); } 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 085ec2c18..4956a7d1b 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 @@ -15,7 +15,8 @@ public interface HallInfoVisitor { public void visitTournamentQueue(String tournamentQueueKey, int cost, String collectionName, String formatName, String type, String tournamentQueueName, String tournamentPrizes, String pairingDescription, String startCondition, int playerCount, String playerList, boolean playerSignedUp, boolean joinable, boolean startable, - int readyCheckSecsRemaining, boolean confirmedReadyCheck, boolean wc, String draftCode); + int readyCheckSecsRemaining, boolean confirmedReadyCheck, boolean wc, String draftCode, boolean recurring, boolean scheduled, + boolean displayInWaitingTables); public void visitTournament(String tournamentKey, String collectionName, String formatName, String tournamentName, String type, String pairingDescription, String tournamentStage, int round, int playerCount, String playerList, boolean playerInCompetition, boolean abandoned, boolean joinable, diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/ImmediateRecurringQueue.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/ImmediateRecurringQueue.java index 234d02bb2..22f321f94 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/ImmediateRecurringQueue.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/ImmediateRecurringQueue.java @@ -2,6 +2,7 @@ package com.gempukku.lotro.tournament; import com.gempukku.lotro.collection.CollectionsManager; +// Made obsolete by PlayerMadeQueue -> those queues have no longer support in ui and won't be displayed if empty public class ImmediateRecurringQueue extends AbstractTournamentQueue implements TournamentQueue { private final int _playerCap; private final int maxPlayers; @@ -43,4 +44,9 @@ public class ImmediateRecurringQueue extends AbstractTournamentQueue implements public boolean isJoinable() { return (maxPlayers < 0 || _players.size() < maxPlayers); } + + @Override + public boolean shouldBeDisplayedAsWaiting() { + return _players.size() > 0; + } } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/PlayerMadeQueue.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/PlayerMadeQueue.java index 6716dd83b..ead4cbe1b 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/PlayerMadeQueue.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/PlayerMadeQueue.java @@ -43,4 +43,9 @@ public class PlayerMadeQueue extends AbstractTournamentQueue implements Tourname public boolean isJoinable() { return (getInfo()._params.maximumPlayers < 0 || _players.size() < getInfo()._params.maximumPlayers) && !isReadyCheckTimerRunning(); } + + @Override + public boolean shouldBeDisplayedAsWaiting() { + return true; // Always display player made queues in waiting tables section + } } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/RecurringScheduledQueue.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/RecurringScheduledQueue.java index 4ae5145cd..d825cc8a0 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/RecurringScheduledQueue.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/RecurringScheduledQueue.java @@ -55,6 +55,12 @@ public class RecurringScheduledQueue extends AbstractTournamentQueue implements return ZonedDateTime.now().isAfter(_nextStart.minus(_signupTimeBeforeStart)) && (_maximumPlayers < 0 || _players.size() < _maximumPlayers); } + @Override + public boolean shouldBeDisplayedAsWaiting() { + // Display in waiting tables section 1 hour before start + return ZonedDateTime.now().isAfter(_nextStart.minus(_signupTimeBeforeStart)); + } + @Override public boolean process() throws SQLException, IOException { if (ZonedDateTime.now().isAfter(_nextStart)) { diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/ScheduledTournamentQueue.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/ScheduledTournamentQueue.java index c7dd774f3..f8265605c 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/ScheduledTournamentQueue.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/ScheduledTournamentQueue.java @@ -63,4 +63,13 @@ public class ScheduledTournamentQueue extends AbstractTournamentQueue implements } return DateUtils.Now().isAfter(_startTime.minus(window)) && (maximumPlayers < 0 || _players.size() < maximumPlayers); } + + @Override + public boolean shouldBeDisplayedAsWaiting() { + var window = _signupTimeBeforeStart; + if (isWC()) { + window = _wcSignupTimeBeforeStart; + } + return DateUtils.Now().isAfter(_startTime.minus(window)); + } } 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 18d960b8d..8e0489e2f 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 @@ -56,4 +56,6 @@ public interface TournamentQueue { boolean isWC(); String getDraftCode(); + + boolean shouldBeDisplayedAsWaiting(); } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentService.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentService.java index c072c4bde..3ccae9f1e 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentService.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentService.java @@ -159,7 +159,8 @@ public class TournamentService { formatLibrary.getFormat(queue.getFormatCode()).getName(), queue.getInfo().Parameters().type.toString(), queue.getTournamentQueueName(), queue.getPrizesDescription(), queue.getPairingDescription(), queue.getStartCondition(), queue.getPlayerCount(), queue.getPlayerList(), queue.isPlayerSignedUp(player.getName()), queue.isJoinable(), queue.isStartable(player.getName()), - queue.getSecondsRemainingForReadyCheck(), queue.hasConfirmedReadyCheck(player.getName()), queue.isWC(), queue.getDraftCode()); + queue.getSecondsRemainingForReadyCheck(), queue.hasConfirmedReadyCheck(player.getName()), queue.isWC(), queue.getDraftCode(), + queue instanceof RecurringScheduledQueue, queue instanceof ScheduledTournamentQueue, queue.shouldBeDisplayedAsWaiting()); } for (var entry : _activeTournaments.entrySet()) {