mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[9604] Prevent unexpected call to AttackStart when having unit_state stunned/died
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
bfecdc3ded
commit
e11c4b4e03
2 changed files with 6 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue