[9604] Prevent unexpected call to AttackStart when having unit_state stunned/died

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-03-18 11:34:26 +01:00
parent bfecdc3ded
commit e11c4b4e03
2 changed files with 6 additions and 4 deletions

View file

@ -11187,11 +11187,13 @@ bool Unit::SelectHostileTarget()
// No taunt aura or taunt aura caster is dead standart target selection
target = m_ThreatManager.getHostileTarget();
if(target)
if (target)
{
if(!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_DIED))
if (!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_DIED))
{
SetInFront(target);
((Creature*)this)->AI()->AttackStart(target);
((Creature*)this)->AI()->AttackStart(target);
}
return true;
}