fix(Core/Unit): Ignore Armor Calculation for spells with SPELL_ATTR4_IGNORE_DAMAGE_TAKEN_MODIFIERS (#24592)

This commit is contained in:
Gultask
2026-02-03 20:30:11 -03:00
committed by GitHub
parent 871163b1cc
commit 0efc2b3179
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1345,7 +1345,7 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
} }
int32 cleanDamage = 0; int32 cleanDamage = 0;
if (Unit::IsDamageReducedByArmor(damageSchoolMask, spellInfo)) if (!spellInfo->HasAttribute(SPELL_ATTR4_IGNORE_DAMAGE_TAKEN_MODIFIERS) && Unit::IsDamageReducedByArmor(damageSchoolMask, spellInfo))
{ {
int32 oldDamage = damage; int32 oldDamage = damage;
damage = Unit::CalcArmorReducedDamage(this, victim, damage, spellInfo, 0, attackType); damage = Unit::CalcArmorReducedDamage(this, victim, damage, spellInfo, 0, attackType);
@@ -256,7 +256,7 @@ class spell_gluth_decimate : public SpellScript
return; return;
} }
GetCaster()->CastSpell(unitTarget, SPELL_DECIMATE_DAMAGE); GetCaster()->CastSpell(unitTarget, SPELL_DECIMATE_DAMAGE, true);
} }
} }
@@ -271,7 +271,7 @@ class spell_gluth_decimate_damage : public SpellScript
{ {
PrepareSpellScript(spell_gluth_decimate_damage) PrepareSpellScript(spell_gluth_decimate_damage)
void RecalculateDamage() void HandleDamage(SpellEffIndex /*effIndex*/)
{ {
Unit* target = GetHitUnit(); Unit* target = GetHitUnit();
if (!target) if (!target)
@@ -291,7 +291,7 @@ class spell_gluth_decimate_damage : public SpellScript
void Register() override void Register() override
{ {
OnHit += SpellHitFn(spell_gluth_decimate_damage::RecalculateDamage); OnEffectHitTarget += SpellEffectFn(spell_gluth_decimate_damage::HandleDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
} }
}; };