From b892fc20c0dfea7285ce537fb7b06e1a6b667fa1 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 1 Jun 2022 15:42:51 -0400 Subject: [PATCH] Core/Spells: Implemented SPELL_ATTR5_TREAT_AS_AREA_EFFECT Port From (https://github.com/TrinityCore/TrinityCore/commit/2ff29ce1e8242958f9f4c89e351d27d32063c678) --- Source/Framework/Constants/Spells/SpellConst.cs | 2 +- Source/Game/Spells/Auras/AuraEffect.cs | 4 ++-- Source/Game/Spells/Spell.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index 1e05872c8..2b6d2a5ab 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1772,7 +1772,7 @@ namespace Framework.Constants MeleeChainTargeting = 0x1000, // Melee Chain Targeting SpellHasteAffectsPeriodic = 0x2000, // Spell Haste Affects Periodic NotAvailableWhileCharmed = 0x4000, // Not Available While Charmed - TreatAsAreaEffect = 0x8000, /*Nyi*/ // Treat As Area Effect + TreatAsAreaEffect = 0x8000, // Treat As Area Effect AuraAffectsNotJustReqEquippedItem = 0x10000, // Aura Affects Not Just Req. Equipped Item AllowWhileFleeing = 0x20000, // Allow While Fleeing AllowWhileConfused = 0x40000, // Allow While Confused diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index 718b16ab2..a0fa66581 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -5025,7 +5025,7 @@ namespace Game.Spells if (!GetSpellInfo().HasAttribute(SpellAttr4.IgnoreDamageTakenModifiers)) { - if (GetSpellEffectInfo().IsTargetingArea() || GetSpellEffectInfo().IsAreaAuraEffect() || GetSpellEffectInfo().IsEffect(SpellEffectName.PersistentAreaAura)) + if (GetSpellEffectInfo().IsTargetingArea() || GetSpellEffectInfo().IsAreaAuraEffect() || GetSpellEffectInfo().IsEffect(SpellEffectName.PersistentAreaAura) || GetSpellInfo().HasAttribute(SpellAttr5.TreatAsAreaEffect)) damage = (uint)target.CalculateAOEAvoidance((int)damage, (uint)m_spellInfo.SchoolMask, GetBase().GetCastItemGUID()); } @@ -5107,7 +5107,7 @@ namespace Game.Spells if (!GetSpellInfo().HasAttribute(SpellAttr4.IgnoreDamageTakenModifiers)) { - if (GetSpellEffectInfo().IsTargetingArea() || GetSpellEffectInfo().IsAreaAuraEffect() || GetSpellEffectInfo().IsEffect(SpellEffectName.PersistentAreaAura)) + if (GetSpellEffectInfo().IsTargetingArea() || GetSpellEffectInfo().IsAreaAuraEffect() || GetSpellEffectInfo().IsEffect(SpellEffectName.PersistentAreaAura) || GetSpellInfo().HasAttribute(SpellAttr5.TreatAsAreaEffect)) damage = (uint)target.CalculateAOEAvoidance((int)damage, (uint)m_spellInfo.SchoolMask, GetBase().GetCastItemGUID()); } diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 9c3001a84..986bbd276 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -7243,7 +7243,7 @@ namespace Game.Spells if (m_originalCaster != null && m_damage > 0) { - if (spellEffectInfo.IsTargetingArea() || spellEffectInfo.IsAreaAuraEffect() || spellEffectInfo.IsEffect(SpellEffectName.PersistentAreaAura)) + if (spellEffectInfo.IsTargetingArea() || spellEffectInfo.IsAreaAuraEffect() || spellEffectInfo.IsEffect(SpellEffectName.PersistentAreaAura) || m_spellInfo.HasAttribute(SpellAttr5.TreatAsAreaEffect)) { m_damage = unit.CalculateAOEAvoidance(m_damage, (uint)m_spellInfo.SchoolMask, m_originalCaster.GetGUID());