diff options
author | Dennis Friis <peavey@placid.dk> | 2008-04-26 17:37:03 +0000 |
---|---|---|
committer | Dennis Friis <peavey@placid.dk> | 2008-04-26 17:37:03 +0000 |
commit | 095b6e3d86fe30558abfeff084171e405a1f22d9 (patch) | |
tree | e5bd4a65249a6a937c6315d871cfd8d9561b7865 /src/net/playerhandler.cpp | |
parent | 1edab2457fa2dbf67ced0bc871e02857a58f5aa3 (diff) | |
download | mana-095b6e3d86fe30558abfeff084171e405a1f22d9.tar.gz mana-095b6e3d86fe30558abfeff084171e405a1f22d9.tar.bz2 mana-095b6e3d86fe30558abfeff084171e405a1f22d9.tar.xz mana-095b6e3d86fe30558abfeff084171e405a1f22d9.zip |
When picking up GP from trade or quest, tell the user in the chat window like with items.
Diffstat (limited to 'src/net/playerhandler.cpp')
-rw-r--r-- | src/net/playerhandler.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp index b3355ef8..2502c144 100644 --- a/src/net/playerhandler.cpp +++ b/src/net/playerhandler.cpp @@ -30,6 +30,7 @@ #include "../localplayer.h" #include "../log.h" #include "../npc.h" +#include "../utils/tostring.h" #include "../gui/buy.h" #include "../gui/chat.h" @@ -208,8 +209,14 @@ void PlayerHandler::handleMessage(MessageIn *msg) case 0x0002: player_node->mJobXp = msg->readInt32(); break; - case 0x0014: - player_node->mGp = msg->readInt32(); + case 0x0014: { + Uint32 curGp = player_node->mGp; + player_node->mGp = msg->readInt32(); + if (player_node->mGp > curGp) + chatWindow->chatLog("You picked up " + + toString(player_node->mGp - curGp) + " GP", + BY_SERVER); + } break; case 0x0016: player_node->mXpForNextLevel = msg->readInt32(); |