diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-02 01:17:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-02 01:17:49 +0300 |
commit | 3e49b4ca2f6de3c1ccc7503489cdbea5614ed673 (patch) | |
tree | 984894a3b4c1ab5a2c167f3f64dc635ac6bd713c /src/net/eathena/beingrecv.cpp | |
parent | d16d311387932e62e06bf6940b3ac1be26b8c6af (diff) | |
download | manaverse-3e49b4ca2f6de3c1ccc7503489cdbea5614ed673.tar.gz manaverse-3e49b4ca2f6de3c1ccc7503489cdbea5614ed673.tar.bz2 manaverse-3e49b4ca2f6de3c1ccc7503489cdbea5614ed673.tar.xz manaverse-3e49b4ca2f6de3c1ccc7503489cdbea5614ed673.zip |
Sort more packets. Add version checks inside packets.
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
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") |