[Bug Fix] Fix an issue where EVENT_TIMER timers would not be cleaned up after zone (#3018)

* [Bug Fix] Dangling client timers fixed.

* Remove all timers from mob in destructor instead of in QuestMgr::Process
This commit is contained in:
Paul Coene
2023-03-03 12:54:14 -05:00
committed by GitHub
parent a97a9a0d1c
commit 748602b04e
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ void QuestManager::Process() {
end = QTimerList.end();
while (cur != end) {
if (cur->Timer_.Enabled() && cur->Timer_.Check()) {
if (cur->mob && entity_list.IsMobInZone(cur->mob)) {
if (cur->mob) {
if (cur->mob->IsNPC()) {
if (parse->HasQuestSub(cur->mob->GetNPCTypeID(), EVENT_TIMER)) {
parse->EventNPC(EVENT_TIMER, cur->mob->CastToNPC(), nullptr, cur->name, 0);