Core/Spell: revamp of immunities system

This commit is contained in:
hondacrx
2017-12-26 15:07:05 -05:00
parent 2c0134ba33
commit 3da0e167e6
13 changed files with 942 additions and 662 deletions
+6
View File
@@ -858,6 +858,12 @@ namespace Game.Entities
}
public uint DealDamage(Unit victim, uint damage, CleanDamage cleanDamage = null, DamageEffectType damagetype = DamageEffectType.Direct, SpellSchoolMask damageSchoolMask = SpellSchoolMask.Normal, SpellInfo spellProto = null, bool durabilityLoss = true)
{
if (victim.IsImmunedToDamage(spellProto))
{
SendSpellDamageImmune(victim, spellProto.Id, false);
return 0;
}
if (victim.IsAIEnabled)
victim.GetAI().DamageTaken(this, ref damage);