summaryrefslogtreecommitdiff
path: root/src/net/eathena/beingrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-02 20:18:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-02 20:18:44 +0300
commit013284123a69dfe15016b8823ecc8b8bed54c561 (patch)
treee152b63b723fadf253f85d483b3d7044de97cd77 /src/net/eathena/beingrecv.cpp
parent9a3120e7c3d89c3d35d5032114b387e49d462154 (diff)
downloadplus-013284123a69dfe15016b8823ecc8b8bed54c561.tar.gz
plus-013284123a69dfe15016b8823ecc8b8bed54c561.tar.bz2
plus-013284123a69dfe15016b8823ecc8b8bed54c561.tar.xz
plus-013284123a69dfe15016b8823ecc8b8bed54c561.zip
Sort more packets. Add version checks inside packets.
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r--src/net/eathena/beingrecv.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 057617a1c..5d8056d0f 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -1165,15 +1165,21 @@ void BeingRecv::processSkillGroundNoDamage(Net::MessageIn &msg)
void BeingRecv::processSkillEntry(Net::MessageIn &msg)
{
- msg.readInt16("len");
+ if (msg.getVersion() >= 20110718)
+ msg.readInt16("len");
const BeingId id = msg.readBeingId("skill unit id");
const BeingId creatorId = msg.readBeingId("creator accound id");
const int x = msg.readInt16("x");
const int y = msg.readInt16("y");
- const int job = msg.readInt32("job");
- msg.readUInt8("radius");
+ int job = 0;
+ if (msg.getVersion() >= 20121212)
+ job = msg.readInt32("job");
+ if (msg.getVersion() >= 20110718)
+ msg.readUInt8("radius");
msg.readUInt8("visible");
- const int level = msg.readUInt8("level");
+ int level = 0;
+ if (msg.getVersion() >= 20130731)
+ level = msg.readUInt8("level");
Being *const dstBeing = createBeing2(msg, id, job, BeingType::SKILL);
if (!dstBeing)
return;