fix(Core/Movement): Revert pet PATHFIND_NOT_USING_PATH teleport (#23494) (#25071)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-03-12 08:12:22 -05:00
committed by GitHub
parent 40f55bb0f3
commit 9a9d265334
2 changed files with 1 additions and 18 deletions

View File

@@ -158,15 +158,6 @@ void PetAI::UpdateAI(uint32 diff)
else
m_updateAlliesTimer -= diff;
if (owner && owner->IsPlayer() && !me->GetVictim() && me->CanNotReachTarget())
{
if (me->GetDistance(owner) > 40.0f)
{
me->NearTeleportTo(owner->GetPositionX(), owner->GetPositionY(), owner->GetPositionZ(), me->GetOrientation());
me->SetCannotReachTarget(); // Clear flag after teleport
}
}
if (me->GetVictim() && me->GetVictim()->IsAlive())
{
// is only necessary to stop casting, the pet must not exit combat

View File

@@ -648,16 +648,8 @@ bool FollowMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
owner->UpdateAllowedPositionZ(x, y, z);
bool success = i_path->CalculatePath(x, y, z, forceDest);
bool cannotReachTarget = !success || (i_path->GetPathType() & PATHFIND_NOPATH && !followingMaster);
if (oPet && followingMaster && !owner->CanFly() && (i_path->GetPathType() & PATHFIND_NOT_USING_PATH))
cannotReachTarget = true;
if (cannotReachTarget)
if (!success || (i_path->GetPathType() & PATHFIND_NOPATH && !followingMaster))
{
if (oPet && followingMaster)
cOwner->SetCannotReachTarget(target->GetGUID());
if (!owner->IsStopped())
owner->StopMoving();