Skip to content

Commit

Permalink
Don't split damage to targets that are immune
Browse files Browse the repository at this point in the history
Fixes Blessing of Sacrifice delaing damage to paladin affected by Divine
Shield or other immunity auras.

Signed-off-by: robinsch <robin.schriever.hude@web.de>
  • Loading branch information
robinsch authored and Warlockbugs committed Sep 15, 2016
1 parent f50b259 commit 385eb87
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/game/Unit.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 385eb87

Please sign in to comment.