mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
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:
@@ -89,6 +89,14 @@ void QuestParserCollection::ReloadQuests(bool reset_timers) {
|
||||
}
|
||||
}
|
||||
|
||||
void QuestParserCollection::RemoveEncounter(const std::string name) {
|
||||
auto iter = _load_precedence.begin();
|
||||
while(iter != _load_precedence.end()) {
|
||||
(*iter)->RemoveEncounter(name);
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
bool QuestParserCollection::HasQuestSub(uint32 npcid, QuestEventID evt) {
|
||||
return HasQuestSubLocal(npcid, evt) || HasQuestSubGlobal(evt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user