diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-01 21:06:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-01 21:06:00 +0300 |
commit | 6382df8642af1f1650e48106dfecd0cbe51455ae (patch) | |
tree | f51e41d76d968ce90ba53ddcdf64953d1be70225 /src/net/eathena/inventoryrecv.cpp | |
parent | 92a0ea927379fcb8ec7da184fd38ccf84ec1c3d5 (diff) | |
download | manaverse-6382df8642af1f1650e48106dfecd0cbe51455ae.tar.gz manaverse-6382df8642af1f1650e48106dfecd0cbe51455ae.tar.bz2 manaverse-6382df8642af1f1650e48106dfecd0cbe51455ae.tar.xz manaverse-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.cpp | 6 |
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"); |