From a15146e08d00f9986edfde7a15a70790b64cc1ce Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 1 Sep 2014 02:55:46 +0300 Subject: Move processPlayerEquipment from ea into tmwa and eathena namespace. --- src/net/ea/inventoryhandler.cpp | 49 ----------------------------------------- src/net/ea/inventoryhandler.h | 2 -- 2 files changed, 51 deletions(-) (limited to 'src/net/ea') diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index c73dc5757..fb651ae25 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -523,55 +523,6 @@ void InventoryHandler::processPlayerStorageClose(Net::MessageIn &msg A_UNUSED) BLOCK_END("InventoryHandler::processPlayerStorageClose") } -void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg) -{ - BLOCK_START("InventoryHandler::processPlayerEquipment") - Inventory *const inventory = localPlayer - ? PlayerInfo::getInventory() : nullptr; - - msg.readInt16(); // length - Equipment *const equipment = PlayerInfo::getEquipment(); - if (equipment && !equipment->getBackend()) - { // look like SMSG_PLAYER_INVENTORY was not received - mEquips.clear(); - equipment->setBackend(&mEquips); - } - const int number = (msg.getLength() - 4) / 20; - - for (int loop = 0; loop < number; loop++) - { - const int index = msg.readInt16() - INVENTORY_OFFSET; - const int itemId = msg.readInt16(); - const uint8_t itemType = msg.readUInt8(); // type - uint8_t identified = msg.readUInt8(); // identify flag - - msg.readInt16(); // equip type - const int equipType = msg.readInt16(); - msg.readUInt8(); // attribute - const uint8_t refine = msg.readUInt8(); - msg.skip(8); // card - - if (mDebugInventory) - { - logger->log("Index: %d, ID: %d, Type: %d, Identified: %d", - index, itemId, itemType, identified); - } - - if (serverVersion < 1 && identified > 1) - identified = 1; - - if (inventory) - { - inventory->setItem(index, itemId, 1, refine, - identified, true); - } - - if (equipType) - mEquips.setEquipment(getSlot(equipType), index); - } - BLOCK_END("InventoryHandler::processPlayerEquipment") -} - void InventoryHandler::processPlayerEquip(Net::MessageIn &msg) { BLOCK_START("InventoryHandler::processPlayerEquip") diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index 3fe0ec6bb..b45c4e337 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -100,8 +100,6 @@ class InventoryHandler notfinal : public Net::InventoryHandler void processPlayerStorageClose(Net::MessageIn &msg); - void processPlayerEquipment(Net::MessageIn &msg); - void processPlayerEquip(Net::MessageIn &msg); void processPlayerUnEquip(Net::MessageIn &msg); -- cgit v1.2.3-70-g09d2