diff options
author | Ira Rice <irarice@gmail.com> | 2009-02-24 23:03:31 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-24 23:03:31 -0700 |
commit | a1e483913672e55704e8fbafeff5ea0ccc0c9b07 (patch) | |
tree | 47cd4487c4b3e14d3bbb1b94c25cef4c55b10ef3 /src/net | |
parent | e85269ffe1fe91f5cf44ccfec01252343643ef1d (diff) | |
download | mana-a1e483913672e55704e8fbafeff5ea0ccc0c9b07.tar.gz mana-a1e483913672e55704e8fbafeff5ea0ccc0c9b07.tar.bz2 mana-a1e483913672e55704e8fbafeff5ea0ccc0c9b07.tar.xz mana-a1e483913672e55704e8fbafeff5ea0ccc0c9b07.zip |
Cleaned up some code, as well as removed redundant talk client requesting
(which would happen from using the keyboard instead of the mouse).
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/npchandler.cpp | 7 | ||||
-rw-r--r-- | src/net/playerhandler.cpp | 9 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp index 8425a215..94e145b4 100644 --- a/src/net/npchandler.cpp +++ b/src/net/npchandler.cpp @@ -33,11 +33,6 @@ #include "../gui/npclistdialog.h" #include "../gui/npcstringdialog.h" -extern NpcIntegerDialog *npcIntegerDialog; -extern NpcListDialog *npcListDialog; -extern NpcTextDialog *npcTextDialog; -extern NpcStringDialog *npcStringDialog; - NPCHandler::NPCHandler() { static const Uint16 _messages[] = { @@ -81,10 +76,12 @@ void NPCHandler::handleMessage(MessageIn *msg) id = msg->readInt32(); if (current_npc == dynamic_cast<NPC*>(beingManager->findBeing(id))) current_npc = NULL; + NPC::mTalking = false; break; case SMSG_NPC_NEXT: // Next button in NPC dialog, currently unused + NPC::mTalking = false; break; case SMSG_NPC_INT_INPUT: diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp index bce53ae9..c1e0d033 100644 --- a/src/net/playerhandler.cpp +++ b/src/net/playerhandler.cpp @@ -32,8 +32,10 @@ #include "../gui/buy.h" #include "../gui/chat.h" #include "../gui/gui.h" -#include "../gui/npclistdialog.h" #include "../gui/npc_text.h" +#include "../gui/npcintegerdialog.h" +#include "../gui/npclistdialog.h" +#include "../gui/npcstringdialog.h" #include "../gui/ok_dialog.h" #include "../gui/sell.h" #include "../gui/skill.h" @@ -46,8 +48,6 @@ OkDialog *weightNotice = NULL; OkDialog *deathNotice = NULL; -extern NpcListDialog *npcListDialog; -extern NpcTextDialog *npcTextDialog; extern BuyDialog *buyDialog; extern SellDialog *sellDialog; extern Window *buySellDialog; @@ -81,7 +81,10 @@ namespace { { player_node->revive(); deathNotice = NULL; + npcIntegerDialog->setVisible(false); npcListDialog->setVisible(false); + npcStringDialog->setVisible(false); + npcTextDialog->clearText(); npcTextDialog->setVisible(false); buyDialog->setVisible(false); sellDialog->setVisible(false); |