*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
This commit is contained in:
megamage
2008-11-26 22:17:27 -06:00
parent cee531501b
commit 28355d886d
2 changed files with 629 additions and 1 deletions
+15 -1
View File
@@ -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();