Fixed not working response result from key-value choice dialogs

This commit is contained in:
Oleg Agafonov 2018-01-04 00:32:17 +04:00
parent 3dda5712db
commit d1475f28b4

View file

@ -371,8 +371,13 @@ public class HumanPlayer extends PlayerImpl {
game.fireChooseChoiceEvent(playerId, choice); game.fireChooseChoiceEvent(playerId, choice);
} }
waitForResponse(game); waitForResponse(game);
if (response.getString() != null) { String val = response.getString();
choice.setChoice(response.getString()); if (val != null) {
if(choice.isKeyChoice()){
choice.setChoiceByKey(val);
} else {
choice.setChoice(val);
}
return true; return true;
} else if (!choice.isRequired()) { } else if (!choice.isRequired()) {
return false; return false;