summaryrefslogtreecommitdiff
path: root/src/net/npchandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-03 17:00:07 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-03 17:00:07 +0000
commit061b9e817ffe73acca163510b276e6ca7dd8f6c2 (patch)
treec1488381a9a62520f94cdb353bd5bd12ebc1b699 /src/net/npchandler.cpp
parent092bf185fc056338bcde2749a304e576edf342fd (diff)
downloadmana-061b9e817ffe73acca163510b276e6ca7dd8f6c2.tar.gz
mana-061b9e817ffe73acca163510b276e6ca7dd8f6c2.tar.bz2
mana-061b9e817ffe73acca163510b276e6ca7dd8f6c2.tar.xz
mana-061b9e817ffe73acca163510b276e6ca7dd8f6c2.zip
Made NPC names visible. Windows are now invisible by default.
Diffstat (limited to 'src/net/npchandler.cpp')
-rw-r--r--src/net/npchandler.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp
index a803710e..da21b2a5 100644
--- a/src/net/npchandler.cpp
+++ b/src/net/npchandler.cpp
@@ -49,18 +49,22 @@ NPCHandler::NPCHandler()
void NPCHandler::handleMessage(MessageIn *msg)
{
+ int id;
+
switch (msg->getId())
{
case SMSG_NPC_CHOICE:
msg->readInt16(); // length
- current_npc = dynamic_cast<NPC*>(beingManager->findBeing(msg->readInt32()));
+ id = msg->readInt32();
+ current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
npcListDialog->parseItems(msg->readString(msg->getLength() - 8));
npcListDialog->setVisible(true);
break;
case SMSG_NPC_MESSAGE:
msg->readInt16(); // length
- current_npc = dynamic_cast<NPC*>(beingManager->findBeing(msg->readInt32()));
+ id = msg->readInt32();
+ current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
npcTextDialog->addText(msg->readString(msg->getLength() - 8));
npcListDialog->setVisible(false);
npcTextDialog->setVisible(true);