diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-03 23:12:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:56 +0300 |
commit | 9049b5a8d88f864a99df228df0152adabef4d909 (patch) | |
tree | 5797799ae8c986c0d6fafa38c22a5792680fbcd5 | |
parent | 0af6ac61cb8fbe5b1b0a593a705a14c8a01e2fa3 (diff) | |
download | manaplus-9049b5a8d88f864a99df228df0152adabef4d909.tar.gz manaplus-9049b5a8d88f864a99df228df0152adabef4d909.tar.bz2 manaplus-9049b5a8d88f864a99df228df0152adabef4d909.tar.xz manaplus-9049b5a8d88f864a99df228df0152adabef4d909.zip |
Move processPlayerEquip from ea namespace into tmwa and eathena.
-rw-r--r-- | src/net/ea/inventoryhandler.cpp | 14 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 18 | ||||
-rw-r--r-- | src/net/eathena/inventoryhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 18 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.h | 2 |
6 files changed, 40 insertions, 16 deletions
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 61db381ec..3477d0498 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -386,20 +386,6 @@ void InventoryHandler::processPlayerStorageClose(Net::MessageIn &msg A_UNUSED) BLOCK_END("InventoryHandler::processPlayerStorageClose") } -void InventoryHandler::processPlayerEquip(Net::MessageIn &msg) -{ - BLOCK_START("InventoryHandler::processPlayerEquip") - const int index = msg.readInt16() - INVENTORY_OFFSET; - const int equipType = msg.readInt16(); - const uint8_t flag = msg.readUInt8(); - - if (!flag) - NotifyManager::notify(NotifyTypes::EQUIP_FAILED); - else - mEquips.setEquipment(getSlot(equipType), index); - BLOCK_END("InventoryHandler::processPlayerEquip") -} - void InventoryHandler::processPlayerUnEquip(Net::MessageIn &msg) { BLOCK_START("InventoryHandler::processPlayerUnEquip") diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index 8d5f76464..bbb90a3a8 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -96,8 +96,6 @@ class InventoryHandler notfinal : public Net::InventoryHandler void processPlayerStorageClose(Net::MessageIn &msg); - void processPlayerEquip(Net::MessageIn &msg); - void processPlayerUnEquip(Net::MessageIn &msg); static void processPlayerAttackRange(Net::MessageIn &msg); diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 3eb10d28b..3861945df 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -22,6 +22,8 @@ #include "net/eathena/inventoryhandler.h" +#include "notifymanager.h" + #include "being/localplayer.h" #include "being/pickup.h" @@ -32,6 +34,8 @@ #include "net/ea/eaprotocol.h" +#include "resources/notifytypes.h" + #include "debug.h" extern Net::InventoryHandler *inventoryHandler; @@ -392,4 +396,18 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg) BLOCK_END("InventoryHandler::processPlayerInventory") } +void InventoryHandler::processPlayerEquip(Net::MessageIn &msg) +{ + BLOCK_START("InventoryHandler::processPlayerEquip") + const int index = msg.readInt16() - INVENTORY_OFFSET; + const int equipType = msg.readInt16(); + const uint8_t flag = msg.readUInt8(); + + if (!flag) + NotifyManager::notify(NotifyTypes::EQUIP_FAILED); + else + mEquips.setEquipment(getSlot(equipType), index); + BLOCK_END("InventoryHandler::processPlayerEquip") +} + } // namespace EAthena diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h index 00e9a3044..7d1b9ddfc 100644 --- a/src/net/eathena/inventoryhandler.h +++ b/src/net/eathena/inventoryhandler.h @@ -64,6 +64,8 @@ class InventoryHandler final : public MessageHandler, void processPlayerInventoryAdd(Net::MessageIn &msg); void processPlayerInventory(Net::MessageIn &msg); + + void processPlayerEquip(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index aa619a9f0..0ff31370d 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -22,6 +22,8 @@ #include "net/tmwa/inventoryhandler.h" +#include "notifymanager.h" + #include "being/localplayer.h" #include "being/pickup.h" @@ -32,6 +34,8 @@ #include "net/ea/eaprotocol.h" +#include "resources/notifytypes.h" + #include "debug.h" extern Net::InventoryHandler *inventoryHandler; @@ -396,4 +400,18 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg) BLOCK_END("InventoryHandler::processPlayerInventory") } +void InventoryHandler::processPlayerEquip(Net::MessageIn &msg) +{ + BLOCK_START("InventoryHandler::processPlayerEquip") + const int index = msg.readInt16() - INVENTORY_OFFSET; + const int equipType = msg.readInt16(); + const uint8_t flag = msg.readUInt8(); + + if (!flag) + NotifyManager::notify(NotifyTypes::EQUIP_FAILED); + else + mEquips.setEquipment(getSlot(equipType), index); + BLOCK_END("InventoryHandler::processPlayerEquip") +} + } // namespace TmwAthena diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h index 3ec37c5b5..a41e47ebf 100644 --- a/src/net/tmwa/inventoryhandler.h +++ b/src/net/tmwa/inventoryhandler.h @@ -64,6 +64,8 @@ class InventoryHandler final : public MessageHandler, void processPlayerInventoryAdd(Net::MessageIn &msg); void processPlayerInventory(Net::MessageIn &msg); + + void processPlayerEquip(Net::MessageIn &msg); }; } // namespace TmwAthena |