diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index fc9cd51a3..6a50ab142 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -5963,7 +5963,8 @@ bool Mob::TryDeathSave() { bool Mob::AffectedBySpellExcludingSlot(int slot, int effect) { - for (int i = 0; i <= EFFECT_COUNT; i++) + int buff_count = GetMaxTotalSlots(); + for (int i = 0; i < buff_count; i++) { if (i == slot) continue;