diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-09-26 21:39:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-09-26 21:39:01 +0300 |
commit | 0779cc7854ac04b87aecc3d4bc64f2a9f12833c8 (patch) | |
tree | dcca99413f93f69747ccbc998920a557fcd0a4d9 /src/net/eathena/inventoryrecv.cpp | |
parent | fa5c9c6958c8d499678ea9bab24eb4715b824f6e (diff) | |
download | mv-0779cc7854ac04b87aecc3d4bc64f2a9f12833c8.tar.gz mv-0779cc7854ac04b87aecc3d4bc64f2a9f12833c8.tar.bz2 mv-0779cc7854ac04b87aecc3d4bc64f2a9f12833c8.tar.xz mv-0779cc7854ac04b87aecc3d4bc64f2a9f12833c8.zip |
Add packet SMSG_PLAYER_COMBINED_INVENTORY 0x0b09.
Diffstat (limited to 'src/net/eathena/inventoryrecv.cpp')
-rw-r--r-- | src/net/eathena/inventoryrecv.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp index 358aa2234..2ca1f11c8 100644 --- a/src/net/eathena/inventoryrecv.cpp +++ b/src/net/eathena/inventoryrecv.cpp @@ -1547,4 +1547,46 @@ void InventoryRecv::processInventoryEnd2(Net::MessageIn &msg) msg.readUInt8("flag"); } +void InventoryRecv::processPlayerCombinedInventory1(Net::MessageIn &msg) +{ + UNIMPLEMENTEDPACKET; + const int dataLen = msg.readInt32("len") - 4; + processInventoryContinue(msg, + dataLen, + NetInventoryType::Storage); +} + +void InventoryRecv::processPlayerCombinedInventory2(Net::MessageIn &msg) +{ + UNIMPLEMENTEDPACKET; + const int dataLen = msg.readInt32("len") - 5; + const NetInventoryTypeT invType = static_cast<NetInventoryTypeT>( + msg.readUInt8("type")); + processInventoryContinue(msg, + dataLen, + invType); +} + +void InventoryRecv::processInventoryContinue(Net::MessageIn &msg, + const int len, + const NetInventoryTypeT invType + A_UNUSED) +{ + const int packetLen = 14 + itemIdLen * 5; + const int number = len / packetLen; + + for (int loop = 0; loop < number; loop++) + { + msg.readInt16("item index"); + msg.readItemId("item id"); + msg.readUInt8("item type"); + msg.readInt16("amount"); + msg.readInt32("wear state / equip"); + for (int f = 0; f < maxCards; f++) + msg.readItemId("card"); + msg.readInt32("hire expire date"); + msg.readUInt8("flags"); + } +} + } // namespace EAthena |