summaryrefslogtreecommitdiff
path: root/src/gui/npcintegerdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/npcintegerdialog.cpp')
-rw-r--r--src/gui/npcintegerdialog.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gui/npcintegerdialog.cpp b/src/gui/npcintegerdialog.cpp
index 896f3380..a7ae2748 100644
--- a/src/gui/npcintegerdialog.cpp
+++ b/src/gui/npcintegerdialog.cpp
@@ -29,13 +29,22 @@
#include "../npc.h"
#include "../net/messageout.h"
-#include "../net/protocol.h"
+#ifdef EATHENA_SUPPORT
+#include "../net/ea/protocol.h"
+#endif
#include "../utils/gettext.h"
#include "../utils/strprintf.h"
-NpcIntegerDialog::NpcIntegerDialog(Network *network):
- Window(_("NPC Number Request")), mNetwork(network)
+#ifdef TMWSERV_SUPPORT
+NpcIntegerDialog::NpcIntegerDialog()
+#else
+NpcIntegerDialog::NpcIntegerDialog(Network *network)
+#endif
+ : Window(_("NPC Number Request"))
+#ifdef EATHENA_SUPPORT
+ , mNetwork(network)
+#endif
{
setWindowName("NPCInteger");
mValueField = new IntTextField;
@@ -117,10 +126,12 @@ void NpcIntegerDialog::action(const gcn::ActionEvent &event)
setVisible(false);
NPC::isTalking = false;
+#ifdef EATHENA_SUPPORT
MessageOut outMsg(mNetwork);
outMsg.writeInt16(CMSG_NPC_INT_RESPONSE);
outMsg.writeInt32(current_npc);
outMsg.writeInt32(mValueField->getValue());
+#endif
mValueField->reset();
}