TrinityCore
Loading...
Searching...
No Matches
MotionMaster Class Reference

#include <MotionMaster.h>

Classes

class  DelayedAction
 

Public Types

typedef std::function< void()> DelayedActionDefine
 
typedef std::function< bool()> DelayedActionValidator
 

Public Member Functions

 MotionMaster (Unit *unit)
 
 ~MotionMaster ()
 
void Initialize ()
 
void InitializeDefault ()
 
void AddToWorld ()
 
bool Empty () const
 
uint32 Size () const
 
std::vector< MovementGeneratorInformation > GetMovementGeneratorsInformation () const
 
MovementSlot GetCurrentSlot () const
 
MovementGenerator * GetCurrentMovementGenerator () const
 
MovementGeneratorType GetCurrentMovementGeneratorType () const
 
MovementGeneratorType GetCurrentMovementGeneratorType (MovementSlot slot) const
 
MovementGenerator * GetCurrentMovementGenerator (MovementSlot slot) const
 
MovementGenerator * GetMovementGenerator (std::function< bool(MovementGenerator const *)> const &filter, MovementSlot slot=MOTION_SLOT_ACTIVE) const
 
bool HasMovementGenerator (std::function< bool(MovementGenerator const *)> const &filter, MovementSlot slot=MOTION_SLOT_ACTIVE) const
 
void Update (uint32 diff)
 
void Add (MovementGenerator *movement, MovementSlot slot=MOTION_SLOT_ACTIVE)
 
void Remove (MovementGenerator *movement, MovementSlot slot=MOTION_SLOT_ACTIVE)
 
void Remove (MovementGeneratorType type, MovementSlot slot=MOTION_SLOT_ACTIVE)
 
void Clear ()
 
void Clear (MovementSlot slot)
 
void Clear (MovementGeneratorPriority priority)
 
void PropagateSpeedChange ()
 
bool GetDestination (float &x, float &y, float &z)
 
bool StopOnDeath ()
 
void InterruptOnTeleport ()
 
void MoveIdle ()
 
void MoveTargetedHome ()
 
void MoveRandom (float wanderDistance=0.0f)
 
void MoveFollow (Unit *target, float dist, ChaseAngle angle, MovementSlot slot=MOTION_SLOT_ACTIVE)
 
void MoveChase (Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
 
void MoveChase (Unit *target, float dist, float angle)
 
void MoveChase (Unit *target, float dist)
 
void MoveConfused ()
 
void MoveFleeing (Unit *enemy, uint32 time=0)
 
void MovePoint (uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
 
void MovePoint (uint32 id, float x, float y, float z, bool generatePath=true, Optional< float > finalOrient={})
 
void MoveCloserAndStop (uint32 id, Unit *target, float distance)
 
void MoveLand (uint32 id, Position const &pos, Optional< float > velocity={})
 
void MoveTakeoff (uint32 id, Position const &pos, Optional< float > velocity={})
 
void MoveCharge (float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, bool generatePath=false)
 
void MoveCharge (PathGenerator const &path, float speed=SPEED_CHARGE)
 
void MoveKnockbackFrom (float srcX, float srcY, float speedXY, float speedZ)
 
void MoveJumpTo (float angle, float speedXY, float speedZ)
 
void MoveJump (Position const &pos, float speedXY, float speedZ, uint32 id=EVENT_JUMP, bool hasOrientation=false)
 
void MoveJump (float x, float y, float z, float o, float speedXY, float speedZ, uint32 id=EVENT_JUMP, bool hasOrientation=false)
 
void MoveCirclePath (float x, float y, float z, float radius, bool clockwise, uint8 stepCount)
 
void MoveSmoothPath (uint32 pointId, Position const *pathPoints, size_t pathSize, bool walk)
 
void MoveAlongSplineChain (uint32 pointId, uint16 dbChainId, bool walk)
 
void MoveAlongSplineChain (uint32 pointId, std::vector< SplineChainLink > const &chain, bool walk)
 
void ResumeSplineChain (SplineChainResumeInfo const &info)
 
void MoveFall (uint32 id=0)
 
void MoveSeekAssistance (float x, float y, float z)
 
void MoveSeekAssistanceDistract (uint32 timer)
 
void MoveTaxiFlight (uint32 path, uint32 pathnode)
 
void MoveDistract (uint32 time, float orientation)
 
void MovePath (uint32 pathId, bool repeatable)
 
void MovePath (WaypointPath &path, bool repeatable)
 
void MoveRotate (uint32 id, uint32 time, RotateDirection direction)
 
void MoveFormation (Unit *leader, float range, float angle, uint32 point1, uint32 point2)
 
void MoveFace (float orientation, uint32 id=EVENT_FACE)
 
void MoveFace (WorldObject const *object, uint32 id=EVENT_FACE)
 
void LaunchMoveSpline (std::function< void(Movement::MoveSplineInit &init)> &&initializer, uint32 id=0, MovementGeneratorPriority priority=MOTION_PRIORITY_NORMAL, MovementGeneratorType type=EFFECT_MOTION_TYPE)
 

Private Types

typedef std::unique_ptr< MovementGenerator, MovementGeneratorDeleter > MovementGeneratorPointer
 
typedef std::set< MovementGenerator *, MovementGeneratorComparator > MotionMasterContainer
 
typedef std::unordered_multimap< uint32, MovementGenerator const * > MotionMasterUnitStatesContainer
 

Private Member Functions

void AddFlag (uint8 const flag)
 
bool HasFlag (uint8 const flag) const
 
void RemoveFlag (uint8 const flag)
 
void ResolveDelayedActions ()
 
void Remove (MotionMasterContainer::iterator &iterator, bool active, bool movementInform)
 
void Pop (bool active, bool movementInform)
 
void DirectInitialize ()
 
void DirectClear ()
 
void DirectClearDefault ()
 
void DirectClear (std::function< bool(MovementGenerator *)> const &filter)
 
void DirectAdd (MovementGenerator *movement, MovementSlot slot)
 
void Delete (MovementGenerator *movement, bool active, bool movementInform)
 
void DeleteDefault (bool active, bool movementInform)
 
void AddBaseUnitState (MovementGenerator const *movement)
 
void ClearBaseUnitState (MovementGenerator const *movement)
 
void ClearBaseUnitStates ()
 

Private Attributes

Unit * _owner
 
MovementGeneratorPointer _defaultGenerator
 
MotionMasterContainer _generators
 
MotionMasterUnitStatesContainer _baseUnitStatesMap
 
std::deque< DelayedAction > _delayedActions
 
uint8 _flags
 

Detailed Description

Definition at line 94 of file MotionMaster.h.

Member Typedef Documentation

◆ DelayedActionDefine

typedef std::function<void()> MotionMaster::DelayedActionDefine

Definition at line 97 of file MotionMaster.h.

◆ DelayedActionValidator

typedef std::function<bool()> MotionMaster::DelayedActionValidator

Definition at line 98 of file MotionMaster.h.

◆ MotionMasterContainer

◆ MotionMasterUnitStatesContainer

typedef std::unordered_multimap<uint32, MovementGenerator const*> MotionMaster::MotionMasterUnitStatesContainer
private

Definition at line 201 of file MotionMaster.h.

◆ MovementGeneratorPointer

Definition at line 199 of file MotionMaster.h.

Constructor & Destructor Documentation

◆ MotionMaster()

MotionMaster::MotionMaster ( Unit *  unit)
explicit

Definition at line 80 of file MotionMaster.cpp.

◆ ~MotionMaster()

MotionMaster::~MotionMaster ( )

Definition at line 82 of file MotionMaster.cpp.

References _delayedActions, _generators, and MovementGeneratorPointerDeleter().

Member Function Documentation

◆ Add()

◆ AddBaseUnitState()

void MotionMaster::AddBaseUnitState ( MovementGenerator const *  movement)
private

◆ AddFlag()

void MotionMaster::AddFlag ( uint8 const  flag)
inlineprivate

Definition at line 203 of file MotionMaster.h.

Referenced by AddToWorld(), DeleteDefault(), DirectAdd(), and Update().

◆ AddToWorld()

◆ Clear() [1/3]

void MotionMaster::Clear ( )

Definition at line 426 of file MotionMaster.cpp.

References _delayedActions, Clear(), DirectClear(), Empty(), HasFlag(), MOTIONMASTER_DELAYED_CLEAR, and MOTIONMASTER_FLAG_DELAYED.

Referenced by npc_elwynn_forest_wolf::_ScheduleAfterChasingEvents(), SmartAI::AttackStart(), boss_ionar::CallBackSparks(), Clear(), Clear(), Clear(), Map::CreatureRespawnRelocation(), boss_scarlet_commander_mograine::DamageTaken(), boss_high_inquisitor_whitemane::DamageTaken(), boss_drakkari_colossus::DamageTaken(), boss_drakkari_elemental::DamageTaken(), boss_aerial_command_unit::boss_aerial_command_unitAI::DamageTaken(), npc_kinetic_bomb::DoAction(), boss_malygos::DoAction(), boss_illidan_stormrage::DoAction(), boss_headless_horseman::DoAction(), npc_martha_goslin::npc_martha_goslinAI::DoAction(), npc_argent_captainAI::EnterEvadeMode(), npc_daegarn::EnterEvadeMode(), CreatureAI::EnterEvadeMode(), npc_pet_dk_rune_weapon::EnterEvadeMode(), npc_pet_mage_mirror_image::EnterEvadeMode(), ScriptedAI::ForceCombatStop(), boss_felmyst::HandleFlightSequence(), spell_sapphiron_change_blizzard_target::HandlePeriodic(), WorldSession::HandlePetActionHelper(), spell_gen_pet_wait::HandleScript(), npc_enslaved_soul::HandleSoulRelease(), npc_zulian_prowler::JustEngagedWith(), npc_headless_horseman_head::JustReachedHome(), npc_rocket_propelled_warhead::JustReachedHome(), boss_ionar::JustSummoned(), npc_anubarak_spike::MoveInLineOfSight(), npc_aged_dying_ancient_kodo::npc_aged_dying_ancient_kodoAI::MoveInLineOfSight(), npc_ashtongue_sorcerer::MoveInLineOfSight(), npc_wild_wyrm::MovementInform(), dummy_dragonAI::MovementInform(), MoveTargetedHome(), SimpleCharmedPlayerAI::OnCharmed(), npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI::Reset(), Unit::SetCharmedBy(), npc_zombie_chow::SetData(), boss_hadronox::SetStep(), boss_ionar::SpellHit(), npc_aged_dying_ancient_kodo::npc_aged_dying_ancient_kodoAI::SpellHit(), npc_pet_dk_ebon_gargoyle::SpellHit(), EscortAI::Start(), FollowerAI::StartFollow(), PetAI::StopAttack(), SmartAI::StopFollow(), StopOnDeath(), boss_felblood_kaelthas::UpdateAI(), boss_selin_fireheart::UpdateAI(), npc_headless_horseman_head::UpdateAI(), npc_giant_infernal::npc_giant_infernalAI::UpdateAI(), npc_frost_wyrm::npc_frost_wyrmAI::UpdateAI(), npc_gargoyle::npc_gargoyleAI::UpdateAI(), npc_draenei_survivor::npc_draenei_survivorAI::UpdateAI(), boss_hadronox::UpdateAI(), boss_devourer_of_souls::UpdateAI(), npc_quel_delar_sword::npc_quel_delar_swordAI::UpdateAI(), npc_kinetic_bomb::UpdateAI(), npc_strangulate_vehicle::UpdateAI(), boss_noth::UpdateAI(), npc_commander_eligor_dawnbringer::UpdateAI(), npc_brann_bronzebeard_keystone::UpdateAI(), boss_alar::UpdateAI(), npc_mature_netherwing_drake::npc_mature_netherwing_drakeAI::UpdateAI(), npc_dream_fog::npc_dream_fogAI::UpdateAI(), boss_mr_smite::boss_mr_smiteAI::UpdateAI(), and npc_spark_of_ionar::UpdateAI().

◆ Clear() [2/3]

◆ Clear() [3/3]

◆ ClearBaseUnitState()

void MotionMaster::ClearBaseUnitState ( MovementGenerator const *  movement)
private

◆ ClearBaseUnitStates()

void MotionMaster::ClearBaseUnitStates ( )
private

Definition at line 1239 of file MotionMaster.cpp.

References _baseUnitStatesMap, _owner, and Unit::ClearUnitState().

Referenced by DirectClear().

◆ Delete()

◆ DeleteDefault()

void MotionMaster::DeleteDefault ( bool  active,
bool  movementInform 
)
private

◆ DirectAdd()

◆ DirectClear() [1/2]

void MotionMaster::DirectClear ( )
private

Definition at line 1123 of file MotionMaster.cpp.

References _generators, ClearBaseUnitStates(), and Pop().

Referenced by Clear(), Clear(), Clear(), DirectInitialize(), and Remove().

◆ DirectClear() [2/2]

void MotionMaster::DirectClear ( std::function< bool(MovementGenerator *)> const &  filter)
private

Definition at line 1143 of file MotionMaster.cpp.

References _generators, GetCurrentMovementGenerator(), and Remove().

◆ DirectClearDefault()

void MotionMaster::DirectClearDefault ( )
private

Definition at line 1137 of file MotionMaster.cpp.

References _defaultGenerator, _generators, and DeleteDefault().

Referenced by Clear(), DirectInitialize(), Remove(), and Remove().

◆ DirectInitialize()

void MotionMaster::DirectInitialize ( )
private

Definition at line 1114 of file MotionMaster.cpp.

References DirectClear(), DirectClearDefault(), and InitializeDefault().

Referenced by AddToWorld(), and Initialize().

◆ Empty()

◆ GetCurrentMovementGenerator() [1/2]

◆ GetCurrentMovementGenerator() [2/2]

MovementGenerator * MotionMaster::GetCurrentMovementGenerator ( MovementSlot  slot) const

◆ GetCurrentMovementGeneratorType() [1/2]

◆ GetCurrentMovementGeneratorType() [2/2]

MovementGeneratorType MotionMaster::GetCurrentMovementGeneratorType ( MovementSlot  slot) const

◆ GetCurrentSlot()

MovementSlot MotionMaster::GetCurrentSlot ( ) const

◆ GetDestination()

bool MotionMaster::GetDestination ( float &  x,
float &  y,
float &  z 
)

◆ GetMovementGenerator()

◆ GetMovementGeneratorsInformation()

◆ HasFlag()

bool MotionMaster::HasFlag ( uint8 const  flag) const
inlineprivate

Definition at line 204 of file MotionMaster.h.

Referenced by Add(), AddToWorld(), Clear(), Clear(), Clear(), Initialize(), Remove(), Remove(), and Update().

◆ HasMovementGenerator()

bool MotionMaster::HasMovementGenerator ( std::function< bool(MovementGenerator const *)> const &  filter,
MovementSlot  slot = MOTION_SLOT_ACTIVE 
) const

◆ Initialize()

◆ InitializeDefault()

void MotionMaster::InitializeDefault ( )

◆ InterruptOnTeleport()

void MotionMaster::InterruptOnTeleport ( )

◆ LaunchMoveSpline()

◆ MoveAlongSplineChain() [1/2]

void MotionMaster::MoveAlongSplineChain ( uint32  pointId,
std::vector< SplineChainLink > const &  chain,
bool  walk 
)

Definition at line 897 of file MotionMaster.cpp.

References Add().

◆ MoveAlongSplineChain() [2/2]

void MotionMaster::MoveAlongSplineChain ( uint32  pointId,
uint16  dbChainId,
bool  walk 
)

Definition at line 880 of file MotionMaster.cpp.

References _owner, Object::GetGUID(), MoveAlongSplineChain(), sScriptSystemMgr, TC_LOG_ERROR, Object::ToCreature(), and ObjectGuid::ToString().

Referenced by npc_arthas_stratholme::npc_arthas_stratholmeAI::AdvanceToState(), boss_nightbane::boss_nightbaneAI::DoAction(), npc_brann_bronzebeard_algalon::DoAction(), boss_nightbane::boss_nightbaneAI::ExecuteEvent(), boss_twin_baseAI::ExecuteEvent(), npc_expedition_engineer::HandleBaseMovement(), npc_expedition_engineer::HandleFourthHarpoonMovement(), npc_expedition_engineer::HandleHarpoonMovement(), boss_northrend_beastsAI::HandleInitialMovement(), npc_expedition_engineer::HandleSecondHarpoonMovement(), npc_expedition_engineer::HandleThirdHarpoonMovement(), npc_jena_anderson::npc_jena_andersonAI::InitializeAI(), npc_malcolm_moore::npc_malcolm_mooreAI::InitializeAI(), MoveAlongSplineChain(), npc_arthas_stratholme::npc_arthas_stratholmeAI::MoveInfiniteOnSpawn(), npc_malcolm_moore::npc_malcolm_mooreAI::MovementInform(), npc_grauf::MovementInform(), npc_onyx_flamecaller::MoveToGeneral(), npc_barrett_toc::OnGossipSelect(), npc_akama_illidan::OnGossipSelect(), npc_grauf::PassengerBoarded(), npc_barrett_toc::SendActionToTirion(), npc_arthas_stratholme::npc_arthas_stratholmeAI::SetGUID(), npc_martha_goslin::npc_martha_goslinAI::UpdateAI(), npc_jena_anderson::npc_jena_andersonAI::UpdateAI(), npc_bartleby_battson::npc_bartleby_battsonAI::UpdateAI(), npc_malcolm_moore::npc_malcolm_mooreAI::UpdateAI(), npc_sergeant_morigan::npc_sergeant_moriganAI::UpdateAI(), npc_roger_owens::npc_roger_owensAI::UpdateAI(), npc_arthas_stratholme::npc_arthas_stratholmeAI::UpdateAI(), boss_jaraxxus::UpdateAI(), boss_lich_king_toc::UpdateAI(), npc_fizzlebang_toc::UpdateAI(), npc_brann_bronzebeard_algalon::UpdateAI(), and npc_akama_illidan::UpdateAI().

◆ MoveCharge() [1/2]

◆ MoveCharge() [2/2]

◆ MoveChase() [1/3]

void MotionMaster::MoveChase ( Unit *  target,
float  dist 
)
inline

Definition at line 159 of file MotionMaster.h.

References MoveChase().

Referenced by MoveChase().

◆ MoveChase() [2/3]

void MotionMaster::MoveChase ( Unit *  target,
float  dist,
float  angle 
)
inline

Definition at line 158 of file MotionMaster.h.

References MoveChase().

Referenced by MoveChase().

◆ MoveChase() [3/3]

void MotionMaster::MoveChase ( Unit *  target,
Optional< ChaseRange >  dist = {},
Optional< ChaseAngle >  angle = {} 
)

◆ MoveCirclePath()

◆ MoveCloserAndStop()

◆ MoveConfused()

void MotionMaster::MoveConfused ( )

◆ MoveDistract()

void MotionMaster::MoveDistract ( uint32  time,
float  orientation 
)

◆ MoveFace() [1/2]

void MotionMaster::MoveFace ( float  orientation,
uint32  id = EVENT_FACE 
)

◆ MoveFace() [2/2]

void MotionMaster::MoveFace ( WorldObject const *  object,
uint32  id = EVENT_FACE 
)

Definition at line 1058 of file MotionMaster.cpp.

References _owner, Add(), FACE_MOTION_TYPE, Object::GetGUID(), and TC_LOG_DEBUG.

◆ MoveFall()

◆ MoveFleeing()

void MotionMaster::MoveFleeing ( Unit *  enemy,
uint32  time = 0 
)

◆ MoveFollow()

void MotionMaster::MoveFollow ( Unit *  target,
float  dist,
ChaseAngle  angle,
MovementSlot  slot = MOTION_SLOT_ACTIVE 
)

Definition at line 582 of file MotionMaster.cpp.

References _owner, Add(), Object::GetGUID(), TC_LOG_DEBUG, and ObjectGuid::ToString().

Referenced by npc_argent_captainAI::DoAction(), npc_argent_captainAI::EnterEvadeMode(), npc_daegarn::EnterEvadeMode(), CreatureAI::EnterEvadeMode(), SmartAI::EnterEvadeMode(), npc_pet_dk_rune_weapon::EnterEvadeMode(), npc_pet_mage_mirror_image::EnterEvadeMode(), AuraEffect::HandleModPossessPet(), npc_commandscript::HandleNpcFollowCommand(), spell_sapphiron_change_blizzard_target::HandlePeriodic(), WorldSession::HandlePetActionHelper(), PetAI::HandleReturnMovement(), npc_troll_volunteer::InitializeAI(), npc_spirit_shade::npc_spirit_shadeAI::IsSummonedBy(), npc_void_traveler::JustAppeared(), npc_enchanted_elemental::JustAppeared(), FollowerAI::JustReachedHome(), boss_felblood_kaelthas::JustSummoned(), boss_bronjahm::JustSummoned(), boss_the_lich_king::JustSummoned(), boss_xevozz::JustSummoned(), boss_vexallus::JustSummoned(), npc_restless_soul::npc_restless_soulAI::JustSummoned(), boss_ionar::JustSummoned(), npc_power_spark::MoveToMalygos(), PetAI::OnCharmed(), SmartAI::OnCharmed(), npc_jungle_punch_target::proceedCwEvent(), npc_lake_frog::ReceiveEmote(), npc_scrapbot::Reset(), npc_boombot::Reset(), SmartAI::SetFollow(), FollowerAI::SetFollowPaused(), boss_attumen::boss_attumenAI::SpellHit(), npc_aged_dying_ancient_kodo::npc_aged_dying_ancient_kodoAI::SpellHit(), npc_ichor_globule::SpellHit(), FollowerAI::StartFollow(), SimpleCharmedPlayerAI::UpdateAI(), npc_winterfin_playmate::npc_winterfin_playmateAI::UpdateAI(), npc_snowfall_glade_playmate::npc_snowfall_glade_playmateAI::UpdateAI(), npc_the_biggest_tree::npc_the_biggest_treeAI::UpdateAI(), npc_high_oracle_soo_roo::npc_high_oracle_soo_rooAI::UpdateAI(), npc_elder_kekek::npc_elder_kekekAI::UpdateAI(), npc_the_etymidian::npc_the_etymidianAI::UpdateAI(), npc_alexstraza_the_lifebinder::npc_alexstraza_the_lifebinderAI::UpdateAI(), npc_pet_gen_pandaren_monk::UpdateAI(), npc_power_spark::UpdateAI(), and npc_emily::WaypointReached().

◆ MoveFormation()

void MotionMaster::MoveFormation ( Unit *  leader,
float  range,
float  angle,
uint32  point1,
uint32  point2 
)

◆ MoveIdle()

void MotionMaster::MoveIdle ( )

Definition at line 544 of file MotionMaster.cpp.

References Add(), GetIdleMovementGenerator(), and MOTION_SLOT_DEFAULT.

Referenced by ArcherAI::AttackStart(), npc_frost_sphere::DamageTaken(), npc_spinestalker::DoAction(), npc_rimefang_icc::DoAction(), npc_thrall_herald_of_war::npc_thrall_herald_of_warAI::DoAction(), PetAI::DoAttack(), npc_taskmaster_fizzule::npc_taskmaster_fizzuleAI::DoFriend(), ScriptedAI::DoStartNoMovement(), GuardAI::EnterEvadeMode(), WorldSession::HandlePetActionHelper(), spell_gen_pet_wait::HandleScript(), boss_high_inquisitor_whitemane::JustEngagedWith(), boss_scarlet_commander_mograine::JustEngagedWith(), boss_alar::JustEngagedWith(), SmartAI::JustReachedHome(), Creature::Motion_Initialize(), npc_anubarak_spike::MoveInLineOfSight(), PetAI::MovementInform(), boss_onyxia::MovementInform(), boss_professor_putricide::MovementInform(), boss_malygos::MovementInform(), npc_azure_ring_captain::MovementInform(), boss_gluth::MovementInform(), npc_power_spark::MoveToMalygos(), SmartScript::ProcessAction(), npc_lake_frog::ReceiveEmote(), boss_ionar::SpellHit(), npc_aged_dying_ancient_kodo::npc_aged_dying_ancient_kodoAI::SpellHit(), npc_malformed_ooze::SpellHitTarget(), EscortAI::Start(), PetAI::StopAttack(), SmartAI::StopFollow(), StopOnDeath(), SmartAI::StopPath(), EscortAI::UpdateAI(), npc_overlord_runthak_orgrimmar::npc_overlord_runthak_orgrimmarAI::UpdateAI(), npc_unleashed_dark::UpdateAI(), npc_unleashed_light::UpdateAI(), npc_strangulate_vehicle::UpdateAI(), npc_dream_cloud::UpdateAI(), npc_minigob_manabonk::UpdateAI(), boss_alar::UpdateAI(), npc_mature_netherwing_drake::npc_mature_netherwing_drakeAI::UpdateAI(), npc_power_spark::UpdateAI(), boss_vazruden_the_herald::UpdateSpecialEvents(), and npc_rizzle_sprysprocket::WaypointStarted().

◆ MoveJump() [1/2]

void MotionMaster::MoveJump ( float  x,
float  y,
float  z,
float  o,
float  speedXY,
float  speedZ,
uint32  id = EVENT_JUMP,
bool  hasOrientation = false 
)

◆ MoveJump() [2/2]

◆ MoveJumpTo()

void MotionMaster::MoveJumpTo ( float  angle,
float  speedXY,
float  speedZ 
)

◆ MoveKnockbackFrom()

◆ MoveLand()

◆ MovePath() [1/2]

void MotionMaster::MovePath ( uint32  pathId,
bool  repeatable 
)

Definition at line 1010 of file MotionMaster.cpp.

References _owner, Add(), Object::GetGUID(), MOTION_SLOT_DEFAULT, TC_LOG_DEBUG, and ObjectGuid::ToString().

Referenced by npc_earthen_ring_flamecaller::DoAction(), boss_gizrul_the_slavener::IsSummonedBy(), npc_rizzle_sprysprocket::IsSummonedBy(), npc_kalecgos::JustAppeared(), boss_anetheron::JustAppeared(), boss_azgalor::JustAppeared(), boss_kazrogal::JustAppeared(), boss_rage_winterchill::JustAppeared(), npc_toxic_sporebat::JustAppeared(), npc_coilfang_ambusher::JustAppeared(), npc_coilfang_guardian::JustAppeared(), SmartAI::JustReachedHome(), npc_crystal_channel_target::JustSummoned(), npc_thrall_herald_of_war::npc_thrall_herald_of_warAI::MovementInform(), npc_thassarian::OnGossipSelect(), npc_belnistrasz::npc_belnistraszAI::OnQuestAccept(), AreaTrigger_at_frostgrips_hollow::OnTrigger(), boss_the_beast::Reset(), npc_overlord_runthak_orgrimmar::npc_overlord_runthak_orgrimmarAI::Reset(), npc_thrall_herald_of_war::npc_thrall_herald_of_warAI::Reset(), npc_enslaved_proto_drake::SetData(), boss_the_beast::SetData(), SmartAI::StartPath(), EscortAI::UpdateAI(), boss_gyth::UpdateAI(), boss_rend_blackhand::UpdateAI(), boss_victor_nefarius::UpdateAI(), npc_koltira_deathweaver::UpdateAI(), boss_ironaya::UpdateAI(), npc_cameron::UpdateAI(), npc_partygoer_pather::UpdateAI(), npc_harrison_jones::npc_harrison_jonesAI::UpdateAI(), boss_mandokir::UpdateAI(), npc_andorov::UpdateAI(), npc_disciple_of_naralex::UpdateAI(), npc_freed_protodrake::UpdateAI(), boss_kirtonos_the_herald::UpdateIntroEvents(), boss_nalorakk::UpdateOutOfCombatEvents(), boss_broggok::UpdateOutOfCombatEvents(), boss_anetheron::WaypointPathEnded(), boss_rage_winterchill::WaypointPathEnded(), and npc_toxic_sporebat::WaypointPathEnded().

◆ MovePath() [2/2]

void MotionMaster::MovePath ( WaypointPath &  path,
bool  repeatable 
)

◆ MovePoint() [1/2]

void MotionMaster::MovePoint ( uint32  id,
float  x,
float  y,
float  z,
bool  generatePath = true,
Optional< float >  finalOrient = {} 
)

◆ MovePoint() [2/2]

void MotionMaster::MovePoint ( uint32  id,
Position const &  pos,
bool  generatePath = true,
Optional< float >  finalOrient = {} 
)

Definition at line 633 of file MotionMaster.cpp.

References Position::m_positionX, Position::m_positionY, Position::m_positionZ, and MovePoint().

Referenced by boss_ionar::CallBackSparks(), boss_the_lich_king::DamageTaken(), boss_high_inquisitor_whitemane::DamageTaken(), boss_ayamiss::DamageTaken(), boss_ymiron::DamageTaken(), boss_essence_of_suffering::DamageTaken(), boss_essence_of_desire::DamageTaken(), boss_leviathan_mk_ii::boss_leviathan_mk_iiAI::DamageTaken(), boss_aerial_command_unit::boss_aerial_command_unitAI::DamageTaken(), npc_weegli_blastfuse::npc_weegli_blastfuseAI::DestroyDoor(), npc_apothecary_genericAI::DoAction(), boss_infinite_corruptor::boss_infinite_corruptorAI::DoAction(), npc_twilight_volunteer::DoAction(), npc_hadronox_crusherPackAI::DoAction(), npc_xerestrasza::DoAction(), boss_blood_queen_lana_thel::DoAction(), boss_deathbringer_saurfang::DoAction(), boss_professor_putricide::DoAction(), boss_sindragosa::DoAction(), npc_spinestalker::DoAction(), npc_rimefang_icc::DoAction(), boss_four_horsemen_baseAI::DoAction(), boss_malygos::DoAction(), npc_azure_ring_captain::DoAction(), npc_turned_champion::npc_turned_championAI::DoAction(), npc_earthen_ring_flamecaller::DoAction(), npc_colonel_jules::npc_colonel_julesAI::DoAction(), npc_barada::npc_baradaAI::DoAction(), boss_krick::DoAction(), boss_razorscale::DoAction(), npc_expedition_defender::DoAction(), npc_expedition_trapper::DoAction(), boss_illidan_stormrage::DoAction(), npc_akama_shade::DoAction(), boss_headless_horseman::DoAction(), boss_alar::DoMoveToCenter(), boss_alar::DoMoveToPlatform(), npc_announcer_toc5::npc_announcer_toc5AI::DoStartArgentChampionEncounter(), boss_blood_queen_lana_thel::EnterEvadeMode(), DaranavanMoveEvent::Execute(), OrbAirPositionEvent::Execute(), OrbFlyEvent::Execute(), boss_nightbane::boss_nightbaneAI::ExecuteEvent(), spell_apothecary_lingering_fumes::HandleAfterCast(), npc_torloth_the_magnificent::npc_torloth_the_magnificentAI::HandleAnimation(), npc_expedition_engineer::HandleBaseMovement(), misc_commandscript::HandleComeToMeCommand(), spell_malygos_random_portal::HandleDummy(), spell_sholazar_shoot_rjr::HandleDummy(), spell_swamplord_muselek_move_away_primer::HandleDummy(), boss_felmyst::HandleFlightSequence(), PetAI::HandleReturnMovement(), spell_saviana_conflagration_throwback::HandleScript(), npc_molten_flame::InitializeAI(), npc_spirit_bomb::IsSummonedBy(), npc_ruby_emerald_amber_drake::IsSummonedBy(), npc_frostbrood_skytalon::IsSummonedBy(), ShadowswordBaseAI::JustAppeared(), npc_amanishi_hatcher::JustAppeared(), npc_doomfire::JustAppeared(), boss_aeonus::JustAppeared(), npc_hive_zara_larva::JustAppeared(), npc_hive_zara_swarmer::JustAppeared(), npc_malformed_ooze::JustAppeared(), npc_ingvar_throw_dummy::JustAppeared(), npc_steamrigger_mechanic::JustAppeared(), npc_frost_wyrm::npc_frost_wyrmAI::JustDied(), boss_flame_leviathan_safety_container::boss_flame_leviathan_safety_containerAI::JustDied(), npc_enraged_spirit::npc_enraged_spiritAI::JustDied(), npc_gargoyle::npc_gargoyleAI::JustDied(), boss_ayamiss::JustEngagedWith(), boss_aeonus::JustReachedHome(), boss_trollgore::JustSummoned(), boss_slad_ran::JustSummoned(), boss_prince_valanar_icc::JustSummoned(), boss_skadi::JustSummoned(), npc_daegarn::JustSummoned(), npc_rinji::npc_rinjiAI::JustSummoned(), npc_maghar_captive::npc_maghar_captiveAI::JustSummoned(), npc_kurenai_captive::npc_kurenai_captiveAI::JustSummoned(), MoveCloserAndStop(), instance_deadmines::instance_deadmines_InstanceMapScript::MoveCreatureInside(), npc_ashtongue_sorcerer::MoveInLineOfSight(), npc_spectator::MovementInform(), npc_amanishi_hatcher::MovementInform(), boss_onyxia::MovementInform(), npc_barada::npc_baradaAI::MovementInform(), boss_razorscale::MovementInform(), npc_skadi_trashAI::MovementInform(), MovePoint(), npc_cameron::MoveTheChildren(), npc_unleashed_ballAI::MoveToNextPoint(), npc_geezle::npc_geezleAI::NextStep(), npc_argent_valiant::npc_argent_valiant(), npc_omen::npc_omen(), SimpleCharmedPlayerAI::OnCharmed(), npc_tirion_fordring_tft::OnGossipSelect(), npc_wyrmrest_skytalon::PassengerBoarded(), npc_jungle_punch_target::proceedCwEvent(), SmartScript::ProcessAction(), boss_arlokk::Reset(), npc_zulian_prowler::Reset(), npc_garona::npc_garonaAI::Reset(), npc_released_offspring_harkoa::Reset(), npc_ashtongue_sorcerer::Reset(), SmartAI::ReturnToLastOOCPos(), EscortAI::ReturnToLastPoint(), npc_sinclari_vh::ScheduleIntro(), boss_selin_fireheart::SelectNearestCrystal(), instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::SetData(), npc_announcer_toc5::npc_announcer_toc5AI::SetData(), boss_hadronox::SetStep(), boss_onyxia::SpellHit(), npc_high_overlord_saurfang_icc::SpellHit(), npc_muradin_bronzebeard_icc::SpellHit(), npc_saurfang_event::SpellHit(), boss_vazruden_the_herald::SpellHit(), npc_troll_volunteer::SpellHit(), npc_wounded_skirmisher::SpellHit(), npc_wild_wyrm::SpellHit(), npc_pet_dk_ebon_gargoyle::SpellHit(), npc_injured_patient::npc_injured_patientAI::SpellHit(), npc_malformed_ooze::SpellHitTarget(), npc_image_of_medivh::npc_image_of_medivhAI::StartEvent(), boss_nightbane::boss_nightbaneAI::StartPhaseFly(), boss_jormungarAI::Submerge(), EscortAI::UpdateAI(), npc_unworthy_initiate::npc_unworthy_initiateAI::UpdateAI(), npc_koltira_deathweaver::UpdateAI(), npc_scarlet_courier::npc_scarlet_courierAI::UpdateAI(), npc_highlord_darion_mograine::npc_highlord_darion_mograineAI::UpdateAI(), npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI::UpdateAI(), npc_madrigosa::UpdateAI(), boss_kalecgos::UpdateAI(), npc_shield_orb::npc_shield_orbAI::UpdateAI(), npc_thalorien_dawnseeker::UpdateAI(), boss_zuljin::UpdateAI(), npc_harrison_jones::npc_harrison_jonesAI::UpdateAI(), boss_arlokk::UpdateAI(), boss_mandokir::UpdateAI(), npc_winterfin_playmate::npc_winterfin_playmateAI::UpdateAI(), npc_snowfall_glade_playmate::npc_snowfall_glade_playmateAI::UpdateAI(), npc_the_biggest_tree::npc_the_biggest_treeAI::UpdateAI(), npc_high_oracle_soo_roo::npc_high_oracle_soo_rooAI::UpdateAI(), npc_elder_kekek::npc_elder_kekekAI::UpdateAI(), npc_the_etymidian::npc_the_etymidianAI::UpdateAI(), npc_alexstraza_the_lifebinder::npc_alexstraza_the_lifebinderAI::UpdateAI(), boss_archimonde::UpdateAI(), npc_gargoyle::npc_gargoyleAI::UpdateAI(), boss_lieutenant_drake::UpdateAI(), boss_onyxia::UpdateAI(), npc_draenei_survivor::npc_draenei_survivorAI::UpdateAI(), npc_demolitionist_legoso::npc_demolitionist_legosoAI::UpdateAI(), npc_thrall_herald_of_war::npc_thrall_herald_of_warAI::UpdateAI(), boss_jedoga_shadowseeker::UpdateAI(), npc_prince_taldaram_flame_sphere::UpdateAI(), npc_hadronox_foeAI::UpdateAI(), dummy_dragonAI::UpdateAI(), boss_saviana_ragefire::UpdateAI(), npc_jaina_or_sylvanas_intro_hor::npc_jaina_or_sylvanas_intro_horAI::UpdateAI(), npc_jaina_or_sylvanas_escape_hor::npc_jaina_or_sylvanas_escape_horAI::UpdateAI(), npc_uther_quel_delar::npc_uther_quel_delarAI::UpdateAI(), npc_quel_delar_sword::npc_quel_delar_swordAI::UpdateAI(), boss_krick::UpdateAI(), boss_tyrannus::UpdateAI(), boss_rimefang::UpdateAI(), npc_blood_queen_lana_thel::UpdateAI(), boss_blood_queen_lana_thel::UpdateAI(), npc_high_overlord_saurfang_icc::UpdateAI(), npc_muradin_bronzebeard_icc::UpdateAI(), boss_lord_marrowgar::UpdateAI(), boss_professor_putricide::UpdateAI(), boss_sindragosa::UpdateAI(), npc_rimefang_icc::UpdateAI(), boss_the_lich_king::UpdateAI(), npc_tirion_fordring_tft::UpdateAI(), npc_valkyr_shadowguard::UpdateAI(), npc_strangulate_vehicle::UpdateAI(), boss_four_horsemen_baseAI::UpdateAI(), npc_zombie_chow::UpdateAI(), boss_sapphiron::UpdateAI(), boss_malygos::UpdateAI(), npc_melee_hover_disk::UpdateAI(), npc_ruby_emerald_amber_drake::UpdateAI(), boss_volkhan::UpdateAI(), boss_algalon_the_observer::UpdateAI(), boss_stormcaller_brundir::boss_stormcaller_brundirAI::UpdateAI(), npc_mechanolift::npc_mechanoliftAI::UpdateAI(), boss_leviathan_mk_ii::boss_leviathan_mk_iiAI::UpdateAI(), npc_annhylde_the_caller::UpdateAI(), npc_thassarian::UpdateAI(), npc_commander_eligor_dawnbringer::UpdateAI(), npc_venture_co_straggler::UpdateAI(), npc_frostbrood_skytalon::UpdateAI(), npc_brann_bronzebeard_keystone::UpdateAI(), npc_crusade_recruit::UpdateAI(), boss_illidan_stormrage::UpdateAI(), npc_akama_shade::UpdateAI(), boss_lady_vashj::UpdateAI(), boss_warlord_kalithresh::UpdateAI(), npc_claw::UpdateAI(), boss_wrath_scryer_soccothrates::UpdateAI(), boss_alar::UpdateAI(), boss_kaelthas::UpdateAI(), npc_nether_drake::npc_nether_drakeAI::UpdateAI(), npc_colonel_jules::npc_colonel_julesAI::UpdateAI(), npc_mature_netherwing_drake::npc_mature_netherwing_drakeAI::UpdateAI(), boss_mr_smite::boss_mr_smiteAI::UpdateAI(), boss_eadric::boss_eadricAI::UpdateAI(), boss_paletress::boss_paletressAI::UpdateAI(), npc_spark_of_ionar::UpdateAI(), npc_tooga::npc_toogaAI::UpdateFollowerAI(), boss_kirtonos_the_herald::UpdateIntroEvents(), npc_millhouse_manastorm::UpdateIntroEvents(), npc_kelthuzad_minionAI::UpdateRandomMovement(), boss_majordomo::UpdateSpecialEvents(), boss_vazruden_the_herald::UpdateSpecialEvents(), and npc_emily::WaypointReached().

◆ MoveRandom()

◆ MoveRotate()

void MotionMaster::MoveRotate ( uint32  id,
uint32  time,
RotateDirection  direction 
)

Definition at line 1025 of file MotionMaster.cpp.

References _owner, Add(), Object::GetGUID(), TC_LOG_DEBUG, and ObjectGuid::ToString().

◆ MoveSeekAssistance()

void MotionMaster::MoveSeekAssistance ( float  x,
float  y,
float  z 
)

◆ MoveSeekAssistanceDistract()

void MotionMaster::MoveSeekAssistanceDistract ( uint32  timer)

◆ MoveSmoothPath()

void MotionMaster::MoveSmoothPath ( uint32  pointId,
Position const *  pathPoints,
size_t  pathSize,
bool  walk 
)

◆ MoveTakeoff()

◆ MoveTargetedHome()

◆ MoveTaxiFlight()

◆ Pop()

void MotionMaster::Pop ( bool  active,
bool  movementInform 
)
private

Definition at line 1107 of file MotionMaster.cpp.

References _generators, and Remove().

Referenced by DirectClear(), and Update().

◆ PropagateSpeedChange()

void MotionMaster::PropagateSpeedChange ( )

◆ Remove() [1/3]

void MotionMaster::Remove ( MotionMasterContainer::iterator &  iterator,
bool  active,
bool  movementInform 
)
private

Definition at line 1100 of file MotionMaster.cpp.

References _generators, and Delete().

◆ Remove() [2/3]

◆ Remove() [3/3]

◆ RemoveFlag()

void MotionMaster::RemoveFlag ( uint8 const  flag)
inlineprivate

Definition at line 205 of file MotionMaster.h.

Referenced by AddToWorld(), and Update().

◆ ResolveDelayedActions()

void MotionMaster::ResolveDelayedActions ( )
private

Definition at line 1091 of file MotionMaster.cpp.

References _delayedActions.

Referenced by AddToWorld(), and Update().

◆ ResumeSplineChain()

◆ Size()

uint32 MotionMaster::Size ( ) const

Definition at line 132 of file MotionMaster.cpp.

References _defaultGenerator, and _generators.

Referenced by SimpleCharmedPlayerAI::OnCharmed().

◆ StopOnDeath()

◆ Update()

Member Data Documentation

◆ _baseUnitStatesMap

MotionMasterUnitStatesContainer MotionMaster::_baseUnitStatesMap
private

Definition at line 225 of file MotionMaster.h.

Referenced by AddBaseUnitState(), ClearBaseUnitState(), and ClearBaseUnitStates().

◆ _defaultGenerator

◆ _delayedActions

std::deque<DelayedAction> MotionMaster::_delayedActions
private

◆ _flags

uint8 MotionMaster::_flags
private

Definition at line 227 of file MotionMaster.h.

◆ _generators

◆ _owner


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