summaryrefslogtreecommitdiff
path: root/src/net/npchandler.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-11-06 16:02:12 +0000
committerDavid Athay <ko2fan@gmail.com>2008-11-06 16:02:12 +0000
commit2e7a4d66bd9ce5077b7a0062aff856d669e05b97 (patch)
treefbe2623101ca6fa849d9a7f739f73b40f34d1abb /src/net/npchandler.cpp
parent222db257d7de12f1077eb43d448d6b357d4642e7 (diff)
downloadmana-client-2e7a4d66bd9ce5077b7a0062aff856d669e05b97.tar.gz
mana-client-2e7a4d66bd9ce5077b7a0062aff856d669e05b97.tar.bz2
mana-client-2e7a4d66bd9ce5077b7a0062aff856d669e05b97.tar.xz
mana-client-2e7a4d66bd9ce5077b7a0062aff856d669e05b97.zip
Added interface for sending post.
Diffstat (limited to 'src/net/npchandler.cpp')
-rw-r--r--src/net/npchandler.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp
index 58c2c9ed..4b08ed8d 100644
--- a/src/net/npchandler.cpp
+++ b/src/net/npchandler.cpp
@@ -30,15 +30,18 @@
#include "../npc.h"
#include "../gui/npclistdialog.h"
+#include "../gui/npcpostdialog.h"
#include "../gui/npc_text.h"
extern NpcListDialog *npcListDialog;
extern NpcTextDialog *npcTextDialog;
+extern NpcPostDialog *npcPostDialog;
NPCHandler::NPCHandler()
{
static const Uint16 _messages[] = {
GPMSG_NPC_CHOICE,
+ GPMSG_NPC_POST,
GPMSG_NPC_MESSAGE,
GPMSG_NPC_ERROR,
0
@@ -67,12 +70,19 @@ void NPCHandler::handleMessage(MessageIn &msg)
npcListDialog->setVisible(true);
break;
+ case GPMSG_NPC_POST:
+ npcTextDialog->setVisible(false);
+ npcPostDialog->clear();
+ npcPostDialog->setVisible(true);
+ break;
+
case GPMSG_NPC_ERROR:
current_npc = NULL;
case GPMSG_NPC_MESSAGE:
npcTextDialog->addText(msg.readString(msg.getUnreadLength()));
npcListDialog->setVisible(false);
npcTextDialog->setVisible(true);
+ npcPostDialog->setVisible(false);
break;
}
}