mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Spells: Replace MAX_SPELL_EFFECTS loop limits with correct upper bound depending on how many effects the spell has
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user