diff options
Diffstat (limited to 'src/net/npchandler.cpp')
-rw-r--r-- | src/net/npchandler.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp index 60a77af1..69346b65 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 @@ -73,13 +72,22 @@ void NPCHandler::handleMessage(MessageIn *msg) case SMSG_NPC_CLOSE: id = msg->readInt32(); - if (current_npc == id) - current_npc = 0; - npcTextDialog->closeDialog(id); + // 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->closeDialog(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 +95,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; |