[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>
This commit is contained in:
Michael 2022-11-29 23:57:19 -05:00 committed by GitHub
parent 02c0a8fa7f
commit 1d302f512e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.");
}
}