summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2011-02-17 20:32:49 -0800
committerAndrei Karas <akaras@inbox.ru>2011-02-18 18:26:33 +0200
commit0b10f0318b9f9ab308f04712698aa104bec21e29 (patch)
tree5280374e729cc8950fba3301a60fdce4cb727074 /src/net
parent8329553a5342b1b3b6d81892199c124db0967fc4 (diff)
downloadmanaverse-0b10f0318b9f9ab308f04712698aa104bec21e29.tar.gz
manaverse-0b10f0318b9f9ab308f04712698aa104bec21e29.tar.bz2
manaverse-0b10f0318b9f9ab308f04712698aa104bec21e29.tar.xz
manaverse-0b10f0318b9f9ab308f04712698aa104bec21e29.zip
Specific messages for each pickup failure reason.
Reviewed-by: Jaxad0127 Manaplus: fix code style and add some checks.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/tmwa/inventoryhandler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index 7c6da139e..27e44b70c 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -280,15 +280,16 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
{
const ItemInfo &itemInfo = ItemDB::get(itemId);
- if (msg.readInt8() > 0)
+ unsigned char err = msg.readInt8();
+ if (err)
{
if (player_node)
- player_node->pickedUp(itemInfo, 0);
+ player_node->pickedUp(itemInfo, 0, err);
}
else
{
if (player_node)
- player_node->pickedUp(itemInfo, amount);
+ player_node->pickedUp(itemInfo, amount, PICKUP_OKAY);
if (inventory)
{