diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2011-02-17 20:32:49 -0800 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2011-02-17 22:30:20 -0700 |
commit | 85bf2ed70685a29b6a47279deeb61905c6d375b0 (patch) | |
tree | 8d2ff19afbcda92b49894262752af2ee8c5b289c /src/net | |
parent | b74616db888fb69b81d49792ca3d68af3bdeaefe (diff) | |
download | mana-85bf2ed70685a29b6a47279deeb61905c6d375b0.tar.gz mana-85bf2ed70685a29b6a47279deeb61905c6d375b0.tar.bz2 mana-85bf2ed70685a29b6a47279deeb61905c6d375b0.tar.xz mana-85bf2ed70685a29b6a47279deeb61905c6d375b0.zip |
Specific messages for each pickup failure reason.
Reviewed-by: Jaxad0127
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 3809399d..5e404e6c 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -230,13 +230,14 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) { const ItemInfo &itemInfo = ItemDB::get(itemId); - if (msg.readInt8() > 0) + unsigned char err = msg.readInt8(); + if (err) { - player_node->pickedUp(itemInfo, 0); + player_node->pickedUp(itemInfo, 0, err); } else { - player_node->pickedUp(itemInfo, amount); + player_node->pickedUp(itemInfo, amount, PICKUP_OKAY); Item *item = inventory->getItem(index); |