diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-03 23:21:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:56 +0300 |
commit | 7890bb3f423dbdb815d97f066594ae8917c5cee7 (patch) | |
tree | 69b484e4e0f28384590a650b79a1ae77bb5f0a23 /src/net/tmwa | |
parent | a37b34f16d81c0b60376c63a11974c401faa2f91 (diff) | |
download | plus-7890bb3f423dbdb815d97f066594ae8917c5cee7.tar.gz plus-7890bb3f423dbdb815d97f066594ae8917c5cee7.tar.bz2 plus-7890bb3f423dbdb815d97f066594ae8917c5cee7.tar.xz plus-7890bb3f423dbdb815d97f066594ae8917c5cee7.zip |
eathena: move processPlayerUnEquip from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 14 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 0ff31370d..3feccd1fa 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -414,4 +414,18 @@ void InventoryHandler::processPlayerEquip(Net::MessageIn &msg) BLOCK_END("InventoryHandler::processPlayerEquip") } +void InventoryHandler::processPlayerUnEquip(Net::MessageIn &msg) +{ + BLOCK_START("InventoryHandler::processPlayerUnEquip") + msg.readInt16(); // inder val - INVENTORY_OFFSET; + const int equipType = msg.readInt16(); + const uint8_t flag = msg.readUInt8(); + + if (flag) + mEquips.setEquipment(getSlot(equipType), -1); + if (equipType & 0x8000) + ArrowsListener::distributeEvent(); + BLOCK_END("InventoryHandler::processPlayerUnEquip") +} + } // namespace TmwAthena diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h index a41e47ebf..b1172ef81 100644 --- a/src/net/tmwa/inventoryhandler.h +++ b/src/net/tmwa/inventoryhandler.h @@ -66,6 +66,8 @@ class InventoryHandler final : public MessageHandler, void processPlayerInventory(Net::MessageIn &msg); void processPlayerEquip(Net::MessageIn &msg); + + void processPlayerUnEquip(Net::MessageIn &msg); }; } // namespace TmwAthena |