From d1475f28b479197f62903e12df2fd1f280a3b9df Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Thu, 4 Jan 2018 00:32:17 +0400 Subject: [PATCH] Fixed not working response result from key-value choice dialogs --- .../src/mage/player/human/HumanPlayer.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index 97fa23bab8..2218b7bf1a 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -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;