diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 6321291b1bd..38b3e74635d 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2437,6 +2437,11 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM RemainingDamage -= currentAbsorb; + if (caster->IsImmuneToDamage(schoolMask)) + { + SendSpellMiss(caster, (*i)->GetSpellProto()->Id, SPELL_MISS_IMMUNE); + return; + } uint32 splitted = currentAbsorb; uint32 splitted_absorb = 0; pCaster->DealDamageMods(caster, splitted, &splitted_absorb); @@ -2465,6 +2470,12 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM RemainingDamage -= int32(splitted); + if (caster->IsImmuneToDamage(schoolMask)) + { + SendSpellMiss(caster, (*i)->GetSpellProto()->Id, SPELL_MISS_IMMUNE); + return; + } + uint32 split_absorb = 0; pCaster->DealDamageMods(caster, splitted, &split_absorb);