mirror of
https://github.com/correl/mage.git
synced 2024-11-24 19:19:56 +00:00
Fixed not working response result from key-value choice dialogs
This commit is contained in:
parent
3dda5712db
commit
d1475f28b4
1 changed files with 7 additions and 2 deletions
|
@ -371,8 +371,13 @@ public class HumanPlayer extends PlayerImpl {
|
|||
game.fireChooseChoiceEvent(playerId, choice);
|
||||
}
|
||||
waitForResponse(game);
|
||||
if (response.getString() != null) {
|
||||
choice.setChoice(response.getString());
|
||||
String val = response.getString();
|
||||
if (val != null) {
|
||||
if(choice.isKeyChoice()){
|
||||
choice.setChoiceByKey(val);
|
||||
} else {
|
||||
choice.setChoice(val);
|
||||
}
|
||||
return true;
|
||||
} else if (!choice.isRequired()) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue