From 35b551c0da15e23e8d63f8f4e3bf4061a2e57f9f Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Tue, 13 Aug 2024 10:53:14 -0400 Subject: [PATCH] fix(Core/SpellInfo): Disallow damage scaling trigger spells to get scaled twice. (#19605) * Init. * Deleted the wrong one. * Add double scaling check. * Whitespace. --- src/server/game/Spells/SpellInfo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 42455c958..5c30b040d 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -500,6 +500,9 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const break; } + if ((sSpellMgr->GetSpellInfo(_spellInfo->Effects[_effIndex].TriggerSpell) && sSpellMgr->GetSpellInfo(_spellInfo->Effects[_effIndex].TriggerSpell)->HasAttribute(SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL)) && _spellInfo->HasAttribute(SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL)) + canEffectScale = false; + if (canEffectScale) { CreatureTemplate const* cInfo = caster->ToCreature()->GetCreatureTemplate();