GUI related improves:

* GUI: fixed that choose triggers/piles dialog doesn't close correctly before cast mode choose (#8225);
* GUI: fixed that some choose dialogs doesn't update battlefield state (example: choose amount, choose mana);
* Game: fixed duplicated json logs at the game's end;
This commit is contained in:
Oleg Agafonov 2021-09-20 02:17:22 +04:00
parent f31781e4a4
commit 46081d9185
11 changed files with 212 additions and 171 deletions

View file

@ -810,7 +810,7 @@ public class GameController implements GameCallback {
}
private synchronized void chooseAbility(UUID playerId, final String objectName, final List<? extends Ability> choices, String message) throws MageException {
perform(playerId, playerId1 -> getGameSession(playerId1).chooseAbility(new AbilityPickerView(objectName, choices, message)));
perform(playerId, playerId1 -> getGameSession(playerId1).chooseAbility(new AbilityPickerView(getGameView(playerId), objectName, choices, message)));
}
private synchronized void choosePile(UUID playerId, final String message, final List<? extends Card> pile1, final List<? extends Card> pile2) throws MageException {
@ -818,7 +818,7 @@ public class GameController implements GameCallback {
}
private synchronized void chooseMode(UUID playerId, final Map<UUID, String> modes, final String message) throws MageException {
perform(playerId, playerId1 -> getGameSession(playerId1).chooseAbility(new AbilityPickerView(modes, message)));
perform(playerId, playerId1 -> getGameSession(playerId1).chooseAbility(new AbilityPickerView(getGameView(playerId), modes, message)));
}
private synchronized void chooseChoice(UUID playerId, final Choice choice) throws MageException {