mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
fix: bot stuck after drink or food && initialization customized
This commit is contained in:
@@ -15,7 +15,15 @@ bool InvalidTargetValue::Calculate()
|
||||
|
||||
if (target && qualifier == "current target")
|
||||
{
|
||||
return !AttackersValue::IsValidTarget(target, bot);
|
||||
return target->GetMapId() != bot->GetMapId() ||
|
||||
!target->IsAlive() ||
|
||||
target->IsPolymorphed() ||
|
||||
target->IsCharmed() ||
|
||||
target->isFeared() ||
|
||||
target->HasUnitState(UNIT_STATE_ISOLATED) ||
|
||||
target->IsFriendlyTo(bot) ||
|
||||
!bot->IsWithinDistInMap(target, sPlayerbotAIConfig->sightDistance) ||
|
||||
!bot->IsWithinLOSInMap(target);
|
||||
}
|
||||
|
||||
return !target;
|
||||
|
||||
Reference in New Issue
Block a user