summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-08-06 21:13:56 +0300
committerAndrei Karas <akaras@inbox.ru>2018-08-06 21:13:56 +0300
commit3b5390eee9c3e031867d3acfce574f1993d46b76 (patch)
tree733dc11695c0a71e4725f97b28222cf9eaf435d3 /src/net/ea
parent1604ad0c8bd2d770f350cf88e469b4c810b6457f (diff)
downloadplus-3b5390eee9c3e031867d3acfce574f1993d46b76.tar.gz
plus-3b5390eee9c3e031867d3acfce574f1993d46b76.tar.bz2
plus-3b5390eee9c3e031867d3acfce574f1993d46b76.tar.xz
plus-3b5390eee9c3e031867d3acfce574f1993d46b76.zip
Move InventoryRecv::processPlayerInventoryUse from ea namespace into tmwa and eathena.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/inventoryrecv.cpp25
-rw-r--r--src/net/ea/inventoryrecv.h1
2 files changed, 0 insertions, 26 deletions
diff --git a/src/net/ea/inventoryrecv.cpp b/src/net/ea/inventoryrecv.cpp
index 5dd4075d6..2e6a7e2ac 100644
--- a/src/net/ea/inventoryrecv.cpp
+++ b/src/net/ea/inventoryrecv.cpp
@@ -56,31 +56,6 @@ namespace InventoryRecv
bool mDebugInventory = true;
} // namespace InventoryRecv
-void InventoryRecv::processPlayerInventoryUse(Net::MessageIn &msg)
-{
- BLOCK_START("InventoryRecv::processPlayerInventoryUse")
- Inventory *const inventory = localPlayer != nullptr
- ? PlayerInfo::getInventory() : nullptr;
-
- const int index = msg.readInt16("index") - INVENTORY_OFFSET;
- msg.readItemId("item id");
- msg.readInt32("id?");
- const int amount = msg.readInt16("amount");
- msg.readUInt8("type");
-
- if (inventory != nullptr)
- {
- if (Item *const item = inventory->getItem(index))
- {
- if (amount != 0)
- item->setQuantity(amount);
- else
- inventory->removeItemAt(index);
- }
- }
- BLOCK_END("InventoryRecv::processPlayerInventoryUse")
-}
-
void InventoryRecv::processItemUseResponse(Net::MessageIn &msg)
{
BLOCK_START("InventoryRecv::processItemUseResponse")
diff --git a/src/net/ea/inventoryrecv.h b/src/net/ea/inventoryrecv.h
index f3d0ae442..3330e6fd1 100644
--- a/src/net/ea/inventoryrecv.h
+++ b/src/net/ea/inventoryrecv.h
@@ -52,7 +52,6 @@ namespace Ea
extern PickupQueue mSentPickups;
extern bool mDebugInventory;
- void processPlayerInventoryUse(Net::MessageIn &msg);
void processItemUseResponse(Net::MessageIn &msg);
void processPlayerStorageStatus(Net::MessageIn &msg);
void processPlayerStorageClose(Net::MessageIn &msg);