summaryrefslogtreecommitdiff
path: root/src/net/inventoryhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/inventoryhandler.cpp')
-rw-r--r--src/net/inventoryhandler.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/net/inventoryhandler.cpp b/src/net/inventoryhandler.cpp
index 3742d327..a48ed51c 100644
--- a/src/net/inventoryhandler.cpp
+++ b/src/net/inventoryhandler.cpp
@@ -28,6 +28,7 @@
#include "messagein.h"
#include "protocol.h"
+#include "../resources/iteminfo.h"
#include "../item.h"
#include "../localplayer.h"
@@ -94,6 +95,14 @@ void InventoryHandler::handleMessage(MessageIn *msg)
if (msg->readInt8()> 0) {
chatWindow->chatLog("Unable to pick up item", BY_SERVER);
} else {
+ ItemInfo *itemInfo = itemDb->getItemInfo(itemId);
+ if (itemInfo) {
+ chatWindow->chatLog("You picked up a " +
+ itemInfo->getName(), BY_SERVER);
+ } else {
+ chatWindow->chatLog("You picked up an unknown item",
+ BY_SERVER);
+ }
player_node->addInvItem(index, itemId, amount, equipType != 0);
}
break;