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);
}
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;