summaryrefslogtreecommitdiff
path: root/src/gui/npclistdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/npclistdialog.cpp')
-rw-r--r--src/gui/npclistdialog.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/npclistdialog.cpp b/src/gui/npclistdialog.cpp
index 8349cb4a..fc7d2979 100644
--- a/src/gui/npclistdialog.cpp
+++ b/src/gui/npclistdialog.cpp
@@ -31,13 +31,16 @@
#include "../npc.h"
+#include "../net/messageout.h"
+#include "../net/protocol.h"
+
#include "../utils/gettext.h"
#include "../utils/strprintf.h"
extern NpcTextDialog *npcTextDialog;
-NpcListDialog::NpcListDialog():
- Window(_("NPC"))
+NpcListDialog::NpcListDialog(Network *network):
+ Window(_("NPC")), mNetwork(network)
{
setResizable(true);
@@ -115,7 +118,10 @@ void NpcListDialog::action(const gcn::ActionEvent &event)
{
setVisible(false);
reset();
- current_npc->dialogChoice(choice);
+ MessageOut outMsg(mNetwork);
+ outMsg.writeInt16(CMSG_NPC_LIST_CHOICE);
+ outMsg.writeInt32(current_npc);
+ outMsg.writeInt8(choice);
}
}