diff --git a/src/strategy/triggers/RangeTriggers.cpp b/src/strategy/triggers/RangeTriggers.cpp index 8eb8e22c..64089665 100644 --- a/src/strategy/triggers/RangeTriggers.cpp +++ b/src/strategy/triggers/RangeTriggers.cpp @@ -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)