From 1d302f512ec4c9f30c6030a129cdef0ce7245091 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 29 Nov 2022 23:57:19 -0500 Subject: [PATCH] [Quest API] Adjustment to depop_all function. (#2595) * [Quest API] Adjustment to depop_all function. Adjustment to depop_all function to no longer require an owner under all conditions (allows use inside encounters) * More simplification * Update questmgr.cpp Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com> --- zone/questmgr.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 711e75f81..84433c0db 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -869,12 +869,10 @@ void QuestManager::depop_withtimer(int npc_type) { } void QuestManager::depopall(int npc_type) { - QuestManagerCurrentQuestVars(); - if(owner && owner->IsNPC() && (npc_type > 0)) { + if (npc_type) { entity_list.DepopAll(npc_type); - } - else { - LogQuests("QuestManager::depopall called with nullptr owner, non-NPC owner, or invalid NPC Type ID. Probably syntax error in quest file"); + } else { + LogQuests("QuestManager::depopall called with nullptr owner, non-NPC owner, or invalid NPC Type ID. Probably syntax error in quest file."); } }