Implement AURA_STATE_FROZEN

Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
DiSlord 2009-01-13 01:15:41 +03:00
parent aff0fa1489
commit ba25093ef2
3 changed files with 12 additions and 10 deletions

View file

@ -3560,13 +3560,18 @@ void Aura::HandleAuraModRoot(bool apply, bool Real)
if(!Real)
return;
// Frost root aura -> freeze/unfreeze target
if (GetSpellSchoolMask(m_spellProto) & SPELL_SCHOOL_MASK_FROST)
m_target->ModifyAuraState(AURA_STATE_FROZEN, apply);
uint32 apply_stat = UNIT_STAT_ROOT;
if (apply)
{
m_target->addUnitState(UNIT_STAT_ROOT);
m_target->SetUInt64Value (UNIT_FIELD_TARGET, 0);
// probably wrong
m_target->SetFlag(UNIT_FIELD_FLAGS,(apply_stat<<16));
// probably wrong (this add skinable flag)
// TODO: find correct flag
// m_target->SetFlag(UNIT_FIELD_FLAGS,(apply_stat<<16));
//Save last orientation
if( m_target->getVictim() )
@ -3592,8 +3597,9 @@ void Aura::HandleAuraModRoot(bool apply, bool Real)
return;
m_target->clearUnitState(UNIT_STAT_ROOT);
// probably wrong
m_target->RemoveFlag(UNIT_FIELD_FLAGS,(apply_stat<<16));
// probably wrong (this add skinable flag)
// TODO: find correct flag
// m_target->RemoveFlag(UNIT_FIELD_FLAGS,(apply_stat<<16));
if(!m_target->hasUnitState(UNIT_STAT_STUNNED)) // prevent allow move if have also stun effect
{