summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-09-26 22:13:59 +0300
committerAndrei Karas <akaras@inbox.ru>2018-09-26 22:13:59 +0300
commit90ae388802f612863d2b76e4acd152f8899d4894 (patch)
tree79579486fe43ec447acfa8edcaa877f55e7a0b9b /src/net
parentd2d6db403a2702e7901f3132fdbdcaff0ffae0f5 (diff)
downloadmv-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')
-rw-r--r--src/net/eathena/inventoryrecv.cpp52
-rw-r--r--src/net/eathena/inventoryrecv.h6
-rw-r--r--src/net/eathena/packetsin.inc3
3 files changed, 61 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
diff --git a/src/net/eathena/inventoryrecv.h b/src/net/eathena/inventoryrecv.h
index 37e52a8fe..28037063a 100644
--- a/src/net/eathena/inventoryrecv.h
+++ b/src/net/eathena/inventoryrecv.h
@@ -85,11 +85,17 @@ namespace EAthena
void processInventoryEnd2(Net::MessageIn &msg);
void processPlayerCombinedInventory1(Net::MessageIn &msg);
void processPlayerCombinedInventory2(Net::MessageIn &msg);
+ void processPlayerCombinedEquipment1(Net::MessageIn &msg);
+ void processPlayerCombinedEquipment2(Net::MessageIn &msg);
int getSlot(const int eAthenaSlot) A_WARN_UNUSED;
void processInventoryContinue(Net::MessageIn &msg,
const int len,
const NetInventoryTypeT invType);
+ void processEquipmentContinue(Net::MessageIn &msg,
+ const int len,
+ const NetInventoryTypeT invType
+ A_UNUSED);
} // namespace InventoryRecv
} // namespace EAthena
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index e8901a7b1..b631ed895 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -1311,6 +1311,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);
+ packet(SMSG_PLAYER_COMBINED_EQUIPMENT1, 0x0b0a, -1, &InventoryRecv::processPlayerCombinedEquipment1, 20180829);
}
// 20180912 re
@@ -1319,6 +1320,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);
+ packet(SMSG_PLAYER_COMBINED_EQUIPMENT2, 0x0b0a, -1, &InventoryRecv::processPlayerCombinedEquipment2, 20180912);
}
// 20180919 re
@@ -1333,6 +1335,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);
+ packet(SMSG_PLAYER_COMBINED_EQUIPMENT2, 0x0b0a, -1, &InventoryRecv::processPlayerCombinedEquipment2, 20180919);
}
// 0