mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +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
|
// 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue