Fix ReloadQuest on Shutdown crash related to encounters

Basically, EntityList::RemoveAllEncounters is called before ReloadQuests
resulting in stale pointers in the lua_encounters map.

We just have to remove the entry from the map.
This commit is contained in:
Michael Cook (mackal)
2021-02-24 01:03:38 -05:00
parent 66d24ff419
commit 43fade82e5
6 changed files with 24 additions and 0 deletions
+1
View File
@@ -65,6 +65,7 @@ public:
void AddVar(std::string name, std::string val);
void Init();
void ReloadQuests(bool reset_timers = true);
void RemoveEncounter(const std::string name);
bool HasQuestSub(uint32 npcid, QuestEventID evt);
bool PlayerHasQuestSub(QuestEventID evt);