mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 04:22:01 -08:00
fixed issue 255
This commit is contained in:
parent
abb58c4008
commit
bbb4f8a346
8 changed files with 32 additions and 8 deletions
|
|
@ -381,7 +381,7 @@ public class TableController {
|
|||
User user = UserManager.getInstance().getUser(entry.getKey());
|
||||
int remaining = (int) futureTimeout.getDelay(TimeUnit.SECONDS);
|
||||
if (user != null)
|
||||
user.sideboard(deck, table.getId(), remaining);
|
||||
user.sideboard(deck, table.getId(), remaining, options.isLimited());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -394,6 +394,10 @@ public class TableController {
|
|||
public void construct() {
|
||||
table.construct();
|
||||
}
|
||||
|
||||
public MatchOptions getOptions() {
|
||||
return options;
|
||||
}
|
||||
|
||||
public void endGame() {
|
||||
UUID choosingPlayerId = match.getChooser();
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ public class User {
|
|||
fireCallback(new ClientCallback("startTournament", tournamentId, new TableClientMessage(tournamentId, playerId)));
|
||||
}
|
||||
|
||||
public void sideboard(final Deck deck, final UUID tableId, final int time) {
|
||||
fireCallback(new ClientCallback("sideboard", tableId, new TableClientMessage(deck, tableId, time)));
|
||||
public void sideboard(final Deck deck, final UUID tableId, final int time, boolean limited) {
|
||||
fireCallback(new ClientCallback("sideboard", tableId, new TableClientMessage(deck, tableId, time, limited)));
|
||||
sideboarding.put(tableId, deck);
|
||||
}
|
||||
|
||||
|
|
@ -203,8 +203,8 @@ public class User {
|
|||
entry.getValue().construct(0);
|
||||
}
|
||||
for (Entry<UUID, Deck> entry: sideboarding.entrySet()) {
|
||||
int remaining = TableManager.getInstance().getController(entry.getKey()).getRemainingTime();
|
||||
sideboard(entry.getValue(), entry.getKey(), remaining);
|
||||
TableController controller = TableManager.getInstance().getController(entry.getKey());
|
||||
sideboard(entry.getValue(), entry.getKey(), controller.getRemainingTime(), controller.getOptions().isLimited());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue