diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-05-23 20:53:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-05-23 20:53:16 +0300 |
commit | 3fb968387deba0cbfd59d029aa6cf4789d68d09c (patch) | |
tree | 46eb904ec8efd5a0e7e9c69c005a383a51e50f85 /src/net/eathena | |
parent | 2b81fecc1c7c239e4b35312f46952e9b16029b67 (diff) | |
download | mv-3fb968387deba0cbfd59d029aa6cf4789d68d09c.tar.gz mv-3fb968387deba0cbfd59d029aa6cf4789d68d09c.tar.bz2 mv-3fb968387deba0cbfd59d029aa6cf4789d68d09c.tar.xz mv-3fb968387deba0cbfd59d029aa6cf4789d68d09c.zip |
Dont show asserts in pickup special packets.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/inventoryrecv.cpp | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp index dea3a411f..4ca2f042e 100644 --- a/src/net/eathena/inventoryrecv.cpp +++ b/src/net/eathena/inventoryrecv.cpp @@ -243,7 +243,6 @@ void InventoryRecv::processPlayerInventoryAdd(Net::MessageIn &msg) } const ItemColor color = ItemColorManager::getColorFromCards(&cards[0]); - const ItemInfo &itemInfo = ItemDB::get(itemId); BeingId floorId; if (Ea::InventoryRecv::mSentPickups.empty()) { @@ -285,22 +284,44 @@ void InventoryRecv::processPlayerInventoryAdd(Net::MessageIn &msg) } if (localPlayer) { - localPlayer->pickedUp(itemInfo, - 0, - color, - floorId, - pickup); + if (itemId == 0) + { + localPlayer->pickedUp(ItemDB::getEmpty(), + 0, + color, + floorId, + pickup); + } + else + { + localPlayer->pickedUp(ItemDB::get(itemId), + 0, + color, + floorId, + pickup); + } } } else { if (localPlayer) { - localPlayer->pickedUp(itemInfo, - amount, - color, - floorId, - Pickup::OKAY); + if (itemId == 0) + { + localPlayer->pickedUp(ItemDB::getEmpty(), + amount, + color, + floorId, + Pickup::OKAY); + } + else + { + localPlayer->pickedUp(ItemDB::get(itemId), + amount, + color, + floorId, + Pickup::OKAY); + } } if (inventory) |