From b3fd9dd88ab865dff02468d82884ed8b6e6b44f1 Mon Sep 17 00:00:00 2001 From: Aeadoin <109764533+Aeadoin@users.noreply.github.com> Date: Mon, 13 Feb 2023 01:15:40 -0500 Subject: [PATCH] [Crash] Fix Crash in FindType (#2867) --- zone/spells.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index 17cfe5ce6..1288fdbc0 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -5892,8 +5892,7 @@ uint16 Mob::GetSpellIDFromSlot(uint8 slot) bool Mob::FindType(uint16 type, bool bOffensive, uint16 threshold) { int buff_count = GetMaxTotalSlots(); for (int i = 0; i < buff_count; i++) { - if (buffs[i].spellid != SPELL_UNKNOWN) { - + if (IsValidSpell(buffs[i].spellid)) { for (int j = 0; j < EFFECT_COUNT; j++) { // adjustments necessary for offensive npc casting behavior if (bOffensive) {