Fix an issue where during a depop cycle and NPC's are engaged by wiping hatelist before issuing NPC depop

This commit is contained in:
Akkadius 2015-11-02 21:33:36 -06:00
parent 21acd79acf
commit f884d8d738
2 changed files with 5 additions and 0 deletions

View File

@ -2438,6 +2438,8 @@ void EntityList::Depop(bool StartSpawnTimer)
if (pnpc->IsFindable()) if (pnpc->IsFindable())
UpdateFindableNPCState(pnpc, true); UpdateFindableNPCState(pnpc, true);
pnpc->WipeHateList();
pnpc->Depop(StartSpawnTimer); pnpc->Depop(StartSpawnTimer);
} }
} }

View File

@ -1867,6 +1867,9 @@ bool NPC::AI_IdleCastCheck() {
//if we didnt cast any spells, our autocast timer just resets to the //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... //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); 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.
} //else, spell casting finishing will reset the timer. } //else, spell casting finishing will reset the timer.
return(true); return(true);