diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-29 23:24:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-29 23:24:05 +0300 |
commit | c593adb7fb0dffc62f1311e6c52f25bfafcdf0f4 (patch) | |
tree | fc89a0dde74c24d2876cf5833ff1d42d3ffd8c51 /src/being | |
parent | e9b375927f271808d507c5a95443d460bbd6ce92 (diff) | |
download | ManaVerse-c593adb7fb0dffc62f1311e6c52f25bfafcdf0f4.tar.gz ManaVerse-c593adb7fb0dffc62f1311e6c52f25bfafcdf0f4.tar.bz2 ManaVerse-c593adb7fb0dffc62f1311e6c52f25bfafcdf0f4.tar.xz ManaVerse-c593adb7fb0dffc62f1311e6c52f25bfafcdf0f4.zip |
Convert BeingAction enum into strong typed enum.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 2 | ||||
-rw-r--r-- | src/being/being.h | 6 | ||||
-rw-r--r-- | src/being/localplayer.cpp | 6 | ||||
-rw-r--r-- | src/being/localplayer.h | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 947e98fb6..7c250aac3 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1263,7 +1263,7 @@ getSpriteAction(Dead, DEAD) getSpriteAction(Stand, STAND) getSpriteAction(Spawn, SPAWN) -void Being::setAction(const BeingAction::Action &action, const int attackId) +void Being::setAction(const BeingActionT &action, const int attackId) { std::string currentAction = SpriteAction::INVALID; diff --git a/src/being/being.h b/src/being/being.h index 83ca7785a..d21ad8acc 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -438,13 +438,13 @@ class Being notfinal : public ActorSprite, /** * Sets the current action. */ - virtual void setAction(const BeingAction::Action &action, + virtual void setAction(const BeingActionT &action, const int attackType); /** * Get the being's action currently performed. */ - BeingAction::Action getCurrentAction() const A_WARN_UNUSED + BeingActionT getCurrentAction() const A_WARN_UNUSED { return mAction; } /** @@ -996,7 +996,7 @@ class Being notfinal : public ActorSprite, int mPreStandTime; Gender::Type mGender; - BeingAction::Action mAction; + BeingActionT mAction; BeingTypeId mSubType; /**< Subtype (graphical view, basically) */ uint8_t mDirection; /**< Facing direction */ uint8_t mDirectionDelayed; /**< Facing direction */ diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 1374eefab..4ad43b098 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -372,7 +372,7 @@ void LocalPlayer::slowLogic() BLOCK_END("LocalPlayer::slowLogic") } -void LocalPlayer::setAction(const BeingAction::Action &action, +void LocalPlayer::setAction(const BeingActionT &action, const int attackType) { if (action == BeingAction::DEAD) @@ -691,7 +691,7 @@ bool LocalPlayer::toggleSit() const if (!PacketLimiter::limitPackets(PACKET_SIT)) return false; - BeingAction::Action newAction; + BeingActionT newAction; switch (mAction) { case BeingAction::STAND: @@ -2241,7 +2241,7 @@ void LocalPlayer::imitateEmote(const Being *const being, } void LocalPlayer::imitateAction(const Being *const being, - const BeingAction::Action &action) + const BeingActionT &action) { if (!being) return; diff --git a/src/being/localplayer.h b/src/being/localplayer.h index 84089984e..e64f8fd58 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -71,7 +71,7 @@ class LocalPlayer final : public Being, void slowLogic(); - void setAction(const BeingAction::Action &action, + void setAction(const BeingActionT &action, const int attackType = 0) override final; /** @@ -250,7 +250,7 @@ class LocalPlayer final : public Being, const unsigned char emote) const; void imitateAction(const Being *const being, - const BeingAction::Action &action); + const BeingActionT &action); void imitateDirection(const Being *const being, const unsigned char dir); |