fix(Core/Spells): implement SPELL_ATTR7_TREAT_AS_NPC_AOE (#21787)

Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
Jelle Meeus
2025-03-28 11:18:40 +01:00
committed by GitHub
parent e6615c8b3a
commit 094c15a323
8 changed files with 24 additions and 9 deletions

View File

@@ -8352,7 +8352,8 @@ void Spell::DoAllEffectOnLaunchTarget(TargetInfo& targetInfo, float* multiplier)
// Xinef: Area Auras, AoE Targetting spells AND Chain Target spells (cleave etc.)
if (m_spellInfo->Effects[i].IsAreaAuraEffect() || m_spellInfo->Effects[i].IsTargetingArea() || (m_spellInfo->Effects[i].ChainTarget > 1 && m_spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MAGIC))
{
m_damage = unit->CalculateAOEDamageReduction(m_damage, m_spellInfo->SchoolMask, m_caster);
bool npcCaster = (m_caster && !m_caster->IsControlledByPlayer()) || GetSpellInfo()->HasAttribute(SPELL_ATTR7_TREAT_AS_NPC_AOE);
m_damage = unit->CalculateAOEDamageReduction(m_damage, m_spellInfo->SchoolMask, npcCaster);
if (m_caster->IsPlayer())
{
uint32 targetAmount = m_UniqueTargetInfo.size();