From 85bafecc93281c2f8d7faf790e4bb4cf3efd1818 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 2 Feb 2018 20:18:40 -0500 Subject: [PATCH] Command #repop will clear NPC spell cache now --- zone/zone.cpp | 3 +++ zone/zonedb.h | 1 + 2 files changed, 4 insertions(+) diff --git a/zone/zone.cpp b/zone/zone.cpp index 0e6a50092..8045e0fbf 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1437,6 +1437,9 @@ bool Zone::Depop(bool StartSpawnTimer) { npctable.erase(itr); } + // clear spell cache + database.ClearNPCSpells(); + return true; } diff --git a/zone/zonedb.h b/zone/zonedb.h index 0a13c672e..ec1a1d663 100644 --- a/zone/zonedb.h +++ b/zone/zonedb.h @@ -427,6 +427,7 @@ public: DBnpcspells_Struct* GetNPCSpells(uint32 iDBSpellsID); DBnpcspellseffects_Struct* GetNPCSpellsEffects(uint32 iDBSpellsEffectsID); + void ClearNPCSpells() { npc_spells_cache.clear(); npc_spells_loadtried.clear(); } const NPCType* LoadNPCTypesData(uint32 id, bool bulk_load = false); /* Mercs */