AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
AssistanceMovementGenerator Class Reference

#include "PointMovementGenerator.h"

Inheritance diagram for AssistanceMovementGenerator:
PointMovementGenerator< Creature > MovementGeneratorMedium< T, D > MovementGenerator

Public Member Functions

 AssistanceMovementGenerator (float _x, float _y, float _z)
 
MovementGeneratorType GetMovementGeneratorType ()
 
void Finalize (Unit *)
 
- Public Member Functions inherited from PointMovementGenerator< Creature >
 PointMovementGenerator (uint32 _id, float _x, float _y, float _z, float _speed=0.0f, float orientation=0.0f, const Movement::PointsArray *_path=nullptr, bool generatePath=false, bool forceDestination=false, ObjectGuid chargeTargetGUID=ObjectGuid::Empty)
 
void DoInitialize (Creature *)
 
void DoFinalize (Creature *)
 
void DoReset (Creature *)
 
bool DoUpdate (Creature *, uint32)
 
void MovementInform (Creature *)
 
void unitSpeedChanged ()
 
MovementGeneratorType GetMovementGeneratorType ()
 
bool GetDestination (float &x, float &y, float &z) const
 
- Public Member Functions inherited from MovementGeneratorMedium< T, D >
void Initialize (Unit *u) override
 
void Finalize (Unit *u) override
 
void Reset (Unit *u) override
 
bool Update (Unit *u, uint32 time_diff) override
 
- Public Member Functions inherited from MovementGenerator
virtual ~MovementGenerator ()
 
virtual void Initialize (Unit *)=0
 
virtual void Finalize (Unit *)=0
 
virtual void Reset (Unit *)=0
 
virtual bool Update (Unit *, uint32 time_diff)=0
 
virtual MovementGeneratorType GetMovementGeneratorType ()=0
 
virtual uint32 GetSplineId () const
 
virtual void unitSpeedChanged ()
 
virtual void Pause (uint32)
 
virtual void Resume (uint32)
 
virtual bool GetResetPosition (float &, float &, float &)
 

Detailed Description

Constructor & Destructor Documentation

◆ AssistanceMovementGenerator()

AssistanceMovementGenerator::AssistanceMovementGenerator ( float  _x,
float  _y,
float  _z 
)
inline
64 :
65 PointMovementGenerator<Creature>(0, _x, _y, _z) {}
Definition: PointMovementGenerator.h:26

Member Function Documentation

◆ Finalize()

void AssistanceMovementGenerator::Finalize ( Unit unit)
virtual

Reimplemented from MovementGeneratorMedium< T, D >.

220{
221 unit->ToCreature()->SetNoCallAssistance(false);
222 unit->ToCreature()->CallAssistance();
223 if (unit->IsAlive())
225}
@ CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY
Definition: IWorld.h:287
#define sWorld
Definition: World.h:444
void CallAssistance(Unit *target=nullptr)
Definition: Creature.cpp:2428
void SetNoCallAssistance(bool val)
Definition: Creature.h:268
Creature * ToCreature()
Definition: Object.h:202
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
bool IsAlive() const
Definition: Unit.h:1204
void MoveSeekAssistanceDistract(uint32 timer)
Definition: MotionMaster.cpp:723

References Creature::CallAssistance(), CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY, Unit::GetMotionMaster(), Unit::IsAlive(), MotionMaster::MoveSeekAssistanceDistract(), Creature::SetNoCallAssistance(), sWorld, and Object::ToCreature().

◆ GetMovementGeneratorType()

MovementGeneratorType AssistanceMovementGenerator::GetMovementGeneratorType ( )
inlinevirtual

Implements MovementGenerator.

67{ return ASSISTANCE_MOTION_TYPE; }
@ ASSISTANCE_MOTION_TYPE
Definition: MotionMaster.h:49

References ASSISTANCE_MOTION_TYPE.