diff options
| author | Nay <dnpd.dd@gmail.com> | 2011-10-01 16:29:23 +0100 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2011-10-01 16:29:23 +0100 |
| commit | 0f7d9e4837985b28e0e84a7164103dd1981fb58e (patch) | |
| tree | 5b5b27b96ed4a01f1d785195bbe4463c56cfa5a6 /src/server/game/AI/SmartScripts | |
| parent | 269274f34754abfe5f36781b090b956f15474076 (diff) | |
Core/SAI: Fix an issue where SAI was ignoring civilian and passive unit flags
Closes #2526
Disclaimer: This was not thoroughly tested; report any issue caused by this change.
Diffstat (limited to 'src/server/game/AI/SmartScripts')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 72dbb4baff7..253ac6c9155 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -469,6 +469,9 @@ void SmartAI::MoveInLineOfSight(Unit* who) if (!CanAIAttack(who)) return; + + if (!me->canStartAttack(who, false)) + return; if (me->IsHostileTo(who)) { @@ -487,9 +490,6 @@ void SmartAI::MoveInLineOfSight(Unit* who) } } } - - //if (me->canStartAttack(who, false)) - // AttackStart(who); } bool SmartAI::CanAIAttack(const Unit* /*who*/) const |
