mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8629] don't let eventaicreatures cast spells in stuns etc.
also small correction to feign death (unit could still turn around to face his victim with this aura)
This commit is contained in:
parent
2be50d4b95
commit
01318dbc8c
3 changed files with 4 additions and 3 deletions
|
|
@ -1341,7 +1341,8 @@ bool CreatureEventAI::CanCast(Unit* Target, SpellEntry const *Spell, bool Trigge
|
|||
return false;
|
||||
|
||||
//Silenced so we can't cast
|
||||
if (!Triggered && m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
if (!Triggered && (m_creature->hasUnitState(UNIT_STAT_CONFUSED | UNIT_STAT_STUNNED | UNIT_STAT_FLEEING | UNIT_STAT_DIED)
|
||||
|| m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED)))
|
||||
return false;
|
||||
|
||||
//Check for power
|
||||
|
|
|
|||
|
|
@ -10234,7 +10234,7 @@ bool Unit::SelectHostilTarget()
|
|||
|
||||
if(target)
|
||||
{
|
||||
if(!hasUnitState(UNIT_STAT_STUNNED))
|
||||
if(!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_DIED))
|
||||
SetInFront(target);
|
||||
((Creature*)this)->AI()->AttackStart(target);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8628"
|
||||
#define REVISION_NR "8629"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue