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.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp
index 1067a57e..2ecd4726 100644
--- a/src/net/npchandler.cpp
+++ b/src/net/npchandler.cpp
@@ -1,9 +1,8 @@
/*
- * Aethyra
+ * The Mana World
* Copyright (C) 2004 The Mana World Development Team
*
- * This file is part of Aethyra based on original code
- * from The Mana World.
+ * This file is part of The Mana World.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -74,12 +73,22 @@ void NPCHandler::handleMessage(MessageIn *msg)
case SMSG_NPC_CLOSE:
id = msg->readInt32();
- if (current_npc == id)
- current_npc = 0;
+ // If we're talking to that NPC, show the close button
+ if (id == current_npc)
+ npcTextDialog->showCloseButton();
+ // Otherwise, move on as an empty dialog doesn't help
+ else
+ npcTextDialog->nextDialog(id);
break;
case SMSG_NPC_NEXT:
- // Next button in NPC dialog, currently unused
+ id = msg->readInt32();
+ // If we're talking to that NPC, show the next button
+ if (id == current_npc)
+ npcTextDialog->showNextButton();
+ // Otherwise, move on as an empty dialog doesn't help
+ else
+ npcTextDialog->nextDialog(id);
break;
case SMSG_NPC_INT_INPUT:
@@ -87,6 +96,7 @@ void NPCHandler::handleMessage(MessageIn *msg)
current_npc = msg->readInt32();
player_node->setAction(LocalPlayer::STAND);
npcIntegerDialog->setRange(0, 2147483647);
+ npcIntegerDialog->setDefaultValue(0);
npcIntegerDialog->setVisible(true);
npcIntegerDialog->requestFocus();
break;