mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[9208] Big cleanup in UNIT_STAT_* use
* Re-number enums by function groups and use where possible new defined masks in code instead raw enum |-lists. * Avoid use movement generator generic state markers like UNIT_STAT_CONFUSED for mark movement stoped. Add special shadow UNIT_STAT_CONFUSED_MOVE/etc states for like use. UNIT_STAT_CONFUSED in like case will be safe expect use for normal checks confused state presence And UNIT_STAT_CONFUSED_MOVE for check real move in this state
This commit is contained in:
parent
7d6b1b292e
commit
6a2e8064f1
25 changed files with 251 additions and 104 deletions
|
|
@ -1607,7 +1607,7 @@ void Spell::EffectDummy(uint32 i)
|
|||
}
|
||||
|
||||
//Any effect which causes you to lose control of your character will supress the starfall effect.
|
||||
if (m_caster->hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_FLEEING | UNIT_STAT_ROOT | UNIT_STAT_CONFUSED))
|
||||
if (m_caster->hasUnitState(UNIT_STAT_NO_FREE_MOVE))
|
||||
return;
|
||||
|
||||
switch(m_spellInfo->Id)
|
||||
|
|
@ -3704,7 +3704,7 @@ void Spell::EffectDistract(uint32 /*i*/)
|
|||
return;
|
||||
|
||||
// target must be OK to do this
|
||||
if( unitTarget->hasUnitState(UNIT_STAT_CONFUSED | UNIT_STAT_STUNNED | UNIT_STAT_FLEEING ) )
|
||||
if( unitTarget->hasUnitState(UNIT_STAT_CAN_NOT_REACT) )
|
||||
return;
|
||||
|
||||
float angle = unitTarget->GetAngle(m_targets.m_destX, m_targets.m_destY);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue