diff options
Diffstat (limited to 'src/net/playerhandler.cpp')
-rw-r--r-- | src/net/playerhandler.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp index 9c34cec6..fc3506fb 100644 --- a/src/net/playerhandler.cpp +++ b/src/net/playerhandler.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 @@ -28,6 +27,7 @@ #include "../localplayer.h" #include "../log.h" #include "../npc.h" +#include "../units.h" #include "../gui/buy.h" #include "../gui/chat.h" @@ -39,7 +39,7 @@ #include "../gui/skill.h" #include "../gui/viewport.h" -#include "../utils/tostring.h" +#include "../utils/stringutils.h" #include "../utils/gettext.h" // TODO Move somewhere else @@ -86,7 +86,7 @@ namespace { buyDialog->setVisible(false); sellDialog->setVisible(false); buySellDialog->setVisible(false); - current_npc = 0; + if (current_npc) current_npc->handleDeath(); } } deathListener; } @@ -140,7 +140,7 @@ void PlayerHandler::handleMessage(MessageIn *msg) // Switch the actual map, deleting the previous one if necessary engine->changeMap(mapPath); - current_npc = 0; + if (current_npc) current_npc->handleDeath(); float scrollOffsetX = 0.0f; float scrollOffsetY = 0.0f; @@ -282,8 +282,8 @@ void PlayerHandler::handleMessage(MessageIn *msg) player_node->mGp = msg->readInt32(); if (player_node->mGp > curGp) chatWindow->chatLog(_("You picked up ") + - toString(player_node->mGp - curGp) + " GP", - BY_SERVER); + Units::formatCurrency(player_node->mGp + - curGp), BY_SERVER); } break; case 0x0016: |