mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
fix(Core/Movement): Implement order counters (#23015)
This commit is contained in:
@@ -744,6 +744,7 @@ public:
|
||||
void SetExtraUnitMovementFlags(uint16 f) { m_movementInfo.flags2 = f; }
|
||||
|
||||
inline bool IsCrowdControlled() const { return HasFlag(UNIT_FIELD_FLAGS, (UNIT_FLAG_CONFUSED | UNIT_FLAG_FLEEING | UNIT_FLAG_STUNNED)); }
|
||||
inline bool IsImmobilizedState() const { return HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED); }
|
||||
|
||||
/*********************************************************/
|
||||
/*** UNIT TYPES, CLASSES, RACES... ***/
|
||||
@@ -826,6 +827,11 @@ public:
|
||||
bool IsValidAssistTarget(Unit const* target) const;
|
||||
bool _IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) const;
|
||||
|
||||
// Client controlled: check if unit currently is under client control (has active "mover"), optionally check for specific client (server-side)
|
||||
bool IsClientControlled(Player const* exactClient = nullptr) const;
|
||||
// Controlling client: server PoV on which client (player) controls movement of the unit at the moment, obtain "mover" (server-side)
|
||||
Player const* GetClientControlling() const;
|
||||
|
||||
// Combat range
|
||||
[[nodiscard]] float GetBoundaryRadius() const { return m_floatValues[UNIT_FIELD_BOUNDINGRADIUS]; }
|
||||
[[nodiscard]] float GetCombatReach() const override { return m_floatValues[UNIT_FIELD_COMBATREACH]; }
|
||||
@@ -1676,10 +1682,10 @@ public:
|
||||
virtual bool SetWalk(bool enable);
|
||||
virtual bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimationTier = true);
|
||||
virtual bool SetSwim(bool enable);
|
||||
virtual bool SetCanFly(bool enable, bool packetOnly = false);
|
||||
virtual bool SetWaterWalking(bool enable, bool packetOnly = false);
|
||||
virtual bool SetFeatherFall(bool enable, bool packetOnly = false);
|
||||
virtual bool SetHover(bool enable, bool packetOnly = false, bool updateAnimationTier = true);
|
||||
void SetCanFly(bool enable);
|
||||
void SetWaterWalking(bool enable);
|
||||
void SetFeatherFall(bool enable);
|
||||
void SetHover(bool enable);
|
||||
|
||||
MotionMaster* GetMotionMaster() { return i_motionMaster; }
|
||||
[[nodiscard]] const MotionMaster* GetMotionMaster() const { return i_motionMaster; }
|
||||
@@ -1706,6 +1712,7 @@ public:
|
||||
[[nodiscard]] uint8 getStandState() const { return GetByteValue(UNIT_FIELD_BYTES_1, 0); }
|
||||
[[nodiscard]] bool IsSitState() const;
|
||||
[[nodiscard]] bool IsStandState() const;
|
||||
[[nodiscard]] bool IsStandUpOnMovementState() const;
|
||||
void SetStandState(uint8 state);
|
||||
|
||||
void SetStandFlags(uint8 flags) { SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_VIS_FLAG, flags); }
|
||||
@@ -2129,8 +2136,6 @@ protected:
|
||||
bool m_applyResilience;
|
||||
bool _instantCast;
|
||||
|
||||
uint32 m_rootTimes;
|
||||
|
||||
private:
|
||||
bool IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const*& spellProcEvent, ProcEventInfo const& eventInfo);
|
||||
bool HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, ProcEventInfo const& eventInfo);
|
||||
|
||||
Reference in New Issue
Block a user