summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-16 14:41:24 +0000
committerJared Adams <jaxad0127@gmail.com>2009-02-16 14:43:19 +0000
commit9dfc4ea2f30f43fb5ffd239b90b2a7259fbe0330 (patch)
tree37b2da3fc74946fb180b8e60d6e32b1190775a3f /src/net
parenta1a5ebb9ef14e013ae63a71c2c28609f2a65cdaa (diff)
downloadmana-9dfc4ea2f30f43fb5ffd239b90b2a7259fbe0330.tar.gz
mana-9dfc4ea2f30f43fb5ffd239b90b2a7259fbe0330.tar.bz2
mana-9dfc4ea2f30f43fb5ffd239b90b2a7259fbe0330.tar.xz
mana-9dfc4ea2f30f43fb5ffd239b90b2a7259fbe0330.zip
Add next/close buttons for NPCs
And keep the text dialog open for the whole transaction, logging user input and keep a full record of text from the NPC (for the current transaction only).
Diffstat (limited to 'src/net')
-rw-r--r--src/net/npchandler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp
index ea03537f..3080bcf8 100644
--- a/src/net/npchandler.cpp
+++ b/src/net/npchandler.cpp
@@ -78,12 +78,15 @@ void NPCHandler::handleMessage(MessageIn *msg)
case SMSG_NPC_CLOSE:
id = msg->readInt32();
- if (current_npc == dynamic_cast<NPC*>(beingManager->findBeing(id)))
- current_npc = NULL;
+ current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
+ npcTextDialog->showCloseButton();
break;
case SMSG_NPC_NEXT:
// Next button in NPC dialog, currently unused
+ id = msg->readInt32();
+ current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
+ npcTextDialog->showNextButton();
break;
case SMSG_NPC_INT_INPUT: