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

#include "IdleMovementGenerator.h"

Inheritance diagram for IdleMovementGenerator:
MovementGenerator

Public Member Functions

void Initialize (Unit *) override
 
void Finalize (Unit *) override
 
void Reset (Unit *) override
 
bool Update (Unit *, uint32) override
 
MovementGeneratorType GetMovementGeneratorType () 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

Member Function Documentation

◆ Finalize()

void IdleMovementGenerator::Finalize ( Unit )
inlineoverridevirtual

Implements MovementGenerator.

27{ }

◆ GetMovementGeneratorType()

MovementGeneratorType IdleMovementGenerator::GetMovementGeneratorType ( )
inlineoverridevirtual

Implements MovementGenerator.

30{ return IDLE_MOTION_TYPE; }
@ IDLE_MOTION_TYPE
Definition: MotionMaster.h:37

References IDLE_MOTION_TYPE.

◆ Initialize()

void IdleMovementGenerator::Initialize ( Unit owner)
overridevirtual

Implements MovementGenerator.

25{
26 Reset(owner);
27}
void Reset(Unit *) override
Definition: IdleMovementGenerator.cpp:29

References Reset().

◆ Reset()

void IdleMovementGenerator::Reset ( Unit owner)
overridevirtual

Implements MovementGenerator.

30{
31 if (!owner->IsStopped())
32 owner->StopMoving();
33}
bool IsStopped() const
Definition: Unit.h:1626
void StopMoving()
Definition: Unit.cpp:16637

References Unit::IsStopped(), and Unit::StopMoving().

Referenced by Initialize().

◆ Update()

bool IdleMovementGenerator::Update ( Unit ,
uint32   
)
inlineoverridevirtual

Implements MovementGenerator.

29{ return true; }