From be459de555336fbfd2d2f075ab450aae1f83c9d6 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 27 Jul 2015 01:19:45 -0400 Subject: [PATCH] Fix issue with adding spells via quest to an empty list --- zone/mob_ai.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index c8654849a..b9394f9a3 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -2495,6 +2495,10 @@ void NPC::AddSpellToNPCList(int16 iPriority, int16 iSpellID, uint16 iType, t.resist_adjust = iResistAdjust; AIspells.push_back(t); + + // If we're going from an empty list, we need to start the timer + if (AIspells.size() == 1) + AIautocastspell_timer->Start(RandomTimer(0, 15000), false); } void NPC::RemoveSpellFromNPCList(int16 spell_id)