fix(Core/SpellInfo): Disallow damage scaling trigger spells to get scaled twice. (#19605)

* Init.

* Deleted the wrong one.

* Add double scaling check.

* Whitespace.
This commit is contained in:
Benjamin Jackson
2024-08-13 10:53:14 -04:00
committed by GitHub
parent 14a7840578
commit 35b551c0da

View File

@@ -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();