mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
too close trigger
This commit is contained in:
@@ -15,7 +15,7 @@ static float GetSpeedInMotion(Unit* target)
|
||||
bool EnemyTooCloseForSpellTrigger::IsActive()
|
||||
{
|
||||
Unit* target = AI_VALUE(Unit*, "current target");
|
||||
return target && target->GetVictim() != bot &&
|
||||
return target && (target->GetVictim() != bot || target->isFrozen() || !target->CanFreeMove()) &&
|
||||
target->GetObjectSize() <= 10.0f &&
|
||||
AI_VALUE2(float, "distance", "current target") <= sPlayerbotAIConfig->tooCloseDistance;
|
||||
// Unit* target = AI_VALUE(Unit*, "current target");
|
||||
@@ -79,7 +79,7 @@ bool EnemyTooCloseForAutoShotTrigger::IsActive()
|
||||
bool EnemyTooCloseForShootTrigger::IsActive()
|
||||
{
|
||||
Unit* target = AI_VALUE(Unit*, "current target");
|
||||
return target && target->GetVictim() != bot && AI_VALUE2(float, "distance", "current target") <= sPlayerbotAIConfig->shootDistance;
|
||||
return target && (target->GetVictim() != bot || target->isFrozen() || !target->CanFreeMove()) && AI_VALUE2(float, "distance", "current target") <= sPlayerbotAIConfig->shootDistance;
|
||||
|
||||
// Unit* target = AI_VALUE(Unit*, "current target");
|
||||
// if (!target)
|
||||
|
||||
Reference in New Issue
Block a user