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
906e73f8ae
commit
a1ce5ff595
@ -1264,8 +1264,6 @@ bool MovementAction::Follow(Unit* target, float distance, float angle)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
EmitDebugMove("Follow", "follow", target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (!bot->InBattleground()
|
if (!bot->InBattleground()
|
||||||
&& ServerFacade::instance().IsDistanceLessOrEqualThan(ServerFacade::instance().GetDistance2d(bot, target->GetPositionX(),
|
&& 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),
|
if (ServerFacade::instance().IsDistanceGreaterOrEqualThan(ServerFacade::instance().GetDistance2d(bot, target),
|
||||||
sPlayerbotAIConfig.sightDistance))
|
sPlayerbotAIConfig.sightDistance))
|
||||||
{
|
{
|
||||||
|
EmitDebugMove("Follow", "mmap", target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
||||||
|
|
||||||
if (target->GetGUID().IsPlayer())
|
if (target->GetGUID().IsPlayer())
|
||||||
{
|
{
|
||||||
Player* pTarget = (Player*)target;
|
Player* pTarget = (Player*)target;
|
||||||
@ -1424,6 +1424,7 @@ bool MovementAction::Follow(Unit* target, float distance, float angle)
|
|||||||
if (bot->GetMotionMaster()->GetCurrentMovementGeneratorType() != FOLLOW_MOTION_TYPE)
|
if (bot->GetMotionMaster()->GetCurrentMovementGeneratorType() != FOLLOW_MOTION_TYPE)
|
||||||
bot->GetMotionMaster()->Clear();
|
bot->GetMotionMaster()->Clear();
|
||||||
|
|
||||||
|
EmitDebugMove("Follow", "follow", target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
||||||
bot->GetMotionMaster()->MoveFollow(target, distance, angle);
|
bot->GetMotionMaster()->MoveFollow(target, distance, angle);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user