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:
@@ -112,7 +112,7 @@ namespace Game.Scripting
|
||||
uint mask = 0;
|
||||
if (_effIndex == SpellConst.EffectAll || _effIndex == SpellConst.EffectFirstFound)
|
||||
{
|
||||
for (byte i = 0; i < SpellConst.MaxEffects; ++i)
|
||||
for (byte i = 0; i < spellInfo.GetEffects().Count; ++i)
|
||||
{
|
||||
if (_effIndex == SpellConst.EffectFirstFound && mask != 0)
|
||||
return mask;
|
||||
|
||||
Reference in New Issue
Block a user