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.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp
index 8425a215..a6dc216b 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
@@ -79,12 +78,15 @@ void NPCHandler::handleMessage(MessageIn *msg)
case SMSG_NPC_CLOSE:
id = msg->readInt32();
- if (current_npc == dynamic_cast<NPC*>(beingManager->findBeing(id)))
- current_npc = NULL;
+ current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
+ npcTextDialog->showCloseButton();
break;
case SMSG_NPC_NEXT:
// Next button in NPC dialog, currently unused
+ id = msg->readInt32();
+ current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
+ npcTextDialog->showNextButton();
break;
case SMSG_NPC_INT_INPUT:
@@ -92,6 +94,7 @@ void NPCHandler::handleMessage(MessageIn *msg)
id = msg->readInt32();
current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
npcIntegerDialog->setRange(0, 2147483647);
+ npcIntegerDialog->setDefaultValue(0);
npcIntegerDialog->setVisible(true);
npcIntegerDialog->requestFocus();
break;