diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-01-09 17:48:41 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2025-01-09 17:48:41 +0100 |
commit | 561b122364525deaee815ad900a78f1323c37776 (patch) | |
tree | 162a91f6740c225fa9970ee3aa477af559c352d5 /src/server/game/Spells/SpellScript.cpp | |
parent | 97f58a59f13fcf3a8a6675215674fb89b1a136ca (diff) |
Core/Spells: Replace MAX_SPELL_EFFECTS loop limits with correct upper bound depending on how many effects the spell has
Diffstat (limited to 'src/server/game/Spells/SpellScript.cpp')
-rw-r--r-- | src/server/game/Spells/SpellScript.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 79087620742..f8eb76085ab 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -118,7 +118,7 @@ uint32 SpellScriptBase::EffectHook::GetAffectedEffectsMask(SpellInfo const* spel uint32 mask = 0; if (_effIndex == EFFECT_ALL || _effIndex == EFFECT_FIRST_FOUND) { - for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + for (uint8 i = 0; i < spellInfo->GetEffects().size(); ++i) { if (_effIndex == EFFECT_FIRST_FOUND && mask) return mask; |