@@ -2238,20 +2238,11 @@ uint32 Unit::CalcArmorReducedDamage(Unit const* attacker, Unit const* victim, co
22382238 if (Player* modOwner = attacker->GetSpellModOwner())
22392239 modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_IGNORE_ARMOR, armor);
22402240
2241- AuraEffectList const& ResIgnoreAurasAb = attacker->GetAuraEffectsByType(SPELL_AURA_MOD_ABILITY_IGNORE_TARGET_RESIST);
2242- for (AuraEffectList::const_iterator j = ResIgnoreAurasAb.begin(); j != ResIgnoreAurasAb.end(); ++j)
2243- {
2244- if ((*j)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL
2245- && (*j)->IsAffectedOnSpell(spellInfo))
2246- armor = std::floor(AddPct(armor, -(*j)->GetAmount()));
2247- }
2248-
2249- AuraEffectList const& ResIgnoreAuras = attacker->GetAuraEffectsByType(SPELL_AURA_MOD_IGNORE_TARGET_RESIST);
2250- for (AuraEffectList::const_iterator j = ResIgnoreAuras.begin(); j != ResIgnoreAuras.end(); ++j)
2251- {
2252- if ((*j)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL)
2253- armor = std::floor(AddPct(armor, -(*j)->GetAmount()));
2254- }
2241+ // Apply ability-specific ignore target resist effects for physical damage (armor)
2242+ AuraEffectList const& targetIgnoreRes = attacker->GetAuraEffectsByType(SPELL_AURA_MOD_ABILITY_IGNORE_TARGET_RESIST);
2243+ for (AuraEffect const* aurEff : targetIgnoreRes)
2244+ if (aurEff->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL && aurEff->IsAffectedOnSpell(spellInfo))
2245+ armor = std::floor(AddPct(armor, -aurEff->GetAmount()));
22552246
22562247 // Apply Player CR_ARMOR_PENETRATION rating and buffs from stances\specializations etc.
22572248 if (attacker->IsPlayer())
@@ -2399,8 +2390,6 @@ void Unit::CalcAbsorbResist(DamageInfo& dmgInfo, bool Splited)
23992390 return true;
24002391 });
24012392 damageResisted -= damageResisted * (mult - 1.0f);
2402- mult = attacker->GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_IGNORE_TARGET_RESIST, schoolMask);
2403- damageResisted -= damageResisted * (mult - 1.0f);
24042393 }
24052394
24062395 // pussywizard:
@@ -8986,21 +8975,15 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
89868975 TakenTotalMod = 1.0f;
89878976 }
89888977
8989- // xinef: sanctified wrath talent
8990- if (caster && TakenTotalMod < 1.0f && caster->HasIgnoreTargetResistAura ())
8978+ // Sanctified Wrath (bypass damage reduction)
8979+ if (caster && TakenTotalMod < 1.0f && caster->HasIgnoreTargetResistModifiersAura ())
89918980 {
8992- float ignoreModifier = 1.0f - TakenTotalMod;
8993- bool addModifier = false;
8994- AuraEffectList const& ResIgnoreAuras = caster->GetAuraEffectsByType(SPELL_AURA_MOD_IGNORE_TARGET_RESIST);
8995- for (AuraEffectList::const_iterator j = ResIgnoreAuras.begin(); j != ResIgnoreAuras.end(); ++j)
8996- if ((*j)->GetMiscValue() & spellProto->SchoolMask)
8997- {
8998- ApplyPct(ignoreModifier, (*j)->GetAmount());
8999- addModifier = true;
9000- }
8981+ float damageModifier = 1.0f - TakenTotalMod;
8982+ for (AuraEffect const* aurEff : caster->GetAuraEffectsByType(SPELL_AURA_MOD_IGNORE_TARGET_RESIST_MODIFIERS))
8983+ if (aurEff->GetMiscValue() & spellProto->SchoolMask)
8984+ AddPct(damageModifier, -aurEff->GetAmount());
90018985
9002- if (addModifier)
9003- TakenTotalMod += ignoreModifier;
8986+ TakenTotalMod = 1.0f - damageModifier;
90048987 }
90058988
90068989 float tmpDamage = (float(pdamage) + TakenTotal) * TakenTotalMod;
@@ -10448,21 +10431,15 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
1044810431 TakenTotalMod = 1.0f;
1044910432 }
1045010433
10451- // xinef: sanctified wrath talent
10452- if (TakenTotalMod < 1.0f && attacker->HasIgnoreTargetResistAura ())
10434+ // Sanctified Wrath (bypass damage reduction)
10435+ if (TakenTotalMod < 1.0f && attacker->HasIgnoreTargetResistModifiersAura ())
1045310436 {
10454- float ignoreModifier = 1.0f - TakenTotalMod;
10455- bool addModifier = false;
10456- AuraEffectList const& ResIgnoreAuras = attacker->GetAuraEffectsByType(SPELL_AURA_MOD_IGNORE_TARGET_RESIST);
10457- for (AuraEffectList::const_iterator j = ResIgnoreAuras.begin(); j != ResIgnoreAuras.end(); ++j)
10458- if ((*j)->GetMiscValue() & damageSchoolMask)
10459- {
10460- ApplyPct(ignoreModifier, (*j)->GetAmount());
10461- addModifier = true;
10462- }
10437+ float damageModifier = 1.0f - TakenTotalMod;
10438+ for (AuraEffect const* aurEff : attacker->GetAuraEffectsByType(SPELL_AURA_MOD_IGNORE_TARGET_RESIST_MODIFIERS))
10439+ if (aurEff->GetMiscValue() & damageSchoolMask)
10440+ AddPct(damageModifier, -aurEff->GetAmount());
1046310441
10464- if (addModifier)
10465- TakenTotalMod += ignoreModifier;
10442+ TakenTotalMod = 1.0f - damageModifier;
1046610443 }
1046710444
1046810445 float tmpDamage = (float(pdamage) + TakenFlatBenefit) * TakenTotalMod;
0 commit comments