fix(Core/Movement): Allow MoveFollow to not inherit speed of the target (#21711)

This commit is contained in:
sudlud
2025-03-15 21:47:11 +01:00
committed by GitHub
parent 92c666afb4
commit 4459afc98d
6 changed files with 14 additions and 12 deletions

View File

@@ -264,7 +264,7 @@ void FollowerAI::MovementInform(uint32 motionType, uint32 pointId)
}
}
void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Quest* quest)
void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Quest* quest, bool inheritWalkState, bool inheritSpeed)
{
if (me->GetVictim())
{
@@ -297,7 +297,7 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu
AddFollowState(STATE_FOLLOW_INPROGRESS);
me->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
me->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE, MOTION_SLOT_ACTIVE, inheritWalkState, inheritSpeed);
LOG_DEBUG("scripts.ai", "FollowerAI start follow {} ({})", player->GetName(), m_uiLeaderGUID.ToString());
}