summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-12 21:25:29 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-12 21:25:29 +0300
commite80c07028d95ea51860e55e043203693e96a8fb3 (patch)
treed60491fda061cfa6ef0d5ed2d94c0858c1d6cf12
parent6f1f0869c0976a4b033e2d16bf2f58dc252db19a (diff)
downloadplus-e80c07028d95ea51860e55e043203693e96a8fb3.tar.gz
plus-e80c07028d95ea51860e55e043203693e96a8fb3.tar.bz2
plus-e80c07028d95ea51860e55e043203693e96a8fb3.tar.xz
plus-e80c07028d95ea51860e55e043203693e96a8fb3.zip
Fix packet CMSG_PLAYER_EQUIP for old version and update id.
-rw-r--r--src/net/eathena/inventoryhandler.cpp5
-rw-r--r--src/net/eathena/packetsout.inc3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index 343eb2d15..c010f4b0f 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -88,7 +88,10 @@ void InventoryHandler::equipItem(const Item *const item) const
item->getInvIndex() + INVENTORY_OFFSET), "index");
// here we set flag for any slots,
// probably better set to slot from item properties
- outMsg.writeInt32(0xFFFFFFFFU, "wear location");
+ if (packetVersion >= 20130320)
+ outMsg.writeInt32(0xFFFFFFFFU, "wear location");
+ else
+ outMsg.writeInt16(0x7FFFU, "wear location");
}
void InventoryHandler::unequipItem(const Item *const item) const
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index d5b40e2e5..6b1b9d2c0 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -82,7 +82,7 @@ packet(CMSG_SKILL_USE_MAP, 0x011b, 20, clif->pUseSkillMap);
packet(CMSG_PLAYER_INVENTORY_USE, 0x0439, 8, clif->pUseItem);
packet(CMSG_PLAYER_INVENTORY_DROP, 0x00a2, 6, clif->pDropItem);
-packet(CMSG_PLAYER_EQUIP, 0x0998, 8, clif->pEquipItem);
+packet(CMSG_PLAYER_EQUIP, 0x00a9, 6, clif->pEquipItem);
packet(CMSG_PLAYER_UNEQUIP, 0x00ab, 4, clif->pUnequipItem);
packet(CMSG_PLAYER_USE_CARD, 0x017a, 4, clif->pUseCard);
packet(CMSG_PLAYER_INSERT_CARD, 0x017c, 6, clif->pInsertCard);
@@ -729,6 +729,7 @@ if (packetVersion >= 20130320)
packet(CMSG_HOMUNCULUS_MENU, 0x093f, 5, clif->pHomMenu);
packet(CMSG_BUYINGSTORE_CREATE, 0x0938, -1, clif->pReqOpenBuyingStore);
packet(CMSG_SKILL_USE_BEING, 0x089b, 10, clif->pUseSkillToId);
+ packet(CMSG_PLAYER_EQUIP, 0x0998, 8, clif->pEquipItem);
}
// 20130515