From 013284123a69dfe15016b8823ecc8b8bed54c561 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 2 Apr 2016 20:18:44 +0300 Subject: Sort more packets. Add version checks inside packets. --- src/net/eathena/beingrecv.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/net/eathena/beingrecv.cpp') 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; -- cgit v1.2.3-70-g09d2