summaryrefslogtreecommitdiff
path: root/src/net/ea/inventoryrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-09 17:40:06 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-09 17:40:06 +0300
commit8d519af0d6a5a7c3477e684269172b8163495a85 (patch)
tree027e57ee17fc5a663467358d0408b30c662c416e /src/net/ea/inventoryrecv.cpp
parent1da80a3312ae865ed5d84271fc0cf53b82d87f15 (diff)
downloadplus-8d519af0d6a5a7c3477e684269172b8163495a85.tar.gz
plus-8d519af0d6a5a7c3477e684269172b8163495a85.tar.bz2
plus-8d519af0d6a5a7c3477e684269172b8163495a85.tar.xz
plus-8d519af0d6a5a7c3477e684269172b8163495a85.zip
Move processPlayerInventoryRemove from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/ea/inventoryrecv.cpp')
-rw-r--r--src/net/ea/inventoryrecv.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/net/ea/inventoryrecv.cpp b/src/net/ea/inventoryrecv.cpp
index e7c1afb62..7a96e86cd 100644
--- a/src/net/ea/inventoryrecv.cpp
+++ b/src/net/ea/inventoryrecv.cpp
@@ -82,27 +82,6 @@ namespace InventoryRecv
bool mDebugInventory = true;
} // namespace InventoryRecv
-void InventoryRecv::processPlayerInventoryRemove(Net::MessageIn &msg)
-{
- BLOCK_START("InventoryRecv::processPlayerInventoryRemove")
- Inventory *const inventory = localPlayer
- ? PlayerInfo::getInventory() : nullptr;
-
- const int index = msg.readInt16("index") - INVENTORY_OFFSET;
- const int amount = msg.readInt16("amount");
- if (inventory)
- {
- if (Item *const item = inventory->getItem(index))
- {
- item->increaseQuantity(-amount);
- if (item->getQuantity() == 0)
- inventory->removeItemAt(index);
- ArrowsListener::distributeEvent();
- }
- }
- BLOCK_END("InventoryRecv::processPlayerInventoryRemove")
-}
-
void InventoryRecv::processPlayerInventoryUse(Net::MessageIn &msg)
{
BLOCK_START("InventoryRecv::processPlayerInventoryUse")