From 3e49b4ca2f6de3c1ccc7503489cdbea5614ed673 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 2 Apr 2016 01:17:49 +0300 Subject: Sort more packets. Add version checks inside packets. --- src/net/eathena/beingrecv.cpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'src/net/eathena/beingrecv.cpp') diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index be49cd625..e037f444d 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -1199,7 +1199,11 @@ void BeingRecv::processPlayerStatusChange(Net::MessageIn &msg) const uint32_t opt1 = msg.readInt16("opt1"); const uint32_t opt2 = msg.readInt16("opt2"); - const uint32_t option = msg.readInt32("option"); + uint32_t option; + if (msg.getVersion() >= 7) + option = msg.readInt32("option"); + else + option = msg.readInt16("option"); dstBeing->setKarma(msg.readUInt8("karma")); dstBeing->setStatusEffectOpitons(option, @@ -1226,20 +1230,6 @@ void BeingRecv::processPlayerStatusChange2(Net::MessageIn &msg) dstBeing->setStatusEffectOpiton0(option); } -void BeingRecv::processPlayerStatusChangeNoTick(Net::MessageIn &msg) -{ - const uint16_t status = msg.readInt16("index"); - const BeingId id = msg.readBeingId("account id"); - const Enable flag = fromBool(msg.readUInt8("state") - ? true : false, Enable); - - Being *const dstBeing = actorManager->findBeing(id); - if (!dstBeing) - return; - - dstBeing->setStatusEffect(status, flag); -} - void BeingRecv::processBeingResurrect(Net::MessageIn &msg) { BLOCK_START("BeingRecv::processBeingResurrect") -- cgit v1.2.3-70-g09d2