diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-17 13:15:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-17 13:15:56 +0300 |
commit | 5548875f34ea78e9917c512fb452718ccec5ced5 (patch) | |
tree | 053be91b21db5d771a63ccb86b15d4b01035eba3 /src/net/ea | |
parent | a2710185944a34f510fa1c940212617913c50dee (diff) | |
download | manaverse-5548875f34ea78e9917c512fb452718ccec5ced5.tar.gz manaverse-5548875f34ea78e9917c512fb452718ccec5ced5.tar.bz2 manaverse-5548875f34ea78e9917c512fb452718ccec5ced5.tar.xz manaverse-5548875f34ea78e9917c512fb452718ccec5ced5.zip |
Add static in beinthandler.
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/beinghandler.cpp | 38 | ||||
-rw-r--r-- | src/net/ea/beinghandler.h | 44 |
2 files changed, 43 insertions, 39 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 9f3320dd0..da6ace767 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -44,14 +44,18 @@ namespace Ea { -BeingHandler::BeingHandler(const bool enableSync) : - mSync(enableSync), - mSpawnId(0), - mHideShield(config.getBoolValue("hideShield")) +int BeingHandler::mSpawnId = 0; +bool BeingHandler::mSync = false; +bool BeingHandler::mHideShield = false; + +BeingHandler::BeingHandler(const bool enableSync) { + mSync = enableSync; + mSpawnId = 0; + mHideShield = config.getBoolValue("hideShield"); } -Being *BeingHandler::createBeing(const int id, const int16_t job) const +Being *BeingHandler::createBeing(const int id, const int16_t job) { if (!actorManager) return nullptr; @@ -74,14 +78,14 @@ void BeingHandler::setSprite(Being *const being, const unsigned int slot, const int id, const std::string &color, const unsigned char colorId, const bool isWeapon, - const bool isTempSprite) const + const bool isTempSprite) { if (!being) return; being->updateSprite(slot, id, color, colorId, isWeapon, isTempSprite); } -void BeingHandler::processBeingRemove(Net::MessageIn &msg) const +void BeingHandler::processBeingRemove(Net::MessageIn &msg) { BLOCK_START("BeingHandler::processBeingRemove") if (!actorManager || !localPlayer) @@ -132,7 +136,7 @@ void BeingHandler::processBeingRemove(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processBeingRemove") } -void BeingHandler::processSkillDamage(Net::MessageIn &msg) const +void BeingHandler::processSkillDamage(Net::MessageIn &msg) { BLOCK_START("BeingHandler::processSkillDamage") if (!actorManager) @@ -160,7 +164,7 @@ void BeingHandler::processSkillDamage(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processSkillDamage") } -void BeingHandler::processBeingAction(Net::MessageIn &msg) const +void BeingHandler::processBeingAction(Net::MessageIn &msg) { BLOCK_START("BeingHandler::processBeingAction") if (!actorManager) @@ -251,7 +255,7 @@ void BeingHandler::processBeingAction(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processBeingAction") } -void BeingHandler::processBeingEmotion(Net::MessageIn &msg) const +void BeingHandler::processBeingEmotion(Net::MessageIn &msg) { BLOCK_START("BeingHandler::processBeingEmotion") if (!localPlayer || !actorManager) @@ -281,7 +285,7 @@ void BeingHandler::processBeingEmotion(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processBeingEmotion") } -void BeingHandler::processNameResponse(Net::MessageIn &msg) const +void BeingHandler::processNameResponse(Net::MessageIn &msg) { BLOCK_START("BeingHandler::processNameResponse") if (!localPlayer || !actorManager) @@ -342,7 +346,7 @@ void BeingHandler::processNameResponse(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processNameResponse") } -void BeingHandler::processIpResponse(Net::MessageIn &msg) const +void BeingHandler::processIpResponse(Net::MessageIn &msg) { BLOCK_START("BeingHandler::processIpResponse") if (!actorManager) @@ -357,7 +361,7 @@ void BeingHandler::processIpResponse(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processIpResponse") } -void BeingHandler::processPlayerStop(Net::MessageIn &msg) const +void BeingHandler::processPlayerStop(Net::MessageIn &msg) { BLOCK_START("BeingHandler::processPlayerStop") if (!actorManager || !localPlayer) @@ -387,7 +391,7 @@ void BeingHandler::processPlayerStop(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processPlayerStop") } -void BeingHandler::processPlayerMoveToAttack(Net::MessageIn &msg) const +void BeingHandler::processPlayerMoveToAttack(Net::MessageIn &msg) { BLOCK_START("BeingHandler::processPlayerStop") msg.readInt32("target id"); @@ -402,7 +406,7 @@ void BeingHandler::processPlayerMoveToAttack(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processPlayerStop") } -void BeingHandler::processSkillNoDamage(Net::MessageIn &msg) const +void BeingHandler::processSkillNoDamage(Net::MessageIn &msg) { msg.readInt16("skill id"); msg.readInt16("heal"); @@ -411,7 +415,7 @@ void BeingHandler::processSkillNoDamage(Net::MessageIn &msg) const msg.readUInt8("fail"); } -void BeingHandler::processPvpMapMode(Net::MessageIn &msg) const +void BeingHandler::processPvpMapMode(Net::MessageIn &msg) { BLOCK_START("BeingHandler::processPvpMapMode") const Game *const game = Game::instance(); @@ -427,7 +431,7 @@ void BeingHandler::processPvpMapMode(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processPvpMapMode") } -void BeingHandler::processPvpSet(Net::MessageIn &msg) const +void BeingHandler::processPvpSet(Net::MessageIn &msg) { BLOCK_START("BeingHandler::processPvpSet") const int id = msg.readInt32("being id"); diff --git a/src/net/ea/beinghandler.h b/src/net/ea/beinghandler.h index 957dc23d8..8513df916 100644 --- a/src/net/ea/beinghandler.h +++ b/src/net/ea/beinghandler.h @@ -36,42 +36,42 @@ class BeingHandler notfinal : public Net::BeingHandler protected: explicit BeingHandler(const bool enableSync); - Being *createBeing(const int id, - const int16_t job) const A_WARN_UNUSED; + static Being *createBeing(const int id, + const int16_t job) A_WARN_UNUSED; - virtual void setSprite(Being *const being, const unsigned int slot, - const int id, - const std::string &color = "", - const unsigned char colorId = 1, - const bool isWeapon = false, - const bool isTempSprite = false) const; + static void setSprite(Being *const being, const unsigned int slot, + const int id, + const std::string &color = "", + const unsigned char colorId = 1, + const bool isWeapon = false, + const bool isTempSprite = false); - virtual void processBeingRemove(Net::MessageIn &msg) const; + static void processBeingRemove(Net::MessageIn &msg); - virtual void processSkillDamage(Net::MessageIn &msg) const; + static void processSkillDamage(Net::MessageIn &msg); - virtual void processBeingAction(Net::MessageIn &msg) const; + static void processBeingAction(Net::MessageIn &msg); - virtual void processBeingEmotion(Net::MessageIn &msg) const; + static void processBeingEmotion(Net::MessageIn &msg); - virtual void processNameResponse(Net::MessageIn &msg) const; + static void processNameResponse(Net::MessageIn &msg); - virtual void processIpResponse(Net::MessageIn &msg) const; + static void processIpResponse(Net::MessageIn &msg); - virtual void processPlayerStop(Net::MessageIn &msg) const; + static void processPlayerStop(Net::MessageIn &msg); - virtual void processPlayerMoveToAttack(Net::MessageIn &msg) const; + static void processPlayerMoveToAttack(Net::MessageIn &msg); - virtual void processSkillNoDamage(Net::MessageIn &msg) const; + static void processSkillNoDamage(Net::MessageIn &msg); - virtual void processPvpMapMode(Net::MessageIn &msg) const; + static void processPvpMapMode(Net::MessageIn &msg); - virtual void processPvpSet(Net::MessageIn &msg) const; + static void processPvpSet(Net::MessageIn &msg); // Should we honor server "Stop Walking" packets - bool mSync; - int mSpawnId; - bool mHideShield; + static int mSpawnId; + static bool mSync; + static bool mHideShield; }; } // namespace Ea |