From 391203d83ed7a72b54fb7d7c72dbe35db14f0ea9 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer <bjorn@lindeijer.nl> Date: Mon, 28 Aug 2006 23:04:08 +0000 Subject: Merged trunk development between revisions 2530 and 2618 to the 0.1.0 branch. --- src/net/inventoryhandler.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/net/inventoryhandler.cpp') diff --git a/src/net/inventoryhandler.cpp b/src/net/inventoryhandler.cpp index cb1883b0..c4192bc5 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" @@ -91,6 +92,14 @@ void InventoryHandler::handleMessage(MessageIn &msg) if (msg.readByte()> 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; -- cgit v1.2.3-70-g09d2