diff --git a/Source/Game/Entities/StatSystem.cs b/Source/Game/Entities/StatSystem.cs index de2ad0446..d0c1d2c0c 100644 --- a/Source/Game/Entities/StatSystem.cs +++ b/Source/Game/Entities/StatSystem.cs @@ -741,10 +741,10 @@ namespace Game.Entities damage -= (int)target.GetDamageReduction((uint)damage); } - public int CalculateAOEAvoidance(int damage, uint schoolMask, Unit caster) + public int CalculateAOEAvoidance(int damage, uint schoolMask, ObjectGuid casterGuid) { damage = (int)((float)damage * GetTotalAuraMultiplierByMiscMask(AuraType.ModAoeDamageAvoidance, schoolMask)); - if (caster.IsCreature()) + if (casterGuid.IsAnyTypeCreature()) damage = (int)((float)damage * GetTotalAuraMultiplierByMiscMask(AuraType.ModCreatureAoeDamageAvoidance, schoolMask)); return damage; diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index 8e0b59fa3..1693542c9 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -4990,7 +4990,7 @@ namespace Game.Spells if (!GetSpellInfo().HasAttribute(SpellAttr4.FixedDamage)) { if (GetSpellEffectInfo().IsTargetingArea() || GetSpellEffectInfo().IsAreaAuraEffect() || GetSpellEffectInfo().Effect == SpellEffectName.PersistentAreaAura) - damage = (uint)target.CalculateAOEAvoidance((int)damage, (uint)m_spellInfo.SchoolMask, caster); + damage = (uint)target.CalculateAOEAvoidance((int)damage, (uint)m_spellInfo.SchoolMask, GetBase().GetCastItemGUID()); } int dmg = (int)damage; @@ -5074,7 +5074,7 @@ namespace Game.Spells if (!GetSpellInfo().HasAttribute(SpellAttr4.FixedDamage)) { if (GetSpellEffectInfo().IsTargetingArea() || GetSpellEffectInfo().IsAreaAuraEffect() || GetSpellEffectInfo().Effect == SpellEffectName.PersistentAreaAura) - damage = (uint)target.CalculateAOEAvoidance((int)damage, (uint)m_spellInfo.SchoolMask, caster); + damage = (uint)target.CalculateAOEAvoidance((int)damage, (uint)m_spellInfo.SchoolMask, GetBase().GetCastItemGUID()); } int dmg = (int)damage; diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index b37431a54..4b2b814e4 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -6865,7 +6865,7 @@ namespace Game.Spells { if (effect.IsTargetingArea() || effect.IsAreaAuraEffect() || effect.IsEffect(SpellEffectName.PersistentAreaAura)) { - m_damage = unit.CalculateAOEAvoidance(m_damage, (uint)m_spellInfo.SchoolMask, m_caster); + m_damage = unit.CalculateAOEAvoidance(m_damage, (uint)m_spellInfo.SchoolMask, m_caster.GetGUID()); if (m_caster.IsPlayer()) {