diff options
Diffstat (limited to 'src/gui/npcstringdialog.cpp')
-rw-r--r-- | src/gui/npcstringdialog.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gui/npcstringdialog.cpp b/src/gui/npcstringdialog.cpp index c2379e7a..c84de015 100644 --- a/src/gui/npcstringdialog.cpp +++ b/src/gui/npcstringdialog.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" -NpcStringDialog::NpcStringDialog(Network *network): - Window(_("NPC Text Request")), mNetwork(network) +#ifdef TMWSERV_SUPPORT +NpcStringDialog::NpcStringDialog() +#else +NpcStringDialog::NpcStringDialog(Network *network) +#endif + : Window(_("NPC Text Request")) +#ifdef EATHENA_SUPPORT + , mNetwork(network) +#endif { setWindowName("NPCString"); mValueField = new TextField(""); @@ -85,12 +94,14 @@ void NpcStringDialog::action(const gcn::ActionEvent &event) std::string text = mValueField->getText(); mValueField->setText(""); +#ifdef EATHENA_SUPPORT MessageOut outMsg(mNetwork); outMsg.writeInt16(CMSG_NPC_STR_RESPONSE); outMsg.writeInt16(text.length() + 9); outMsg.writeInt32(current_npc); outMsg.writeString(text, text.length()); outMsg.writeInt8(0); +#endif } bool NpcStringDialog::isInputFocused() |