summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/inventoryrecv.cpp12
-rw-r--r--src/net/eathena/packetsin.inc7
2 files changed, 16 insertions, 3 deletions
diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp
index 8a809c825..9587da970 100644
--- a/src/net/eathena/inventoryrecv.cpp
+++ b/src/net/eathena/inventoryrecv.cpp
@@ -198,12 +198,18 @@ void InventoryRecv::processPlayerInventoryAdd(Net::MessageIn &msg)
int cards[maxCards];
for (int f = 0; f < maxCards; f++)
cards[f] = msg.readInt16("card");
- const int equipType = msg.readInt32("location");
+ int equipType;
+ if (msg.getVersion() >= 20120925)
+ equipType = msg.readInt32("location");
+ else
+ equipType = msg.readInt16("location");
const ItemTypeT itemType = static_cast<ItemTypeT>(
msg.readUInt8("item type"));
const unsigned char err = msg.readUInt8("result");
- msg.readInt32("hire expire date");
- msg.readInt16("bind on equip");
+ if (msg.getVersion() >= 20061218)
+ msg.readInt32("hire expire date");
+ if (msg.getVersion() >= 20071002)
+ msg.readInt16("bind on equip");
if ((serverVersion >= 8 || serverVersion == 0) &&
msg.getVersion() >= 20150226)
{
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 59d771b8a..d8256e53e 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -383,6 +383,12 @@ if (packetVersion >= 20060424)
packet(SMSG_MERCENARY_UPDATE, 0x02a2, 8, &MercenaryRecv::processMercenaryUpdate, 20060424);
}
+// 20061218
+if (packetVersion >= 20061218)
+{
+ packet(SMSG_PLAYER_INVENTORY_ADD, 0x029a, 27, &InventoryRecv::processPlayerInventoryAdd, 20061218);
+}
+
// 20070227
if (packetVersion >= 20070227)
{
@@ -416,6 +422,7 @@ if (packetVersion >= 20071002)
packet(SMSG_PLAYER_CART_ITEMS, 0x01ef, -1, &InventoryRecv::processPlayerCartItems, 20071002);
packet(SMSG_PLAYER_STORAGE_ITEMS, 0x0295, -1, &InventoryRecv::processPlayerStorage, 20071002);
packet(SMSG_PARTY_ITEM_PICKUP, 0x02b8, 22, &PartyRecv::processPartyItemPickup, 20071002);
+ packet(SMSG_PLAYER_INVENTORY_ADD, 0x02d4, 29, &InventoryRecv::processPlayerInventoryAdd, 20071002);
}
// 20071023