diff options
Diffstat (limited to 'src/net/npchandler.cpp')
-rw-r--r-- | src/net/npchandler.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp index b633835c..4f3c4354 100644 --- a/src/net/npchandler.cpp +++ b/src/net/npchandler.cpp @@ -19,16 +19,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "npchandler.h" - #include "messagein.h" +#include "npchandler.h" #include "protocol.h" #include "../beingmanager.h" +#include "../localplayer.h" #include "../npc.h" -#include "../gui/npclistdialog.h" #include "../gui/npc_text.h" +#include "../gui/npclistdialog.h" extern NpcListDialog *npcListDialog; extern NpcTextDialog *npcTextDialog; @@ -54,6 +54,7 @@ void NPCHandler::handleMessage(MessageIn *msg) case SMSG_NPC_CHOICE: msg->readInt16(); // length id = msg->readInt32(); + player_node->setAction(LocalPlayer::STAND); current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id)); npcListDialog->parseItems(msg->readString(msg->getLength() - 8)); npcListDialog->setVisible(true); @@ -62,15 +63,15 @@ void NPCHandler::handleMessage(MessageIn *msg) case SMSG_NPC_MESSAGE: msg->readInt16(); // length id = msg->readInt32(); + player_node->setAction(LocalPlayer::STAND); current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id)); npcTextDialog->addText(msg->readString(msg->getLength() - 8)); npcListDialog->setVisible(false); npcTextDialog->setVisible(true); break; - case SMSG_NPC_CLOSE: + case SMSG_NPC_CLOSE: id = msg->readInt32(); - dynamic_cast<NPC*>(beingManager->findBeing(id)); if (current_npc == dynamic_cast<NPC*>(beingManager->findBeing(id))) current_npc = NULL; break; |