From f884d8d7388f000c8db024e63bf2311d4ddb30e5 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 2 Nov 2015 21:33:36 -0600 Subject: [PATCH] Fix an issue where during a depop cycle and NPC's are engaged by wiping hatelist before issuing NPC depop --- zone/entity.cpp | 2 ++ zone/mob_ai.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/zone/entity.cpp b/zone/entity.cpp index c427d82d7..643b27177 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -2438,6 +2438,8 @@ void EntityList::Depop(bool StartSpawnTimer) if (pnpc->IsFindable()) UpdateFindableNPCState(pnpc, true); + pnpc->WipeHateList(); + pnpc->Depop(StartSpawnTimer); } } diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 0a2219428..6bde54d0a 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1867,6 +1867,9 @@ bool NPC::AI_IdleCastCheck() { //if we didnt cast any spells, our autocast timer just resets to the //last duration it was set to... try to put up a more reasonable timer... AIautocastspell_timer->Start(RandomTimer(AISpellVar.idle_no_sp_recast_min, AISpellVar.idle_no_sp_recast_max), false); + + Log.Out(Logs::Moderate, Logs::Spells, "Triggering AI_IdleCastCheck :: Mob %s - Min : %u Max : %u", this->GetCleanName(), AISpellVar.idle_no_sp_recast_min, AISpellVar.idle_no_sp_recast_max); + } //else, spell casting finishing will reset the timer. } //else, spell casting finishing will reset the timer. return(true);