summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/net/playerhandler.cpp11
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6cfedec6..81c249cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
* src/inventory.cpp: Avoid stacking equipment other than arrows. Based on
similar fix in inventoryhandler.
+ * src/gui/trade.cpp: Text fix, z => GP.
+ * src/net/playerhandler.cpp: When picking up GP from trade or quest,
+ tell the user in the chat window like with items.
2008-04-24 Dennis Friis <peavey@placid.dk>
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();