From 0779cc7854ac04b87aecc3d4bc64f2a9f12833c8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 26 Sep 2018 21:39:01 +0300 Subject: Add packet SMSG_PLAYER_COMBINED_INVENTORY 0x0b09. --- src/net/eathena/inventoryrecv.cpp | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'src/net/eathena/inventoryrecv.cpp') 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( + 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 -- cgit v1.2.3-70-g09d2