[Quest API] Add GetTimers() and GetPausedTimers() to Perl/Lua (#4965)

* [Quest API] Add GetTimers() and GetPausedTimers() to Perl/Lua

* Push
This commit is contained in:
Alex King
2025-08-02 20:17:56 -04:00
committed by GitHub
parent 41f3d7ff31
commit 0a1df5bbb6
12 changed files with 256 additions and 2 deletions
+30
View File
@@ -4667,3 +4667,33 @@ bool QuestManager::handin(std::map<std::string, uint32> required) {
return owner->CastToNPC()->CheckHandin(initiator, {}, required, {});
}
std::vector<std::string> QuestManager::GetPausedTimers(Mob* m)
{
std::vector<std::string> v;
if (m && !PTimerList.empty()) {
for (auto e = PTimerList.begin(); e != PTimerList.end(); e++) {
if (e->owner == m) {
v.emplace_back(e->name);
}
}
}
return v;
}
std::vector<std::string> QuestManager::GetTimers(Mob* m)
{
std::vector<std::string> v;
if (m && !QTimerList.empty()) {
for (auto e = QTimerList.begin(); e != QTimerList.end(); e++) {
if (e->mob == m) {
v.emplace_back(e->name);
}
}
}
return v;
}