summaryrefslogtreecommitdiff
path: root/src/net/eathena/inventoryrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-01 21:06:00 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-01 21:06:00 +0300
commit6382df8642af1f1650e48106dfecd0cbe51455ae (patch)
treef51e41d76d968ce90ba53ddcdf64953d1be70225 /src/net/eathena/inventoryrecv.cpp
parent92a0ea927379fcb8ec7da184fd38ccf84ec1c3d5 (diff)
downloadmv-6382df8642af1f1650e48106dfecd0cbe51455ae.tar.gz
mv-6382df8642af1f1650e48106dfecd0cbe51455ae.tar.bz2
mv-6382df8642af1f1650e48106dfecd0cbe51455ae.tar.xz
mv-6382df8642af1f1650e48106dfecd0cbe51455ae.zip
Sort more packets. Add version checks inside packets.
Diffstat (limited to 'src/net/eathena/inventoryrecv.cpp')
-rw-r--r--src/net/eathena/inventoryrecv.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp
index 192d90265..34e3301a1 100644
--- a/src/net/eathena/inventoryrecv.cpp
+++ b/src/net/eathena/inventoryrecv.cpp
@@ -398,7 +398,11 @@ void InventoryRecv::processPlayerEquip(Net::MessageIn &msg)
{
BLOCK_START("InventoryRecv::processPlayerEquip")
const int index = msg.readInt16("index") - INVENTORY_OFFSET;
- const int equipType = msg.readInt32("wear location");
+ int equipType;
+ if (msg.getVersion() >= 20120925)
+ equipType = msg.readInt32("wear location");
+ else
+ equipType = msg.readInt16("wear location");
msg.readInt16("sprite");
const uint8_t flag = msg.readUInt8("result");