diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-29 21:38:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-30 16:37:01 +0300 |
commit | 03763e4b290b80bc5606568b168f8605d7aa1631 (patch) | |
tree | 87f517d55a57b10da3aad9ded5755908b20b9ff3 /src | |
parent | a175038656212737bb9b447dfb3b9a85f52d91a2 (diff) | |
download | plus-03763e4b290b80bc5606568b168f8605d7aa1631.tar.gz plus-03763e4b290b80bc5606568b168f8605d7aa1631.tar.bz2 plus-03763e4b290b80bc5606568b168f8605d7aa1631.tar.xz plus-03763e4b290b80bc5606568b168f8605d7aa1631.zip |
Remove additional parameters from processPlayerInventory function.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/ea/eaprotocol.h | 2 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 2 |
5 files changed, 7 insertions, 6 deletions
diff --git a/src/net/ea/eaprotocol.h b/src/net/ea/eaprotocol.h index aeeebefde..401d09177 100644 --- a/src/net/ea/eaprotocol.h +++ b/src/net/ea/eaprotocol.h @@ -68,4 +68,6 @@ enum static const int INVENTORY_OFFSET = 2; static const int STORAGE_OFFSET = 1; +#define SMSG_PLAYER_INVENTORY 0x01ee + #endif // NET_EA_EAPROTOCOL_H diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 432f4eb5c..c73dc5757 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -173,10 +173,10 @@ int InventoryHandler::getSlot(const int eAthenaSlot) return static_cast<int>(EQUIP_POINTS[position]); } -void InventoryHandler::processPlayerInventory(Net::MessageIn &msg, - const bool playerInvintory) +void InventoryHandler::processPlayerInventory(Net::MessageIn &msg) { BLOCK_START("InventoryHandler::processPlayerInventory") + const bool playerInvintory = msg.getId() == SMSG_PLAYER_INVENTORY; Inventory *const inventory = localPlayer ? PlayerInfo::getInventory() : nullptr; if (playerInvintory) diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index 76ceec765..3fe0ec6bb 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -80,8 +80,7 @@ class InventoryHandler notfinal : public Net::InventoryHandler static int getSlot(const int eAthenaSlot) A_WARN_UNUSED; - void processPlayerInventory(Net::MessageIn &msg, - const bool playerInvintory); + void processPlayerInventory(Net::MessageIn &msg); void processPlayerStorageEquip(Net::MessageIn &msg); diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index df447c683..7e10bc69d 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -72,7 +72,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) { case SMSG_PLAYER_INVENTORY: case SMSG_PLAYER_STORAGE_ITEMS: - processPlayerInventory(msg, msg.getId() == SMSG_PLAYER_INVENTORY); + processPlayerInventory(msg); break; case SMSG_PLAYER_STORAGE_EQUIP: diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 02413dafc..8d38d4feb 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -73,7 +73,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) { case SMSG_PLAYER_INVENTORY: case SMSG_PLAYER_STORAGE_ITEMS: - processPlayerInventory(msg, msg.getId() == SMSG_PLAYER_INVENTORY); + processPlayerInventory(msg); break; case SMSG_PLAYER_STORAGE_EQUIP: |