fix(Core/Debug): Split Follow whisper into via=mmap and via=follow

This commit is contained in:
bash 2026-05-06 23:33:09 +02:00
parent 15f7c140c9
commit 5a2343824c

View File

@ -1264,8 +1264,6 @@ bool MovementAction::Follow(Unit* target, float distance, float angle)
return false;
}
EmitDebugMove("Follow", "follow", target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
/*
if (!bot->InBattleground()
&& ServerFacade::instance().IsDistanceLessOrEqualThan(ServerFacade::instance().GetDistance2d(bot, target->GetPositionX(),
@ -1339,6 +1337,8 @@ bool MovementAction::Follow(Unit* target, float distance, float angle)
if (ServerFacade::instance().IsDistanceGreaterOrEqualThan(ServerFacade::instance().GetDistance2d(bot, target),
sPlayerbotAIConfig.sightDistance))
{
EmitDebugMove("Follow", "mmap", target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
if (target->GetGUID().IsPlayer())
{
Player* pTarget = (Player*)target;
@ -1424,6 +1424,7 @@ bool MovementAction::Follow(Unit* target, float distance, float angle)
if (bot->GetMotionMaster()->GetCurrentMovementGeneratorType() != FOLLOW_MOTION_TYPE)
bot->GetMotionMaster()->Clear();
EmitDebugMove("Follow", "follow", target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
bot->GetMotionMaster()->MoveFollow(target, distance, angle);
return true;
}