diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-02-25 13:38:55 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-02-25 13:38:55 -0700 |
commit | f04a8713ffc83db8b3dc4a472b28aad25a2b2bd1 (patch) | |
tree | 1822aa7cecfbe4ef38b55216ab82b686e3b636c7 /src/net/buysellhandler.cpp | |
parent | 9673149ea3c28f42f38fc9989faf76d68e72bd20 (diff) | |
download | mana-client-f04a8713ffc83db8b3dc4a472b28aad25a2b2bd1.tar.gz mana-client-f04a8713ffc83db8b3dc4a472b28aad25a2b2bd1.tar.bz2 mana-client-f04a8713ffc83db8b3dc4a472b28aad25a2b2bd1.tar.xz mana-client-f04a8713ffc83db8b3dc4a472b28aad25a2b2bd1.zip |
Fix NPC handling to not need a handle on the NPC
The Being ID is used instead, as that is all that was ever really
needed.
Diffstat (limited to 'src/net/buysellhandler.cpp')
-rw-r--r-- | src/net/buysellhandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/buysellhandler.cpp b/src/net/buysellhandler.cpp index a2442d70..714bc0ea 100644 --- a/src/net/buysellhandler.cpp +++ b/src/net/buysellhandler.cpp @@ -65,7 +65,7 @@ void BuySellHandler::handleMessage(MessageIn *msg) sellDialog->setVisible(false); sellDialog->reset(); buySellDialog->setVisible(true); - current_npc = dynamic_cast<NPC*>(beingManager->findBeing(msg->readInt32())); + current_npc = msg->readInt32(); break; case SMSG_NPC_BUY: @@ -107,7 +107,7 @@ void BuySellHandler::handleMessage(MessageIn *msg) } else { chatWindow->chatLog(_("Nothing to sell"), BY_SERVER); - if (current_npc) current_npc->handleDeath(); + current_npc = 0; } break; |