diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-09-26 22:13:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-09-26 22:13:59 +0300 |
commit | 90ae388802f612863d2b76e4acd152f8899d4894 (patch) | |
tree | 79579486fe43ec447acfa8edcaa877f55e7a0b9b /src/net/eathena/inventoryrecv.cpp | |
parent | d2d6db403a2702e7901f3132fdbdcaff0ffae0f5 (diff) | |
download | mv-90ae388802f612863d2b76e4acd152f8899d4894.tar.gz mv-90ae388802f612863d2b76e4acd152f8899d4894.tar.bz2 mv-90ae388802f612863d2b76e4acd152f8899d4894.tar.xz mv-90ae388802f612863d2b76e4acd152f8899d4894.zip |
Add packet SMSG_PLAYER_COMBINED_EQUIPMENT 0x0b0a.
Diffstat (limited to 'src/net/eathena/inventoryrecv.cpp')
-rw-r--r-- | src/net/eathena/inventoryrecv.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp index 2ca1f11c8..7547d03c7 100644 --- a/src/net/eathena/inventoryrecv.cpp +++ b/src/net/eathena/inventoryrecv.cpp @@ -1589,4 +1589,56 @@ void InventoryRecv::processInventoryContinue(Net::MessageIn &msg, } } +void InventoryRecv::processPlayerCombinedEquipment1(Net::MessageIn &msg) +{ + UNIMPLEMENTEDPACKET; + const int dataLen = msg.readInt32("len") - 4; + processEquipmentContinue(msg, + dataLen, + NetInventoryType::Storage); +} + +void InventoryRecv::processPlayerCombinedEquipment2(Net::MessageIn &msg) +{ + UNIMPLEMENTEDPACKET; + const int dataLen = msg.readInt32("len") - 5; + const NetInventoryTypeT invType = static_cast<NetInventoryTypeT>( + msg.readUInt8("type")); + processEquipmentContinue(msg, + dataLen, + invType); +} + +void InventoryRecv::processEquipmentContinue(Net::MessageIn &msg, + const int len, + const NetInventoryTypeT invType + A_UNUSED) +{ + const int packetLen = 47 + itemIdLen * 5; + const int number = len / packetLen; + + for (int loop = 0; loop < number; loop++) + { + msg.readInt16("index"); + msg.readItemId("item id"); + msg.readUInt8("item type"); + msg.readInt32("location"); + msg.readInt32("wear state"); + msg.readInt8("refine"); + for (int f = 0; f < maxCards; f++) + msg.readItemId("card"); + msg.readInt32("hire expire date (?)"); + msg.readInt16("equip type"); + msg.readInt16("item sprite number"); + msg.readUInt8("option count"); + for (int f = 0; f < 5; f ++) + { + msg.readInt16("option index"); + msg.readInt16("option value"); + msg.readUInt8("option param"); + } + msg.readUInt8("flags"); + } +} + } // namespace EAthena |