AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
CreatureMovementData Struct Reference

#include "CreatureData.h"

Public Member Functions

 CreatureMovementData ()
 
bool IsGroundAllowed () const
 
bool IsSwimAllowed () const
 
bool IsFlightAllowed () const
 
bool IsRooted () const
 
CreatureChaseMovementType GetChase () const
 
CreatureRandomMovementType GetRandom () const
 
uint32 GetInteractionPauseTimer () const
 
std::string ToString () const
 

Public Attributes

CreatureGroundMovementType Ground
 
CreatureFlightMovementType Flight
 
bool Swim
 
bool Rooted
 
CreatureChaseMovementType Chase
 
CreatureRandomMovementType Random
 
uint32 InteractionPauseTimer
 

Detailed Description

Constructor & Destructor Documentation

◆ CreatureMovementData()

CreatureMovementData::CreatureMovementData ( )
Todo:
: this import is not necessary for compilation and marked as unused by the IDE
@ CONFIG_CREATURE_STOP_FOR_PLAYER
Definition IWorld.h:231
#define sWorld
Definition World.h:363
bool Swim
Definition CreatureData.h:124
bool Rooted
Definition CreatureData.h:125
CreatureRandomMovementType Random
Definition CreatureData.h:127
CreatureFlightMovementType Flight
Definition CreatureData.h:123
CreatureChaseMovementType Chase
Definition CreatureData.h:126
CreatureGroundMovementType Ground
Definition CreatureData.h:122
uint32 InteractionPauseTimer
Definition CreatureData.h:128

Member Function Documentation

◆ GetChase()

CreatureChaseMovementType CreatureMovementData::GetChase ( ) const
inline
151 {
152 return Chase;
153 }

References Chase.

Referenced by ChaseMovementGenerator< T >::DoUpdate().

◆ GetInteractionPauseTimer()

◆ GetRandom()

CreatureRandomMovementType CreatureMovementData::GetRandom ( ) const
inline
156 {
157 return Random;
158 }

References Random.

Referenced by RandomMovementGenerator< T >::_setRandomLocation().

◆ IsFlightAllowed()

bool CreatureMovementData::IsFlightAllowed ( ) const
inline
141 {
143 }

References Flight, and None.

Referenced by Creature::CanFly(), and Creature::UpdateMovementFlags().

◆ IsGroundAllowed()

bool CreatureMovementData::IsGroundAllowed ( ) const
inline

References Ground, and None.

Referenced by Creature::CanWalk().

◆ IsRooted()

bool CreatureMovementData::IsRooted ( ) const
inline
146 {
147 return Rooted;
148 }

References Rooted.

Referenced by Creature::IsRooted().

◆ IsSwimAllowed()

bool CreatureMovementData::IsSwimAllowed ( ) const
inline
136 {
137 return Swim;
138 }

References Swim.

Referenced by Creature::CanEnterWater().

◆ ToString()

std::string CreatureMovementData::ToString ( ) const
63{
64 constexpr std::array<char const*, 3> GroundStates = {"None", "Run", "Hover"};
65 constexpr std::array<char const*, 3> FlightStates = {"None", "DisableGravity", "CanFly"};
66 constexpr std::array<char const*, 3> ChaseStates = {"Run", "CanWalk", "AlwaysWalk"};
67 constexpr std::array<char const*, 3> RandomStates = {"Walk", "CanRun", "AlwaysRun"};
68
69 std::ostringstream str;
70 str << std::boolalpha
71 << "Ground: " << GroundStates[AsUnderlyingType(Ground)]
72 << ", Swim: " << Swim
73 << ", Flight: " << FlightStates[AsUnderlyingType(Flight)]
74 << ", Chase: " << ChaseStates[AsUnderlyingType(Chase)]
75 << ", Random: " << RandomStates[AsUnderlyingType(Random)];
76 if (Rooted)
77 str << ", Rooted";
78 str << ", InteractionPauseTimer: " << InteractionPauseTimer;
79
80 return str.str();
81}
constexpr std::underlying_type< E >::type AsUnderlyingType(E enumValue)
Definition Util.h:619

References AsUnderlyingType(), Chase, Flight, Ground, InteractionPauseTimer, Random, Rooted, and Swim.

Member Data Documentation

◆ Chase

◆ Flight

◆ Ground

◆ InteractionPauseTimer

uint32 CreatureMovementData::InteractionPauseTimer

◆ Random

◆ Rooted

bool CreatureMovementData::Rooted

◆ Swim

bool CreatureMovementData::Swim

The documentation for this struct was generated from the following files: