[Quest API] Implement eq.handin() and quest::handin() (#4718)

* [Quest API] Implement eq.handin() and quest::handin()

* Fix MQ using new API style
This commit is contained in:
Chris Miles
2025-02-28 15:22:39 -06:00
committed by GitHub
parent 875df8e64a
commit 425d24c1f4
6 changed files with 97 additions and 4 deletions
+15
View File
@@ -4606,3 +4606,18 @@ void QuestManager::SpawnGrid(uint32 npc_id, glm::vec4 position, float spacing, u
}
}
}
bool QuestManager::handin(std::map<std::string, uint32> required) {
QuestManagerCurrentQuestVars();
if (!owner || !initiator) {
LogQuests("QuestManager::handin called with nullptr owner. Probably syntax error in quest file");
return false;
}
if (owner && !owner->IsNPC()) {
LogQuests("QuestManager::handin called with non-NPC owner. Probably syntax error in quest file");
return false;
}
return owner->CastToNPC()->CheckHandin(initiator, {}, required, {});
}