diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-28 23:04:08 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-28 23:04:08 +0000 |
commit | 391203d83ed7a72b54fb7d7c72dbe35db14f0ea9 (patch) | |
tree | a9a9e14bbbdde0b48c66b99038d505a42a51609b /src/net/inventoryhandler.cpp | |
parent | af61e1e7df91b97c3f7516e9eb2b37b621f069ad (diff) | |
download | mana-391203d83ed7a72b54fb7d7c72dbe35db14f0ea9.tar.gz mana-391203d83ed7a72b54fb7d7c72dbe35db14f0ea9.tar.bz2 mana-391203d83ed7a72b54fb7d7c72dbe35db14f0ea9.tar.xz mana-391203d83ed7a72b54fb7d7c72dbe35db14f0ea9.zip |
Merged trunk development between revisions 2530 and 2618 to the 0.1.0 branch.
Diffstat (limited to 'src/net/inventoryhandler.cpp')
-rw-r--r-- | src/net/inventoryhandler.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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; |