fix spell crash

This commit is contained in:
luis
2026-03-07 05:51:28 -03:00
parent 30be246924
commit af5f496d97
@@ -755,6 +755,10 @@ void ConsumableManager::UpdateBuffState()
{
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
// CRITICAL FIX: Check if effect exists before accessing
if (i >= spellInfo->GetEffects().size())
break;
SpellEffectInfo const& effect = spellInfo->GetEffect(SpellEffIndex(i));
if (effect.ApplyAuraName == SPELL_AURA_MOD_STAT ||
effect.ApplyAuraName == SPELL_AURA_MOD_RATING)