Core/Spells: Fixed implementation of SPELL_ATTR1_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS and removed banish special cases that were neccessary because that attribute wasn't correctly supported

This commit is contained in:
Shauren
2024-06-19 20:14:53 +02:00
parent e54e3ed204
commit c968dedfee
10 changed files with 155 additions and 144 deletions

View File

@@ -2920,7 +2920,7 @@ void Spell::TargetInfo::DoDamageAndTriggers(Spell* spell)
// Fill base damage struct (unitTarget - is real spell target)
SpellNonMeleeDamage damageInfo(caster, spell->unitTarget, spell->m_spellInfo, spell->m_SpellVisual, spell->m_spellSchoolMask, spell->m_castId);
// Check damage immunity
if (spell->unitTarget->IsImmunedToDamage(spell->m_spellInfo))
if (spell->unitTarget->IsImmunedToDamage(caster, spell->m_spellInfo))
{
hitMask = PROC_HIT_IMMUNE;
spell->m_damage = 0;