diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-14 20:47:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-14 20:47:32 +0300 |
commit | 664a3cfbd51576334c1ad522d34dd5ed1d141e45 (patch) | |
tree | f94df93a088d7a5b9fde7d2f9abcd525aebff944 | |
parent | 1c709b950363389755017e52f97ed3299be3b514 (diff) | |
download | ManaVerse-664a3cfbd51576334c1ad522d34dd5ed1d141e45.tar.gz ManaVerse-664a3cfbd51576334c1ad522d34dd5ed1d141e45.tar.bz2 ManaVerse-664a3cfbd51576334c1ad522d34dd5ed1d141e45.tar.xz ManaVerse-664a3cfbd51576334c1ad522d34dd5ed1d141e45.zip |
Move processPlaterStatusChange from ea namespace into eathena and tmwa.
-rw-r--r-- | src/net/ea/beinghandler.cpp | 28 | ||||
-rw-r--r-- | src/net/ea/beinghandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 28 | ||||
-rw-r--r-- | src/net/eathena/beinghandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 28 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.h | 2 |
6 files changed, 60 insertions, 30 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index a94f686da..4f347ae74 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -480,34 +480,6 @@ void BeingHandler::processPlayerMoveToAttack(Net::MessageIn &msg A_UNUSED) BLOCK_END("BeingHandler::processPlayerStop") } -void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) const -{ - BLOCK_START("BeingHandler::processPlayerStop") - if (!actorManager) - { - BLOCK_END("BeingHandler::processPlayerStop") - return; - } - - // Change in players' flags - const int id = msg.readInt32("account id"); - Being *const dstBeing = actorManager->findBeing(id); - if (!dstBeing) - return; - - const uint16_t stunMode = msg.readInt16("stun mode"); - uint32_t statusEffects = msg.readInt16("status effect"); - statusEffects |= (static_cast<uint32_t>(msg.readInt16("opt?"))) << 16; - msg.readUInt8("Unused?"); - - dstBeing->setStunMode(stunMode); - dstBeing->setStatusEffectBlock(0, static_cast<uint16_t>( - (statusEffects >> 16) & 0xffff)); - dstBeing->setStatusEffectBlock(16, static_cast<uint16_t>( - statusEffects & 0xffff)); - BLOCK_END("BeingHandler::processPlayerStop") -} - void BeingHandler::processSkillNoDamage(Net::MessageIn &msg) const { msg.readInt16("skill id"); diff --git a/src/net/ea/beinghandler.h b/src/net/ea/beinghandler.h index 05e3b5af4..83d7776eb 100644 --- a/src/net/ea/beinghandler.h +++ b/src/net/ea/beinghandler.h @@ -68,8 +68,6 @@ class BeingHandler notfinal : public Net::BeingHandler virtual void processPlayerMoveToAttack(Net::MessageIn &msg) const; - virtual void processPlaterStatusChange(Net::MessageIn &msg) const; - virtual void processSkillNoDamage(Net::MessageIn &msg) const; virtual void processPvpMapMode(Net::MessageIn &msg) const; diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index a52e53bf9..33d86fe8c 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -1697,4 +1697,32 @@ void BeingHandler::processSkillEntry(Net::MessageIn &msg) const msg.readUInt8("level"); } +void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) const +{ + BLOCK_START("BeingHandler::processPlayerStop") + if (!actorManager) + { + BLOCK_END("BeingHandler::processPlayerStop") + return; + } + + // Change in players' flags + const int id = msg.readInt32("account id"); + Being *const dstBeing = actorManager->findBeing(id); + if (!dstBeing) + return; + + const uint16_t stunMode = msg.readInt16("stun mode"); + uint32_t statusEffects = msg.readInt16("status effect"); + statusEffects |= (static_cast<uint32_t>(msg.readInt16("opt?"))) << 16; + msg.readUInt8("Unused?"); + + dstBeing->setStunMode(stunMode); + dstBeing->setStatusEffectBlock(0, static_cast<uint16_t>( + (statusEffects >> 16) & 0xffff)); + dstBeing->setStatusEffectBlock(16, static_cast<uint16_t>( + statusEffects & 0xffff)); + BLOCK_END("BeingHandler::processPlayerStop") +} + } // namespace EAthena diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h index 9867cb27b..607e42acf 100644 --- a/src/net/eathena/beinghandler.h +++ b/src/net/eathena/beinghandler.h @@ -99,6 +99,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler void processSkillGroundNoDamage(Net::MessageIn &msg) const; void processSkillEntry(Net::MessageIn &msg) const; + + void processPlaterStatusChange(Net::MessageIn &msg) const; }; } // namespace EAthena diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 5b62cafb4..cdc3a59f7 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -1557,4 +1557,32 @@ void BeingHandler::applyPlayerAction(Being *const being, const uint8_t type) } } +void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) const +{ + BLOCK_START("BeingHandler::processPlayerStop") + if (!actorManager) + { + BLOCK_END("BeingHandler::processPlayerStop") + return; + } + + // Change in players' flags + const int id = msg.readInt32("account id"); + Being *const dstBeing = actorManager->findBeing(id); + if (!dstBeing) + return; + + const uint16_t stunMode = msg.readInt16("stun mode"); + uint32_t statusEffects = msg.readInt16("status effect"); + statusEffects |= (static_cast<uint32_t>(msg.readInt16("opt?"))) << 16; + msg.readUInt8("Unused?"); + + dstBeing->setStunMode(stunMode); + dstBeing->setStatusEffectBlock(0, static_cast<uint16_t>( + (statusEffects >> 16) & 0xffff)); + dstBeing->setStatusEffectBlock(16, static_cast<uint16_t>( + statusEffects & 0xffff)); + BLOCK_END("BeingHandler::processPlayerStop") +} + } // namespace TmwAthena diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h index 755447175..596d56b47 100644 --- a/src/net/tmwa/beinghandler.h +++ b/src/net/tmwa/beinghandler.h @@ -79,6 +79,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler const int id, const int id2) const; + void processPlaterStatusChange(Net::MessageIn &msg) const; + static void setServerGender(Being *const being, const uint8_t gender); |