diff options
| author | megamage <none@none> | 2008-11-26 22:17:27 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2008-11-26 22:17:27 -0600 |
| commit | 28355d886d1e72e08d2845e2dce61209937743d4 (patch) | |
| tree | 19acf50aadb18c38dfaf8b9b8903294ec27591b3 /src | |
| parent | cee531501b6e3bea341951ac63c99060c0621dff (diff) | |
*Fix the bug that taunted creatures stop updateAI.
*Do not let invisible creatures enterevademode if invisible aura is not permanent.
*Update procflag sql. By DiSlord.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Unit.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index c40f37ec48f..2e855283cfe 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10333,6 +10333,8 @@ bool Unit::SelectHostilTarget() { target = m_ThreatManager.getHostilTarget(); } + else + target = getVictim(); } if(target) @@ -10344,7 +10346,7 @@ bool Unit::SelectHostilTarget() } // no target but something prevent go to evade mode - if( !isInCombat() || HasAuraType(SPELL_AURA_MOD_TAUNT) ) + if( !isInCombat() /*|| HasAuraType(SPELL_AURA_MOD_TAUNT)*/ ) return false; // last case when creature don't must go to evade mode: @@ -10367,6 +10369,18 @@ bool Unit::SelectHostilTarget() return true; } + if(m_invisibilityMask) + { + Unit::AuraList const& iAuras = GetAurasByType(SPELL_AURA_MOD_INVISIBILITY); + for(Unit::AuraList::const_iterator itr = iAuras.begin(); itr != iAuras.end(); ++itr) + if((*itr)->IsPermanent()) + { + ((Creature*)this)->AI()->EnterEvadeMode(); + break; + } + return false; + } + // enter in evade mode in other case ((Creature*)this)->AI()->EnterEvadeMode(); |
