From 84d2bab38202cd52b5eb0a37c12204ab6f607915 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 Sep 2015 20:58:41 +0300 Subject: Remove MessageHandler class --- src/net/tmwa/inventoryhandler.cpp | 97 --------------------------------------- 1 file changed, 97 deletions(-) (limited to 'src/net/tmwa/inventoryhandler.cpp') diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 950a6b492..33d260673 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -62,30 +62,8 @@ namespace TmwAthena { InventoryHandler::InventoryHandler() : - MessageHandler(), Ea::InventoryHandler() { - static const uint16_t _messages[] = - { - SMSG_PLAYER_INVENTORY, - SMSG_PLAYER_INVENTORY_ADD, - SMSG_PLAYER_INVENTORY_REMOVE, - SMSG_PLAYER_INVENTORY_USE, - SMSG_ITEM_USE_RESPONSE, - SMSG_PLAYER_STORAGE_ITEMS, - SMSG_PLAYER_STORAGE_EQUIP, - SMSG_PLAYER_STORAGE_STATUS, - SMSG_PLAYER_STORAGE_ADD, - SMSG_PLAYER_STORAGE_REMOVE, - SMSG_PLAYER_STORAGE_CLOSE, - SMSG_PLAYER_EQUIPMENT, - SMSG_PLAYER_EQUIP, - SMSG_PLAYER_UNEQUIP, - SMSG_PLAYER_ARROW_EQUIP, - SMSG_PLAYER_ATTACK_RANGE, - 0 - }; - handledMessages = _messages; inventoryHandler = this; } @@ -93,81 +71,6 @@ InventoryHandler::~InventoryHandler() { } -void InventoryHandler::handleMessage(Net::MessageIn &msg) -{ - BLOCK_START("InventoryHandler::handleMessage") - switch (msg.getId()) - { - case SMSG_PLAYER_INVENTORY: - InventoryRecv::processPlayerInventory(msg); - break; - - case SMSG_PLAYER_STORAGE_ITEMS: - InventoryRecv::processPlayerStorage(msg); - break; - - case SMSG_PLAYER_STORAGE_EQUIP: - InventoryRecv::processPlayerStorageEquip(msg); - break; - - case SMSG_PLAYER_INVENTORY_ADD: - InventoryRecv::processPlayerInventoryAdd(msg); - break; - - case SMSG_PLAYER_INVENTORY_REMOVE: - Ea::InventoryRecv::processPlayerInventoryRemove(msg); - break; - - case SMSG_PLAYER_INVENTORY_USE: - Ea::InventoryRecv::processPlayerInventoryUse(msg); - break; - - case SMSG_ITEM_USE_RESPONSE: - Ea::InventoryRecv::processItemUseResponse(msg); - break; - - case SMSG_PLAYER_STORAGE_STATUS: - Ea::InventoryRecv::processPlayerStorageStatus(msg); - break; - - case SMSG_PLAYER_STORAGE_ADD: - InventoryRecv::processPlayerStorageAdd(msg); - break; - - case SMSG_PLAYER_STORAGE_REMOVE: - InventoryRecv::processPlayerStorageRemove(msg); - break; - - case SMSG_PLAYER_STORAGE_CLOSE: - Ea::InventoryRecv::processPlayerStorageClose(msg); - break; - - case SMSG_PLAYER_EQUIPMENT: - InventoryRecv::processPlayerEquipment(msg); - break; - - case SMSG_PLAYER_EQUIP: - InventoryRecv::processPlayerEquip(msg); - break; - - case SMSG_PLAYER_UNEQUIP: - InventoryRecv::processPlayerUnEquip(msg); - break; - - case SMSG_PLAYER_ATTACK_RANGE: - Ea::InventoryRecv::processPlayerAttackRange(msg); - break; - - case SMSG_PLAYER_ARROW_EQUIP: - Ea::InventoryRecv::processPlayerArrowEquip(msg); - break; - - default: - break; - } - BLOCK_END("InventoryHandler::handleMessage") -} - void InventoryHandler::equipItem(const Item *const item) const { if (!item) -- cgit v1.2.3-60-g2f50