Core/Spells: Replace MAX_SPELL_EFFECTS loop limits with correct upper bound depending on how many effects the spell has

Port From (https://github.com/TrinityCore/TrinityCore/commit/561b122364525deaee815ad900a78f1323c37776)
This commit is contained in:
Hondacrx
2025-06-03 21:17:25 -04:00
parent c496da9da0
commit 52952deee3
5 changed files with 18 additions and 23 deletions
+1 -1
View File
@@ -5167,7 +5167,7 @@ namespace Game.Spells
{
CastSpellExtraArgs args = new(this);
args.SetTriggerFlags(TriggerCastFlags.FullMask & ~(TriggerCastFlags.IgnorePowerCost | TriggerCastFlags.IgnoreReagentCost));
for (int i = 0; i < SpellConst.MaxEffects; ++i)
for (int i = 0; i < triggeredSpellInfo.GetEffects().Count; ++i)
args.AddSpellMod(SpellValueMod.BasePoint0 + i, GetAmount());
triggerCaster.CastSpell(target, triggerSpellId, args);