mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-03 01:06:36 +00:00
[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:
@@ -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, {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user