mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
* GUI: fixed that some choose dialogs doesn't show possible targets (example: Haunting Voyage, #8223);
This commit is contained in:
parent
bf67c4c6b4
commit
912e695f40
1 changed files with 6 additions and 1 deletions
|
|
@ -614,6 +614,8 @@ public class HumanPlayer extends PlayerImpl {
|
||||||
abilityControllerId = target.getAbilityController();
|
abilityControllerId = target.getAbilityController();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Map<String, Serializable> options = new HashMap<>();
|
||||||
|
|
||||||
while (canRespond()) {
|
while (canRespond()) {
|
||||||
Set<UUID> possibleTargets = target.possibleTargets(source == null ? null : source.getSourceId(), abilityControllerId, game);
|
Set<UUID> possibleTargets = target.possibleTargets(source == null ? null : source.getSourceId(), abilityControllerId, game);
|
||||||
boolean required = target.isRequired(source != null ? source.getSourceId() : null, game);
|
boolean required = target.isRequired(source != null ? source.getSourceId() : null, game);
|
||||||
|
|
@ -622,11 +624,14 @@ public class HumanPlayer extends PlayerImpl {
|
||||||
required = false;
|
required = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
java.util.List<UUID> chosen = target.getTargets();
|
||||||
|
options.put("chosen", (Serializable) chosen);
|
||||||
|
|
||||||
updateGameStatePriority("chooseTarget", game);
|
updateGameStatePriority("chooseTarget", game);
|
||||||
prepareForResponse(game);
|
prepareForResponse(game);
|
||||||
if (!isExecutingMacro()) {
|
if (!isExecutingMacro()) {
|
||||||
game.fireSelectTargetEvent(getId(), new MessageToClient(target.getMessage(), getRelatedObjectName(source, game)),
|
game.fireSelectTargetEvent(getId(), new MessageToClient(target.getMessage(), getRelatedObjectName(source, game)),
|
||||||
possibleTargets, required, getOptions(target, null));
|
possibleTargets, required, getOptions(target, options));
|
||||||
}
|
}
|
||||||
waitForResponse(game);
|
waitForResponse(game);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue