diff options
Diffstat (limited to 'src/gui/npcintegerdialog.cpp')
-rw-r--r-- | src/gui/npcintegerdialog.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gui/npcintegerdialog.cpp b/src/gui/npcintegerdialog.cpp index f91b42da..f6d788df 100644 --- a/src/gui/npcintegerdialog.cpp +++ b/src/gui/npcintegerdialog.cpp @@ -28,13 +28,16 @@ #include "../npc.h" +#include "../net/messageout.h" +#include "../net/protocol.h" + #include "../utils/gettext.h" #include "../utils/strprintf.h" extern NpcTextDialog *npcTextDialog; -NpcIntegerDialog::NpcIntegerDialog(): - Window(_("NPC Number Request")) +NpcIntegerDialog::NpcIntegerDialog(Network *network): + Window(_("NPC Number Request")), mNetwork(network) { mValueField = new IntTextField; @@ -104,7 +107,12 @@ void NpcIntegerDialog::action(const gcn::ActionEvent &event) if (finish) { setVisible(false); - current_npc->integerInput(mValueField->getValue()); + + MessageOut outMsg(mNetwork); + outMsg.writeInt16(CMSG_NPC_INT_RESPONSE); + outMsg.writeInt32(current_npc); + outMsg.writeInt32(mValueField->getValue()); + mValueField->reset(); } } |