[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 // No taunt aura or taunt aura caster is dead standart target selection
target = m_ThreatManager.getHostileTarget(); 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); SetInFront(target);
((Creature*)this)->AI()->AttackStart(target); ((Creature*)this)->AI()->AttackStart(target);
}
return true; return true;
} }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9603" #define REVISION_NR "9604"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__