summaryrefslogtreecommitdiff
path: root/src/net/eathena/inventoryhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/inventoryhandler.cpp')
-rw-r--r--src/net/eathena/inventoryhandler.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 8b75b1df9..b14bfbfb6 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -380,8 +380,34 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg)
if (err)
{
+ Pickup::Type pickup;
+ switch (err)
+ {
+ case 1:
+ pickup = Pickup::BAD_ITEM;
+ break;
+ case 2:
+ pickup = Pickup::TOO_HEAVY;
+ break;
+ case 4:
+ pickup = Pickup::INV_FULL;
+ break;
+ case 5:
+ pickup = Pickup::MAX_AMOUNT;
+ break;
+ case 6:
+ pickup = Pickup::TOO_FAR;
+ break;
+ case 7:
+ pickup = Pickup::STACK_AMOUNT;
+ break;
+ default:
+ pickup = Pickup::UNKNOWN;
+ logger->log("unknown pickup type: %d", err);
+ break;
+ }
if (localPlayer)
- localPlayer->pickedUp(itemInfo, 0, identified, floorId, err);
+ localPlayer->pickedUp(itemInfo, 0, identified, floorId, pickup);
}
else
{