summaryrefslogtreecommitdiff
path: root/src/net/npchandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/npchandler.cpp')
-rw-r--r--src/net/npchandler.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp
index 405217bb..2ecd4726 100644
--- a/src/net/npchandler.cpp
+++ b/src/net/npchandler.cpp
@@ -19,6 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <SDL_types.h>
+
#include "messagein.h"
#include "npchandler.h"
#include "protocol.h"
@@ -32,11 +34,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[] = {
@@ -53,7 +50,7 @@ NPCHandler::NPCHandler()
void NPCHandler::handleMessage(MessageIn *msg)
{
- int id;
+ Uint32 id;
switch (msg->getId())
{
@@ -63,6 +60,7 @@ void NPCHandler::handleMessage(MessageIn *msg)
player_node->setAction(LocalPlayer::STAND);
npcListDialog->parseItems(msg->readString(msg->getLength() - 8));
npcListDialog->setVisible(true);
+ npcListDialog->requestFocus();
break;
case SMSG_NPC_MESSAGE:
@@ -70,7 +68,6 @@ void NPCHandler::handleMessage(MessageIn *msg)
current_npc = msg->readInt32();
player_node->setAction(LocalPlayer::STAND);
npcTextDialog->addText(msg->readString(msg->getLength() - 8));
- npcListDialog->setVisible(false);
npcTextDialog->setVisible(true);
break;