summaryrefslogtreecommitdiff
path: root/src/net/npchandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-11 15:47:35 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-11 15:47:35 +0000
commit8da32105732949b4b0273c718d118bcfae70a1c9 (patch)
tree0a354974d48268cfaafcdb1e06b498fa26a59c1e /src/net/npchandler.cpp
parentf9ce4e302cb3ed203d89a7a18e10b7ad4f11519c (diff)
downloadmana-client-8da32105732949b4b0273c718d118bcfae70a1c9.tar.gz
mana-client-8da32105732949b4b0273c718d118bcfae70a1c9.tar.bz2
mana-client-8da32105732949b4b0273c718d118bcfae70a1c9.tar.xz
mana-client-8da32105732949b4b0273c718d118bcfae70a1c9.zip
Merged 0.0 changes from revision 2825 to 2898 to trunk.
Diffstat (limited to 'src/net/npchandler.cpp')
-rw-r--r--src/net/npchandler.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp
index 9c89e71f..02204a84 100644
--- a/src/net/npchandler.cpp
+++ b/src/net/npchandler.cpp
@@ -49,20 +49,22 @@ NPCHandler::NPCHandler()
void NPCHandler::handleMessage(MessageIn &msg)
{
+ int id;
+
switch (msg.getId())
{
case SMSG_NPC_CHOICE:
msg.readShort(); // length
- current_npc = dynamic_cast<NPC*>(
- beingManager->findBeing(msg.readLong()));
+ id = msg.readLong();
+ current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
npcListDialog->parseItems(msg.readString(msg.getLength() - 8));
npcListDialog->setVisible(true);
break;
case SMSG_NPC_MESSAGE:
msg.readShort(); // length
- current_npc = dynamic_cast<NPC*>(
- beingManager->findBeing(msg.readLong()));
+ id = msg.readLong();
+ current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
npcTextDialog->addText(msg.readString(msg.getLength() - 8));
npcListDialog->setVisible(false);
npcTextDialog->setVisible(true);