mirror of
https://github.com/mangosfour/server.git
synced 2025-12-29 16:37:04 +00:00
[11721] Simplify walk/run movement mode selection code
This commit is contained in:
parent
9d566398ad
commit
fc0eb7e9fa
10 changed files with 10 additions and 54 deletions
|
|
@ -1467,6 +1467,8 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
// recommend use MonsterMove/MonsterMoveWithSpeed for most case that correctly work with movegens
|
||||
// if used additional args in ... part then floats must explicitly casted to double
|
||||
void SendHeartBeat();
|
||||
bool IsLevitating() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_LEVITATING);}
|
||||
bool IsWalking() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_WALK_MODE);}
|
||||
|
||||
void SetInFront(Unit const* target);
|
||||
void SetFacingTo(float ori);
|
||||
|
|
@ -1886,7 +1888,6 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
void CalculateAbsorbResistBlock(Unit *pCaster, SpellNonMeleeDamage *damageInfo, SpellEntry const* spellProto, WeaponAttackType attType = BASE_ATTACK);
|
||||
void CalculateHealAbsorb(uint32 heal, uint32 *absorb);
|
||||
|
||||
void UpdateWalkMode(Unit* source, bool self = true);
|
||||
void UpdateSpeed(UnitMoveType mtype, bool forced, float ratio = 1.0f);
|
||||
float GetSpeed( UnitMoveType mtype ) const;
|
||||
float GetSpeedRate( UnitMoveType mtype ) const { return m_speed_rate[mtype]; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue