mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
fix(Core/Debug): Split Follow whisper into via=mmap and via=follow
This commit is contained in:
parent
15f7c140c9
commit
5a2343824c
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user