Core/Movement: Allow specifying timeout for follow movement

This commit is contained in:
Shauren
2023-03-04 14:57:17 +01:00
parent 1baa2f4f39
commit 39b76cfbc2
7 changed files with 25 additions and 10 deletions

View File

@@ -368,7 +368,7 @@ class npc_molten_barrage : public CreatureScript
void AttackStart(Unit* target) override
{
if (target)
me->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f, MOTION_SLOT_DEFAULT);
me->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f, {}, MOTION_SLOT_DEFAULT);
}
void IsSummonedBy(WorldObject* /*summoner*/) override

View File

@@ -80,7 +80,7 @@ void firelands_bossAI::EnterEvadeMode(EvadeReason why)
if (Unit* owner = me->GetCharmerOrOwner())
{
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE);
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), {}, MOTION_SLOT_ACTIVE);
}
else
{

View File

@@ -834,7 +834,7 @@ public:
me->SetReactState(REACT_DEFENSIVE);
FollowAngle = me->GetAbsoluteAngle(crok) + me->GetOrientation();
FollowDist = me->GetDistance2d(crok);
me->GetMotionMaster()->MoveFollow(crok, FollowDist, FollowAngle, MOTION_SLOT_DEFAULT);
me->GetMotionMaster()->MoveFollow(crok, FollowDist, FollowAngle, {}, MOTION_SLOT_DEFAULT);
}
me->setActive(true);
@@ -875,7 +875,7 @@ public:
{
me->GetMotionMaster()->Clear();
if (Creature* crok = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_CROK_SCOURGEBANE)))
me->GetMotionMaster()->MoveFollow(crok, FollowDist, FollowAngle, MOTION_SLOT_DEFAULT);
me->GetMotionMaster()->MoveFollow(crok, FollowDist, FollowAngle, {}, MOTION_SLOT_DEFAULT);
}
Reset();