TrinityCore
PointMovementGenerator Class Reference

#include <PointMovementGenerator.h>

+ Inheritance diagram for PointMovementGenerator:

Public Member Functions

 PointMovementGenerator (uint32 id, float x, float y, float z, bool generatePath, Optional< float > speed={}, Optional< float > finalOrient={}, Unit const *faceTarget=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
 
MovementGeneratorType GetMovementGeneratorType () const override
 
void Initialize (Unit *owner) override
 
void Reset (Unit *owner) override
 
bool Update (Unit *owner, uint32 diff) override
 
void Deactivate (Unit *owner) override
 
void Finalize (Unit *owner, bool active, bool movementInform) override
 
void UnitSpeedChanged () override
 
uint32 GetId () const
 
- Public Member Functions inherited from MovementGenerator
 MovementGenerator ()
 
 MovementGenerator (MovementGenerator const &)=delete
 
 MovementGenerator (MovementGenerator &&)=delete
 
MovementGeneratoroperator= (MovementGenerator const &)=delete
 
MovementGeneratoroperator= (MovementGenerator &&)=delete
 
virtual ~MovementGenerator ()
 
virtual void Initialize (Unit *owner)=0
 
virtual void Reset (Unit *owner)=0
 
virtual bool Update (Unit *owner, uint32 diff)=0
 
virtual void Deactivate (Unit *owner)=0
 
virtual void Finalize (Unit *owner, bool active, bool movementInform)=0
 
virtual MovementGeneratorType GetMovementGeneratorType () const =0
 
virtual void UnitSpeedChanged ()
 
virtual void Pause (uint32)
 
virtual void Resume (uint32)
 
virtual bool GetResetPosition (Unit *, float &, float &, float &)
 
void AddFlag (uint16 const flag)
 
bool HasFlag (uint16 const flag) const
 
void RemoveFlag (uint16 const flag)
 
virtual std::string GetDebugInfo () const
 

Private Member Functions

void MovementInform (Unit *)
 

Private Attributes

uint32 _movementId
 
Position _destination
 
Optional< float > _speed
 
bool _generatePath
 
Optional< float > _finalOrient
 if set then unit will turn to specified _orient in provided _pos More...
 
Unit const * i_faceTarget
 
std::unique_ptr< Movement::SpellEffectExtraDatai_spellEffectExtra
 
MovementWalkRunSpeedSelectionMode _speedSelectionMode
 
Optional< float > _closeEnoughDistance
 

Additional Inherited Members

- Public Attributes inherited from MovementGenerator
uint8 Mode
 
uint8 Priority
 
uint16 Flags
 
uint32 BaseUnitState
 

Detailed Description

Definition at line 31 of file PointMovementGenerator.h.

Constructor & Destructor Documentation

◆ PointMovementGenerator()

PointMovementGenerator::PointMovementGenerator ( uint32  id,
float  x,
float  y,
float  z,
bool  generatePath,
Optional< float >  speed = {},
Optional< float >  finalOrient = {},
Unit const *  faceTarget = nullptr,
Movement::SpellEffectExtraData const *  spellEffectExtraData = nullptr,
MovementWalkRunSpeedSelectionMode  speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default,
Optional< float >  closeEnoughDistance = {} 
)
explicit

Definition at line 31 of file PointMovementGenerator.cpp.

Member Function Documentation

◆ Deactivate()

void PointMovementGenerator::Deactivate ( Unit owner)
overridevirtual

Implements MovementGenerator.

Definition at line 180 of file PointMovementGenerator.cpp.

+ Here is the call graph for this function:

◆ Finalize()

void PointMovementGenerator::Finalize ( Unit owner,
bool  active,
bool  movementInform 
)
overridevirtual

Implements MovementGenerator.

Reimplemented in AssistanceMovementGenerator.

Definition at line 186 of file PointMovementGenerator.cpp.

+ Here is the call graph for this function:

◆ GetId()

uint32 PointMovementGenerator::GetId ( ) const
inline

Definition at line 49 of file PointMovementGenerator.h.

◆ GetMovementGeneratorType()

MovementGeneratorType PointMovementGenerator::GetMovementGeneratorType ( ) const
overridevirtual

Implements MovementGenerator.

Reimplemented in AssistanceMovementGenerator.

Definition at line 47 of file PointMovementGenerator.cpp.

◆ Initialize()

void PointMovementGenerator::Initialize ( Unit owner)
overridevirtual

Implements MovementGenerator.

Definition at line 52 of file PointMovementGenerator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MovementInform()

void PointMovementGenerator::MovementInform ( Unit owner)
private

Definition at line 196 of file PointMovementGenerator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Reset()

void PointMovementGenerator::Reset ( Unit owner)
overridevirtual

Implements MovementGenerator.

Definition at line 125 of file PointMovementGenerator.cpp.

+ Here is the call graph for this function:

◆ UnitSpeedChanged()

void PointMovementGenerator::UnitSpeedChanged ( )
inlineoverridevirtual

Reimplemented from MovementGenerator.

Definition at line 47 of file PointMovementGenerator.h.

+ Here is the call graph for this function:

◆ Update()

bool PointMovementGenerator::Update ( Unit owner,
uint32  diff 
)
overridevirtual

Implements MovementGenerator.

Definition at line 132 of file PointMovementGenerator.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ _closeEnoughDistance

Optional<float> PointMovementGenerator::_closeEnoughDistance
private

Definition at line 63 of file PointMovementGenerator.h.

◆ _destination

Position PointMovementGenerator::_destination
private

Definition at line 55 of file PointMovementGenerator.h.

◆ _finalOrient

Optional<float> PointMovementGenerator::_finalOrient
private

if set then unit will turn to specified _orient in provided _pos

Definition at line 59 of file PointMovementGenerator.h.

◆ _generatePath

bool PointMovementGenerator::_generatePath
private

Definition at line 57 of file PointMovementGenerator.h.

◆ _movementId

uint32 PointMovementGenerator::_movementId
private

Definition at line 54 of file PointMovementGenerator.h.

◆ _speed

Optional<float> PointMovementGenerator::_speed
private

Definition at line 56 of file PointMovementGenerator.h.

◆ _speedSelectionMode

MovementWalkRunSpeedSelectionMode PointMovementGenerator::_speedSelectionMode
private

Definition at line 62 of file PointMovementGenerator.h.

◆ i_faceTarget

Unit const* PointMovementGenerator::i_faceTarget
private

Definition at line 60 of file PointMovementGenerator.h.

◆ i_spellEffectExtra

std::unique_ptr<Movement::SpellEffectExtraData> PointMovementGenerator::i_spellEffectExtra
private

Definition at line 61 of file PointMovementGenerator.h.


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