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;
|
||||
|
||||
@@ -3853,6 +3853,20 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
spellInfo->EffectRadiusIndex[0] = 12;
|
||||
count++;
|
||||
break;
|
||||
case 18500: // Wing Buffet
|
||||
case 33086: // Wild Bite
|
||||
case 49749: // Piercing Blow
|
||||
case 53454: // Impale
|
||||
case 59446: // Impale
|
||||
case 62383: // Shatter
|
||||
case 64777: // Machine Gun
|
||||
case 65239: // Machine Gun
|
||||
case 65919: // Pursuing Spikes
|
||||
case 69293: // Wing Buffet
|
||||
case 74439: // Machine Gun
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_IGNORE_ARMOR;
|
||||
count++;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -880,6 +880,7 @@ inline bool IsProfessionSkill(uint32 skill)
|
||||
#define SPELL_ATTR_CU_NEGATIVE_EFF1 0x00020000
|
||||
#define SPELL_ATTR_CU_NEGATIVE_EFF2 0x00040000
|
||||
#define SPELL_ATTR_CU_NEGATIVE 0x00070000
|
||||
#define SPELL_ATTR_CU_IGNORE_ARMOR 0x00080000
|
||||
|
||||
typedef std::vector<uint32> SpellCustomAttribute;
|
||||
typedef std::vector<bool> EnchantCustomAttribute;
|
||||
|
||||
Reference in New Issue
Block a user