diff options
author | megamage <none@none> | 2009-08-26 16:54:59 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-26 16:54:59 -0500 |
commit | a35991c8365575226394f90071dc97894e94f21c (patch) | |
tree | 450f5f2eec929dacc5c09f1e13c9eaa7a75a81ba /src/game/Creature.cpp | |
parent | dad2c55287d4a9c35cbfa1ad4e8d3e8e8255f588 (diff) |
*Add function CanAIAttack
--HG--
branch : trunk
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r-- | src/game/Creature.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 3d11c4a0941..330c93429b6 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -2185,6 +2185,9 @@ bool Creature::canCreatureAttack(Unit const *pVictim, bool force) const if(!pVictim->isInAccessiblePlaceFor(this)) return false; + if(!AI()->CanAIAttack(pVictim)) + return false; + if(sMapStore.LookupEntry(GetMapId())->IsDungeon()) return true; |