aboutsummaryrefslogtreecommitdiff
path: root/src/game/GuardAI.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-11-07 09:36:46 -0600
committermegamage <none@none>2008-11-07 09:36:46 -0600
commitfd3fcb461253bb8d269faa90af877e1e3e8b12a8 (patch)
tree8c23861b1fc3b14908d1a22c5f491c1aad9d2d21 /src/game/GuardAI.cpp
parentfdff7330d29eee31d6f7849067d1a68441402370 (diff)
[svn] Remove isVisible function. Check stealth and invisible in canAttack();
Use new remove aura by interrupt flag function. --HG-- branch : trunk
Diffstat (limited to 'src/game/GuardAI.cpp')
-rw-r--r--src/game/GuardAI.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/GuardAI.cpp b/src/game/GuardAI.cpp
index 17d62efe44c..5e049d77b71 100644
--- a/src/game/GuardAI.cpp
+++ b/src/game/GuardAI.cpp
@@ -43,7 +43,7 @@ void GuardAI::MoveInLineOfSight(Unit *u)
if ( !i_creature.canFly() && i_creature.GetDistanceZ(u) > CREATURE_Z_ATTACK_RANGE )
return;
- if( !i_creature.getVictim() && u->isTargetableForAttack() &&
+ if( !i_creature.getVictim() && i_creature.canAttack(u) &&
( u->IsHostileToPlayers() || i_creature.IsHostileTo(u) /*|| u->getVictim() && i_creature.IsFriendlyTo(u->getVictim())*/ ) &&
u->isInAccessablePlaceFor(&i_creature))
{