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, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::ForceWalk, MovementSlot slot=MOTION_SLOT_DEFAULT, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MoveFollow (Unit *target, float dist, Optional< ChaseAngle > angle={}, Optional< Milliseconds > duration={}, bool ignoreTargetWalk=false, MovementSlot slot=MOTION_SLOT_ACTIVE, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MoveChase (Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
 
void MoveChase (Unit *target, float dist, float angle)
 
void MoveConfused ()
 
void MoveFleeing (Unit *enemy, Milliseconds time=0ms, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MovePoint (uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MovePoint (uint32 id, float x, float y, float z, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MoveCloserAndStop (uint32 id, Unit *target, float distance)
 
void MoveLand (uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MoveTakeoff (uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MoveTierTransition (uint32 id, Position const &pos, AnimTier newAnimTier, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MoveCharge (float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, bool generatePath=false, Unit const *target=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr)
 
void MoveCharge (PathGenerator const &path, float speed=SPEED_CHARGE, Unit const *target=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr)
 
void MoveKnockbackFrom (Position const &origin, float speedXY, float speedZ, float angle=M_PI, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr)
 
void MoveJump (uint32 id, Position const &pos, std::variant< std::monostate, float, Milliseconds > speedOrTime={}, Optional< float > minHeight={}, Optional< float > maxHeight={}, MovementFacingTarget const &facing={}, bool orientationFixed=false, bool unlimitedSpeed=false, Optional< float > speedMultiplier={}, JumpArrivalCastArgs const *arrivalCast=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MoveCirclePath (float x, float y, float z, float radius, bool clockwise, uint8 stepCount, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
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, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MoveSeekAssistance (float x, float y, float z)
 
void MoveSeekAssistanceDistract (uint32 timer)
 
void MoveTaxiFlight (uint32 path, uint32 pathnode, Optional< float > speed={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MoveDistract (uint32 time, float orientation)
 
void MovePath (uint32 pathId, bool repeatable, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd={}, Optional< float > wanderDistanceAtPathEnds={}, Optional< bool > followPathBackwardsFromEndToStart={}, Optional< bool > exactSplinePath={}, bool generatePath=true, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MovePath (WaypointPath const &path, bool repeatable, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd={}, Optional< float > wanderDistanceAtPathEnds={}, Optional< bool > followPathBackwardsFromEndToStart={}, Optional< bool > exactSplinePath={}, bool generatePath=true, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 
void MoveRotate (uint32 id, RotateDirection direction, Optional< Milliseconds > time={}, Optional< float > turnSpeed={}, Optional< float > totalTurnAngle={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 Makes the Unit turn in place.
 
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, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
 

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 98 of file MotionMaster.h.

Member Typedef Documentation

◆ DelayedActionDefine

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

Definition at line 101 of file MotionMaster.h.

◆ DelayedActionValidator

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

Definition at line 102 of file MotionMaster.h.

◆ MotionMasterContainer

◆ MotionMasterUnitStatesContainer

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

Definition at line 250 of file MotionMaster.h.

◆ MovementGeneratorPointer

Definition at line 248 of file MotionMaster.h.

Constructor & Destructor Documentation

◆ MotionMaster()

MotionMaster::MotionMaster ( Unit *  unit)
explicit

Definition at line 79 of file MotionMaster.cpp.

◆ ~MotionMaster()

MotionMaster::~MotionMaster ( )

Definition at line 81 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 252 of file MotionMaster.h.

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

◆ AddToWorld()

◆ Clear() [1/3]

void MotionMaster::Clear ( )

Definition at line 425 of file MotionMaster.cpp.

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

Referenced by npc_elwynn_forest_wolf::_ScheduleAfterChasingEvents(), CreatureAI::AttackStart(), 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_silverpine_forsaken_bat::DoAction(), npc_silverpine_deathstalker_rane_yorick::DoAction(), npc_martha_goslin::npc_martha_goslinAI::DoAction(), firelands_bossAI::EnterEvadeMode(), npc_argent_captainAI::EnterEvadeMode(), npc_daegarn::EnterEvadeMode(), CreatureAI::EnterEvadeMode(), npc_pet_mage_mirror_image::EnterEvadeMode(), ScriptedAI::ForceCombatStop(), spell_harlan_blades_of_light::HandleAfterCast(), boss_felmyst::HandleFlightSequence(), spell_headlong_charge_trigger::HandleHit(), spell_sapphiron_change_blizzard_target::HandlePeriodic(), WorldSession::HandlePetActionHelper(), spell_soulbound_goliath_burning_brush::HandleScript(), spell_gen_pet_wait::HandleScript(), npc_enslaved_soul::HandleSoulRelease(), npc_silverpine_agatha_fenris_isle::JustAppeared(), 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(), npc_malacrass_blood_worm::MovementInform(), MoveTargetedHome(), SimpleCharmedPlayerAI::OnCharmed(), conversation_boralus_hub_tour::OnCreate(), conversation_boralus_enter_harbormaster_office::OnCreate(), spell_soulbound_goliath_burning_brush_aura::OnRemove(), npc_valkyr_battle_maiden::npc_valkyr_battle_maidenAI::Reset(), npc_silverpine_agatha_fenris_isle::Reset(), Unit::SetCharmedBy(), npc_zombie_chow::SetData(), npc_silverpine_agatha_fenris_isle::SetEventNoEscape(), 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_guarm::UpdateAI(), boss_felblood_kaelthas::UpdateAI(), boss_selin_fireheart::UpdateAI(), npc_headless_horseman_head::UpdateAI(), npc_silverpine_agatha_fenris_isle::UpdateAI(), npc_sparring_partner_exiles_reach::UpdateAI(), npc_sparring_partner_combat_training::UpdateAI(), npc_captain_garrick_q55879::UpdateAI(), npc_warlord_grimaxe_q59942::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(), 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 1365 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 1249 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 1269 of file MotionMaster.cpp.

References _generators, GetCurrentMovementGenerator(), and Remove.

◆ DirectClearDefault()

void MotionMaster::DirectClearDefault ( )
private

Definition at line 1263 of file MotionMaster.cpp.

References _defaultGenerator, _generators, and DeleteDefault().

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

◆ DirectInitialize()

void MotionMaster::DirectInitialize ( )
private

Definition at line 1240 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 
)

Definition at line 502 of file MotionMaster.cpp.

References _owner, and Unit::movespline.

Referenced by misc_commandscript::HandleMovegensCommand().

◆ GetMovementGenerator()

◆ GetMovementGeneratorsInformation()

◆ HasFlag()

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

Definition at line 253 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()

◆ InterruptOnTeleport()

void MotionMaster::InterruptOnTeleport ( )

◆ LaunchMoveSpline()

◆ MoveAlongSplineChain() [1/2]

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

Definition at line 986 of file MotionMaster.cpp.

References Add().

◆ MoveAlongSplineChain() [2/2]

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

Definition at line 969 of file MotionMaster.cpp.

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

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/2]

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

Definition at line 165 of file MotionMaster.h.

References MoveChase().

Referenced by MoveChase().

◆ MoveChase() [2/2]

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 1184 of file MotionMaster.cpp.

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

◆ MoveFall()

void MotionMaster::MoveFall ( uint32  id = 0,
Scripting::v2::ActionResultSetter< MovementStopReason > &&  scriptResult = {} 
)

◆ MoveFleeing()

void MotionMaster::MoveFleeing ( Unit *  enemy,
Milliseconds  time = 0ms,
Scripting::v2::ActionResultSetter< MovementStopReason > &&  scriptResult = {} 
)

◆ MoveFollow()

void MotionMaster::MoveFollow ( Unit *  target,
float  dist,
Optional< ChaseAngle >  angle = {},
Optional< Milliseconds >  duration = {},
bool  ignoreTargetWalk = false,
MovementSlot  slot = MOTION_SLOT_ACTIVE,
Scripting::v2::ActionResultSetter< MovementStopReason > &&  scriptResult = {} 
)

Definition at line 583 of file MotionMaster.cpp.

References _owner, Add(), BaseEntity::GetGUID(), Interrupted, and TC_LOG_DEBUG.

Referenced by npc_molten_barrage::npc_molten_barrageAI::AttackStart(), Player::DisablePetControlsOnMount(), npc_argent_captainAI::DoAction(), SmartAI::EnterEvadeMode(), firelands_bossAI::EnterEvadeMode(), npc_argent_captainAI::EnterEvadeMode(), npc_daegarn::EnterEvadeMode(), CreatureAI::EnterEvadeMode(), npc_pet_mage_mirror_image::EnterEvadeMode(), spell_lord_stormsong_fixate::HandleFixate(), AuraEffect::HandleModPossessPet(), npc_commandscript::HandleNpcFollowCommand(), spell_sapphiron_change_blizzard_target::HandlePeriodic(), WorldSession::HandlePetActionHelper(), PetAI::HandleReturnMovement(), npc_troll_volunteer::InitializeAI(), npc_malacrass_blood_worm::IsSummonedBy(), npc_silverpine_orc_sea_pup::IsSummonedBy(), npc_silverpine_orc_sea_dog::IsSummonedBy(), npc_taelia_get_your_bearings::IsSummonedBy(), npc_spirit_shade::npc_spirit_shadeAI::IsSummonedBy(), npc_silverpine_agatha_fenris_isle::JustAppeared(), npc_captain_garrick_q55879::JustAppeared(), npc_warlord_grimaxe_q59942::JustAppeared(), 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(), conversation_boralus_hub_tour::OnUpdate(), npc_jungle_punch_target::proceedCwEvent(), npc_lake_frog::ReceiveEmote(), npc_silverpine_agatha_fenris_isle::Reset(), 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_silverpine_agatha_fenris_isle::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_garrick_summoned_beach::UpdateAI(), npc_grimaxe_summoned_beach::UpdateAI(), npc_leader_northbound::UpdateAI(), npc_lindie_springstock_q56034::UpdateAI(), npc_cork_fizzlepop_q59941::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 543 of file MotionMaster.cpp.

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

Referenced by npc_hearthglen_crusader::AttackStart(), npc_frost_sphere::DamageTaken(), npc_spinestalker::DoAction(), npc_rimefang_icc::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(), spell_alysrazor_turn_monstrosity::spell_alysrazor_turn_monstrosity_SpellScript::KnockBarrage(), 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_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(), and boss_vazruden_the_herald::UpdateSpecialEvents().

◆ MoveJump()

void MotionMaster::MoveJump ( uint32  id,
Position const &  pos,
std::variant< std::monostate, float, Milliseconds >  speedOrTime = {},
Optional< float >  minHeight = {},
Optional< float >  maxHeight = {},
MovementFacingTarget const &  facing = {},
bool  orientationFixed = false,
bool  unlimitedSpeed = false,
Optional< float >  speedMultiplier = {},
JumpArrivalCastArgs const *  arrivalCast = nullptr,
Movement::SpellEffectExtraData const *  spellEffectExtraData = nullptr,
Scripting::v2::ActionResultSetter< MovementStopReason > &&  scriptResult = {} 
)

◆ MoveKnockbackFrom()

◆ MoveLand()

◆ MovePath() [1/2]

void MotionMaster::MovePath ( uint32  pathId,
bool  repeatable,
Optional< Milliseconds >  duration = {},
Optional< float >  speed = {},
MovementWalkRunSpeedSelectionMode  speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default,
Optional< std::pair< Milliseconds, Milliseconds > >  waitTimeRangeAtPathEnd = {},
Optional< float >  wanderDistanceAtPathEnds = {},
Optional< bool >  followPathBackwardsFromEndToStart = {},
Optional< bool >  exactSplinePath = {},
bool  generatePath = true,
Optional< MovementFadeObject >  fadeObject = {},
Scripting::v2::ActionResultSetter< MovementStopReason > &&  scriptResult = {} 
)

Definition at line 1107 of file MotionMaster.cpp.

References _owner, Add(), BaseEntity::GetGUID(), BaseEntity::GetTypeId(), Interrupted, MOTION_SLOT_DEFAULT, TC_LOG_DEBUG, and TYPEID_UNIT.

Referenced by boss_adarogg::DoAction(), npc_earthen_ring_flamecaller::DoAction(), boss_anduin_wrynn::DoAction(), npc_bg_deephaul_ravine_commander< Path1, Path2, Path3, Path4 >::DoAction(), boss_headless_horseman::DoAction(), npc_silverpine_forsaken_bat::DoAction(), spell_harlan_blades_of_light::HandleAfterCast(), spell_ragefire_chasm_general_trigger_221_to_self::HandleDummy(), boss_gizrul_the_slavener::IsSummonedBy(), Scripts::Pandaria::TheWanderingIsle::npc_master_li_fei_summon::IsSummonedBy(), npc_kayn_sunfury_ashtongue_intro_private::JustAppeared(), npc_kalecgos::JustAppeared(), npc_ship_captain_brace_for_impact_private::JustAppeared(), npc_prisoner_q55879_private::JustAppeared(), boss_anetheron::JustAppeared(), boss_azgalor::JustAppeared(), boss_kazrogal::JustAppeared(), boss_rage_winterchill::JustAppeared(), npc_drustvar_frightend_woodsman_private::JustAppeared(), boss_lord_stormsong_intro_npc< ConvoIntroSpellId, ConvoOutroSpellId >::JustAppeared(), npc_toxic_sporebat::JustAppeared(), npc_coilfang_ambusher::JustAppeared(), npc_coilfang_guardian::JustAppeared(), boss_the_golden_serpent::JustAppeared(), SmartAI::JustReachedHome(), npc_crystal_channel_target::JustSummoned(), boss_guarm::MovementInform(), npc_kayn_sunfury_invasion_begins::MovementInform(), npc_jayce_darkweaver_invasion_begins::MovementInform(), npc_allari_the_souleater_invasion_begins::MovementInform(), npc_korvas_bloodthorn_invasion_begins::MovementInform(), npc_sevis_brightflame_invasion_begins::MovementInform(), npc_cyana_nightglaive_invasion_begins::MovementInform(), Scripts::Pandaria::TheWanderingIsle::npc_aysa_cloudsinger_summon::MovementInform(), npc_valarjar_paying_respect_to_odyn::MovementInform(), conversation_natalia_pearces_complete_precious_gems::OnCreate(), conversation_boralus_enter_harbormaster_office::OnCreate(), conversation_boralus_cyrus_meets_genn::OnCreate(), npc_7th_legion_magus_sanctum_of_the_sages::OnGossipSelect(), npc_thassarian::OnGossipSelect(), npc_belnistrasz::npc_belnistraszAI::OnQuestAccept(), spell_anduin_wrynn_pre_introduction::OnRemove(), Scripts::QuelThalas::Harandar::Chapter1::conversation_the_root_cause_open_portal::OnStart(), Scripts::QuelThalas::Harandar::Chapter1::conversation_to_harathir_talk_to_kupaal::OnStart(), AreaTrigger_at_frostgrips_hollow::OnTrigger(), conversation_rokmora_intro::OnUpdate(), conversation_aberrus_kazzara_intro::OnUpdate(), conversation_the_new_classington_estate::OnUpdate(), Scripts::EasternKingdoms::StormwindCity::conversation_start_council_tides_of_war::OnUpdate(), Scripts::EasternKingdoms::StormwindCity::conversation_quest_ancient_curses_accept::OnUpdate(), conversation_waycrest_manor_waycrests_defeated::OnUpdate(), npc_sharpbeak::npc_sharpbeak_AI::PassengerBoarded(), npc_akilzon_amani_kidnapper::PassengerBoarded(), npc_eagle_spirit::npc_eagle_spirit_AI::PassengerBoarded(), npc_silverpine_horde_hauler::PassengerBoarded(), npc_sanitron_5000::PassengerBoarded(), npc_silverpine_forsaken_bat::PassengerBoarded(), npc_king_jokkum_vehicle::PassengerBoarded(), npc_valarjar_paying_respect_to_odyn::Reset(), npc_valkyr_of_odyn::Reset(), npc_enslaved_proto_drake::SetData(), npc_taelia_get_your_bearings::SpellHit(), conversation_the_invasion_begins::StartCloneMovement(), npc_azure_saboteur::StartMovement(), SmartAI::StartPath(), EscortAI::UpdateAI(), boss_gyth::UpdateAI(), boss_rend_blackhand::UpdateAI(), boss_victor_nefarius::UpdateAI(), npc_koltira_deathweaver::UpdateAI(), boss_ironaya::UpdateAI(), npc_milos_gyro::npc_milos_gyro_AI::UpdateAI(), npc_cameron::UpdateAI(), npc_partygoer_pather::UpdateAI(), npc_redridge_subdued_canyon_ettin::UpdateAI(), npc_redridge_citizen::npc_redridge_citizenAI::UpdateAI(), npc_silverpine_horde_hauler::UpdateAI(), npc_silverpine_deathstalker_rane_yorick::UpdateAI(), npc_silverpine_agatha_fenris_isle::UpdateAI(), npc_ship_captain_warming_up_private::UpdateAI(), npc_sparring_partner_exiles_reach::UpdateAI(), npc_ship_captain_brace_for_impact_private::UpdateAI(), npc_first_mate_brace_for_impact_private::UpdateAI(), npc_pet_ship_private::UpdateAI(), npc_survivors_healed_by_leader_beach_private< PathId, WaitTime >::UpdateAI(), npc_horde_survivors_beach_q59930_private< PathId >::UpdateAI(), npc_survivors_beach_leave_private< PathId, WaitTime >::UpdateAI(), npc_sparring_partner_combat_training::UpdateAI(), npc_scoutomatic_5000::UpdateAI(), npc_choppy_booster_scout::UpdateAI(), npc_bjorn_stouthands_q55965_private::UpdateAI(), npc_lana_jordan_q59948_private::UpdateAI(), npc_companion_q55965_q59948_private< PitPathId >::UpdateAI(), npc_andorov::UpdateAI(), npc_disciple_of_naralex::UpdateAI(), Scripts::Kalimdor::Durotar::npc_darkspear_jailor::UpdateAI(), boss_lord_stormsong_intro_npc< ConvoIntroSpellId, ConvoOutroSpellId >::UpdateAI(), npc_freed_protodrake::UpdateAI(), Scripts::Pandaria::TheWanderingIsle::npc_delivery_cart::UpdateAI(), boss_kirtonos_the_herald::UpdateIntroEvents(), boss_nalorakk::UpdateOutOfCombatEvents(), boss_broggok::UpdateOutOfCombatEvents(), npc_bg_deephaul_ravine_earthen_mine_cart_horde::WaypointPathEnded(), npc_bg_deephaul_ravine_commander< Path1, Path2, Path3, Path4 >::WaypointPathEnded(), npc_bg_silvershard_mines_mine_cart::WaypointPathEnded(), npc_danica_the_reclaimer::WaypointPathEnded(), boss_anetheron::WaypointPathEnded(), boss_rage_winterchill::WaypointPathEnded(), boss_the_golden_serpent::WaypointPathEnded(), npc_toxic_sporebat::WaypointPathEnded(), npc_silverpine_forsaken_bat::WaypointReached(), Scripts::Pandaria::TheWanderingIsle::npc_min_dimwind_summon::WaypointReached(), and npc_7th_legion_magus_sanctum_of_the_sages::WaypointReached().

◆ MovePath() [2/2]

void MotionMaster::MovePath ( WaypointPath const &  path,
bool  repeatable,
Optional< Milliseconds >  duration = {},
Optional< float >  speed = {},
MovementWalkRunSpeedSelectionMode  speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default,
Optional< std::pair< Milliseconds, Milliseconds > >  waitTimeRangeAtPathEnd = {},
Optional< float >  wanderDistanceAtPathEnds = {},
Optional< bool >  followPathBackwardsFromEndToStart = {},
Optional< bool >  exactSplinePath = {},
bool  generatePath = true,
Optional< MovementFadeObject >  fadeObject = {},
Scripting::v2::ActionResultSetter< MovementStopReason > &&  scriptResult = {} 
)

◆ MovePoint() [1/2]

void MotionMaster::MovePoint ( uint32  id,
float  x,
float  y,
float  z,
bool  generatePath = true,
Optional< float >  finalOrient = {},
Optional< float >  speed = {},
MovementWalkRunSpeedSelectionMode  speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default,
Optional< float >  closeEnoughDistance = {},
Optional< MovementFadeObject >  fadeObject = {},
Scripting::v2::ActionResultSetter< MovementStopReason > &&  scriptResult = {} 
)

Definition at line 648 of file MotionMaster.cpp.

References _owner, Add(), BaseEntity::GetGUID(), and TC_LOG_DEBUG.

◆ MovePoint() [2/2]

void MotionMaster::MovePoint ( uint32  id,
Position const &  pos,
bool  generatePath = true,
Optional< float >  finalOrient = {},
Optional< float >  speed = {},
MovementWalkRunSpeedSelectionMode  speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default,
Optional< float >  closeEnoughDistance = {},
Optional< MovementFadeObject >  fadeObject = {},
Scripting::v2::ActionResultSetter< MovementStopReason > &&  scriptResult = {} 
)

Definition at line 639 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_amalgam_of_souls::DamageTaken(), npc_inquisitor_baleful_molten_shore::DamageTaken(), boss_high_inquisitor_whitemane::DamageTaken(), boss_ayamiss::DamageTaken(), npc_sc_millhouse_manastorm::npc_sc_millhouse_manastormAI::DamageTaken(), boss_ymiron::DamageTaken(), boss_essence_of_suffering::DamageTaken(), boss_essence_of_desire::DamageTaken(), Scripts::Pandaria::TheWanderingIsle::npc_tushui_huojin_trainee::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_inquisitor_baleful_molten_shore::DoAction(), npc_apothecary_genericAI::DoAction(), npc_chained_spirit::DoAction(), boss_infinite_corruptor::boss_infinite_corruptorAI::DoAction(), boss_adarogg::DoAction(), boss_slabhide::boss_slabhideAI::DoAction(), npc_twilight_volunteer::DoAction(), npc_hadronox_crusherPackAI::DoAction(), npc_xerestrasza::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(), Scripts::Kalimdor::Durotar::npc_captive_spitescale_scout::DoAction(), npc_snufflenose_gopher::npc_snufflenose_gopherAI::DoFindNewTubber(), boss_alar::DoMoveToCenter(), boss_alar::DoMoveToPlatform(), npc_announcer_toc5::npc_announcer_toc5AI::DoStartArgentChampionEncounter(), 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(), WorldSession::HandlePetActionHelper(), PetAI::HandleReturnMovement(), spell_saviana_conflagration_throwback::HandleScript(), npc_molten_flame::InitializeAI(), Scripts::EasternKingdoms::Gilneas::Chapter1::npc_frightened_citizen::IsSummonedBy(), npc_spirit_bomb::IsSummonedBy(), npc_akilzon_amani_kidnapper::IsSummonedBy(), npc_devout_follower::npc_devout_followerAI::IsSummonedBy(), npc_ruby_emerald_amber_drake::IsSummonedBy(), npc_frostbrood_skytalon::IsSummonedBy(), Scripts::Pandaria::TheWanderingIsle::npc_min_dimwind_summon::IsSummonedBy(), npc_amalgam_of_souls_restless_soul::JustAppeared(), ShadowswordBaseAI::JustAppeared(), npc_amanishi_hatcher::JustAppeared(), npc_doomfire::JustAppeared(), boss_aeonus::JustAppeared(), npc_lockmaw_augh_boss::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_anduin_wrynn_anduin_doubt::JustAppeared(), npc_priestess_alun_za_corrupted_gold::JustAppeared(), npc_blood_wave_stalker::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_hogger::JustSummoned(), boss_randolph_moloch::JustSummoned(), boss_trollgore::JustSummoned(), boss_slad_ran::JustSummoned(), boss_prince_valanar_icc::JustSummoned(), boss_skadi::JustSummoned(), npc_daegarn::JustSummoned(), boss_anduin_wrynn::JustSummoned(), npc_maghar_captive::npc_maghar_captiveAI::JustSummoned(), npc_kurenai_captive::npc_kurenai_captiveAI::JustSummoned(), MoveCloserAndStop(), npc_ashtongue_sorcerer::MoveInLineOfSight(), npc_spectator::MovementInform(), npc_voljin_zulaman::npc_voljin_zulamanAI::MovementInform(), npc_amanishi_hatcher::MovementInform(), boss_onyxia::MovementInform(), npc_barada::npc_baradaAI::MovementInform(), boss_razorscale::MovementInform(), npc_skadi_trashAI::MovementInform(), npc_sparring_partner_exiles_reach::MovementInform(), npc_sparring_partner_combat_training::MovementInform(), npc_amalgam_of_souls_restless_soul::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(), conversation_dawnspair_spire_to_ghostlands::OnCreate(), Scripts::EasternKingdoms::StormwindCity::conversation_quest_ancient_curses_accept::OnCreate(), conversation_boralus_hub_tour::OnCreate(), npc_tirion_fordring_tft::OnGossipSelect(), conversation_aberrus_sabellian_intro::OnUpdate(), conversation_an_unlikely_informant::OnUpdate(), conversation_cyrus_crestfall_shaking_hands::OnUpdate(), conversation_sylvanas_windrunner_introduction::OnUpdate(), npc_wyrmrest_skytalon::PassengerBoarded(), Scripts::Pandaria::TheJadeForest::npc_rappelling_rope::PassengerBoarded(), npc_jungle_punch_target::proceedCwEvent(), SmartScript::ProcessAction(), npc_feasting_valarjar::Reset(), npc_image_of_medivh::npc_image_of_medivhAI::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(), npc_announcer_toc5::npc_announcer_toc5AI::SetData(), npc_silverpine_agatha_fenris_isle::SetEventNoEscape(), boss_hadronox::SetStep(), npc_garrick_summoned_beach::SpellHit(), npc_grimaxe_summoned_beach::SpellHit(), npc_leader_northbound::SpellHit(), boss_onyxia::SpellHit(), npc_high_overlord_saurfang_icc::SpellHit(), npc_muradin_bronzebeard_icc::SpellHit(), npc_saurfang_event::SpellHit(), boss_vazruden_the_herald::SpellHit(), npc_redridge_subdued_canyon_ettin::SpellHit(), Scripts::Kalimdor::Durotar::npc_lazy_peon::npc_lazy_peonAI::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(), spell_doomwalker_overrun::StartMovement(), boss_nightbane::boss_nightbaneAI::StartPhaseFly(), boss_jormungarAI::Submerge(), npc_rokmora_navarrogg_intro::TriggerRokmoraIntro(), EscortAI::UpdateAI(), boss_alizabal::boss_alizabalAI::UpdateAI(), Scripts::EasternKingdoms::Gilneas::Chapter1::npc_frightened_citizen::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(), Scripts::EasternKingdoms::Vashjir::Chapter1::npc_vashjir_drowning_soldier::UpdateAI(), npc_frozen_mountaineer::npc_frozen_mountaineerAI::UpdateAI(), npc_wounded_coldridge_mountaineer::npc_wounded_coldridge_mountaineerAI::UpdateAI(), npc_thalorien_dawnseeker::UpdateAI(), npc_silverpine_fallen_human::UpdateAI(), npc_silverpine_mutant_bush_chicken::UpdateAI(), npc_silverpine_fenris_keep_camera::UpdateAI(), npc_voljin_zulaman::npc_voljin_zulamanAI::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_sparring_partner_exiles_reach::UpdateAI(), npc_captain_warlord_first_aid_private::UpdateAI(), npc_sparring_partner_combat_training::UpdateAI(), npc_huxsworth_briarpatch_quest_private::UpdateAI(), npc_dawntracker_briarpatch_quest_private::UpdateAI(), npc_briarpatch_prisoner::UpdateAI(), npc_lindie_springstock_q56034::UpdateAI(), npc_cork_fizzlepop_q59941::UpdateAI(), npc_re_sized_boar_q56034::UpdateAI(), npc_captain_garrick_q55879::UpdateAI(), npc_warlord_grimaxe_q59942::UpdateAI(), boss_archimonde::UpdateAI(), npc_gargoyle::npc_gargoyleAI::UpdateAI(), boss_lieutenant_drake::UpdateAI(), boss_anraphet::UpdateAI(), npc_brann_bronzebeard_anraphet::UpdateAI(), npc_lockmaw_augh_add::UpdateAI(), boss_onyxia::UpdateAI(), npc_draenei_survivor::npc_draenei_survivorAI::UpdateAI(), npc_demolitionist_legoso::npc_demolitionist_legosoAI::UpdateAI(), Scripts::Kalimdor::Durotar::npc_echo_isles_class_trainer< PitPos, QuestID >::UpdateAI(), boss_high_priestess_azil::boss_high_priestess_azilAI::UpdateAI(), boss_slabhide::boss_slabhideAI::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(), npc_priestess_alun_za_spirit_of_gold::UpdateAI(), boss_cragmaw_the_infested::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()

void MotionMaster::MoveRandom ( float  wanderDistance = 0.0f,
Optional< Milliseconds >  duration = {},
Optional< float >  speed = {},
MovementWalkRunSpeedSelectionMode  speedSelectionMode = MovementWalkRunSpeedSelectionMode::ForceWalk,
MovementSlot  slot = MOTION_SLOT_DEFAULT,
Scripting::v2::ActionResultSetter< MovementStopReason > &&  scriptResult = {} 
)

◆ MoveRotate()

void MotionMaster::MoveRotate ( uint32  id,
RotateDirection  direction,
Optional< Milliseconds >  time = {},
Optional< float >  turnSpeed = {},
Optional< float >  totalTurnAngle = {},
Scripting::v2::ActionResultSetter< MovementStopReason > &&  scriptResult = {} 
)

Makes the Unit turn in place.

Parameters
idMovement identifier, later passed to script MovementInform hooks
directionRotation direction
timeHow long should this movement last, infinite if not set
turnSpeedHow fast should the unit rotate, in radians per second. Uses unit's turn speed if not set
totalTurnAngleTotal angle of the entire movement, infinite if not set
scriptResultAwaitable script result (for internal use)

Definition at line 1150 of file MotionMaster.cpp.

References _owner, Add(), BaseEntity::GetGUID(), and TC_LOG_DEBUG.

Referenced by npc_baleful_beaming_eye::JustAppeared().

◆ MoveSeekAssistance()

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

◆ MoveSeekAssistanceDistract()

void MotionMaster::MoveSeekAssistanceDistract ( uint32  timer)

◆ MoveTakeoff()

◆ MoveTargetedHome()

◆ MoveTaxiFlight()

◆ MoveTierTransition()

void MotionMaster::MoveTierTransition ( uint32  id,
Position const &  pos,
AnimTier  newAnimTier,
Optional< int32 >  tierTransitionId = {},
Optional< float >  velocity = {},
MovementWalkRunSpeedSelectionMode  speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default,
Scripting::v2::ActionResultSetter< MovementStopReason > &&  scriptResult = {} 
)

◆ Pop()

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

Definition at line 1233 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 1226 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 254 of file MotionMaster.h.

Referenced by AddToWorld(), and Update().

◆ ResolveDelayedActions()

void MotionMaster::ResolveDelayedActions ( )
private

Definition at line 1217 of file MotionMaster.cpp.

References _delayedActions.

Referenced by AddToWorld(), and Update().

◆ ResumeSplineChain()

◆ Size()

uint32 MotionMaster::Size ( ) const

Definition at line 131 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 274 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 276 of file MotionMaster.h.

◆ _generators

◆ _owner


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