diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-09-29 23:59:08 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-09-29 23:59:08 +0000 |
commit | e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3 (patch) | |
tree | e8dc775e12f6b4eb0a6d56448f05286c774bbb8a /src/net/inventoryhandler.cpp | |
parent | 0e8c09433f3a193b5a94a1ad572d8237113cdfbf (diff) | |
download | mana-client-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.tar.gz mana-client-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.tar.bz2 mana-client-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.tar.xz mana-client-e8f94fe7ca5e7e7838eaa84f1792b4b42b4bada3.zip |
Merged trunk changes from revision 2618 to 2716 into the 0.1.0 branch.
Diffstat (limited to 'src/net/inventoryhandler.cpp')
-rw-r--r-- | src/net/inventoryhandler.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/net/inventoryhandler.cpp b/src/net/inventoryhandler.cpp index c4192bc5..3f7e8709 100644 --- a/src/net/inventoryhandler.cpp +++ b/src/net/inventoryhandler.cpp @@ -92,14 +92,9 @@ 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); - } + const ItemInfo &itemInfo = itemDb->getItemInfo(itemId); + chatWindow->chatLog("You picked up a " + + itemInfo.getName(), BY_SERVER); player_node->addInvItem(index, itemId, amount, equipType != 0); } break; |