Fix Feeding Frenzy, Cobra Reflexes, Cornered. Now they are active only when victim hp is below certain percentage. Patch by thenecromancer, updated by krz

--HG--
branch : trunk
This commit is contained in:
Kudlaty
2009-10-31 01:50:52 +01:00
parent a5937d9d13
commit 98d53f6a9d
4 changed files with 31 additions and 6 deletions

View File

@@ -1174,6 +1174,21 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType)
}
}
Unit::AuraEffectList const& mDummy = GetAurasByType(SPELL_AURA_MOD_ATTACKSPEED);
for(Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
{
switch ((*itr)->GetSpellProto()->Id)
{
case 61682:
case 61683:
mindamage = mindamage * (100.0f-float((*itr)->GetAmount()))/100.0f;
maxdamage = maxdamage * (100.0f-float((*itr)->GetAmount()))/100.0f;
break;
default:
break;
}
}
SetStatFloatValue(UNIT_FIELD_MINDAMAGE, mindamage);
SetStatFloatValue(UNIT_FIELD_MAXDAMAGE, maxdamage);
}