Core/Spells: add SPELL_ATTR_CU_IGNORE_ARMOR to the avalible custom attribute list, make some spells use the attribute. Research made with JohnHoliver and Shauren
--HG-- branch : trunk
This commit is contained in:
@@ -1271,10 +1271,8 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
|
||||
{
|
||||
damage = caster->SpellDamageBonus(target, GetSpellProto(), damage, DOT, GetBase()->GetStackAmount());
|
||||
|
||||
// Calculate armor mitigation if it is a physical spell
|
||||
// But not for bleed mechanic spells
|
||||
if (GetSpellSchoolMask(GetSpellProto()) & SPELL_SCHOOL_MASK_NORMAL &&
|
||||
GetEffectMechanic(GetSpellProto(), m_effIndex) != MECHANIC_BLEED)
|
||||
// Calculate armor mitigation
|
||||
if (Unit::IsDamageReducedByArmor(GetSpellSchoolMask(GetSpellProto()), GetSpellProto(), m_effIndex))
|
||||
{
|
||||
uint32 damageReductedArmor = caster->CalcArmorReducedDamage(target, damage, GetSpellProto());
|
||||
cleanDamage.mitigated_damage += damage - damageReductedArmor;
|
||||
@@ -1384,8 +1382,8 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
|
||||
if (crit)
|
||||
damage = caster->SpellCriticalDamageBonus(m_spellProto, damage, target);
|
||||
|
||||
//Calculate armor mitigation if it is a physical spell
|
||||
if (GetSpellSchoolMask(GetSpellProto()) & SPELL_SCHOOL_MASK_NORMAL)
|
||||
// Calculate armor mitigation
|
||||
if (Unit::IsDamageReducedByArmor(GetSpellSchoolMask(GetSpellProto()), GetSpellProto(), m_effIndex))
|
||||
{
|
||||
uint32 damageReductedArmor = caster->CalcArmorReducedDamage(target, damage, GetSpellProto());
|
||||
cleanDamage.mitigated_damage += damage - damageReductedArmor;
|
||||
|
||||
Reference in New Issue
Block a user