Core/Unit: damage immune improvements

This commit is contained in:
hondacrx
2017-12-30 17:53:28 -05:00
parent 0713188d5f
commit 01caaecf0f
6 changed files with 87 additions and 38 deletions
+5
View File
@@ -803,6 +803,11 @@ namespace Game.Entities
if (victim.IsImmunedToSpell(spellInfo))
return SpellMissInfo.Immune;
// Damage immunity is only checked if the spell has damage effects, this immunity must not prevent aura apply
// returns SPELL_MISS_IMMUNE in that case, for other spells, the SMSG_SPELL_GO must show hit
if (spellInfo.HasOnlyDamageEffects() && victim.IsImmunedToDamage(spellInfo))
return SpellMissInfo.Immune;
// All positive spells can`t miss
// @todo client not show miss log for this spells - so need find info for this in dbc and use it!
if (spellInfo.IsPositive()