diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/inventoryrecv.cpp | 42 | ||||
-rw-r--r-- | src/net/eathena/inventoryrecv.h | 7 | ||||
-rw-r--r-- | src/net/eathena/packetsin.inc | 3 |
3 files changed, 52 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 diff --git a/src/net/eathena/inventoryrecv.h b/src/net/eathena/inventoryrecv.h index 9e4c3ce03..37e52a8fe 100644 --- a/src/net/eathena/inventoryrecv.h +++ b/src/net/eathena/inventoryrecv.h @@ -25,6 +25,8 @@ #include "net/ea/inventoryitem.h" +#include "enums/net/netinventorytype.h" + namespace Net { class MessageIn; @@ -81,8 +83,13 @@ namespace EAthena void processInventoryStart3(Net::MessageIn &msg); void processInventoryEnd1(Net::MessageIn &msg); void processInventoryEnd2(Net::MessageIn &msg); + void processPlayerCombinedInventory1(Net::MessageIn &msg); + void processPlayerCombinedInventory2(Net::MessageIn &msg); int getSlot(const int eAthenaSlot) A_WARN_UNUSED; + void processInventoryContinue(Net::MessageIn &msg, + const int len, + const NetInventoryTypeT invType); } // namespace InventoryRecv } // namespace EAthena diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index aef5536f6..e8901a7b1 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -1310,6 +1310,7 @@ if (packetVersionRe >= 20180829) { packet(SMSG_INVENTORY_START1, 0x0b08, 26, &InventoryRecv::processInventoryStart1, 20180829); packet(SMSG_INVENTORY_END1, 0x0b0b, 3, &InventoryRecv::processInventoryEnd1, 20180829); + packet(SMSG_PLAYER_COMBINED_INVENTORY1, 0x0b09, -1, &InventoryRecv::processPlayerCombinedInventory1, 20180829); } // 20180912 re @@ -1317,6 +1318,7 @@ if (packetVersionRe >= 20180912) { packet(SMSG_INVENTORY_START2, 0x0b08, 27, &InventoryRecv::processInventoryStart2, 20180912); packet(SMSG_INVENTORY_END2, 0x0b0b, 4, &InventoryRecv::processInventoryEnd2, 20180912); + packet(SMSG_PLAYER_COMBINED_INVENTORY2, 0x0b09, -1, &InventoryRecv::processPlayerCombinedInventory2, 20180912); } // 20180919 re @@ -1330,6 +1332,7 @@ if (packetVersionZero >= 20180919) { packet(SMSG_INVENTORY_START3, 0x0b08, -1, &InventoryRecv::processInventoryStart3, 20180919); packet(SMSG_INVENTORY_END2, 0x0b0b, 4, &InventoryRecv::processInventoryEnd2, 20180919); + packet(SMSG_PLAYER_COMBINED_INVENTORY2, 0x0b09, -1, &InventoryRecv::processPlayerCombinedInventory2, 20180919); } // 0 |