diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-12-03 17:00:07 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-12-03 17:00:07 +0000 |
commit | 061b9e817ffe73acca163510b276e6ca7dd8f6c2 (patch) | |
tree | c1488381a9a62520f94cdb353bd5bd12ebc1b699 /src/net/npchandler.cpp | |
parent | 092bf185fc056338bcde2749a304e576edf342fd (diff) | |
download | mana-client-061b9e817ffe73acca163510b276e6ca7dd8f6c2.tar.gz mana-client-061b9e817ffe73acca163510b276e6ca7dd8f6c2.tar.bz2 mana-client-061b9e817ffe73acca163510b276e6ca7dd8f6c2.tar.xz mana-client-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.cpp | 8 |
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); |