[Quest API] (Performance) Check event exists before export and execute EVENT_TIMER (#2903)

# Notes
- Parse this event optionally instead of always doing so.
This commit is contained in:
Alex King authored and GitHub committed 2023-02-12 22:33:33 -06:00
1 parent 71b2bf6a64
commit fd0764d4cb
2 files changed
+17 -8

No files matched your search

+6 -2
View File
@@ -8161,7 +8161,9 @@ void Client::TryItemTimer(int slot)
auto it_iter = item_timers.begin();
while(it_iter != item_timers.end()) {
if(it_iter->second.Check()) {
parse->EventItem(EVENT_TIMER, this, inst, nullptr, it_iter->first, 0);
if (parse->ItemHasQuestSub(inst, EVENT_TIMER)) {
parse->EventItem(EVENT_TIMER, this, inst, nullptr, it_iter->first, 0);
}
}
++it_iter;
}
@@ -8181,7 +8183,9 @@ void Client::TryItemTimer(int slot)
auto it_iter = item_timers.begin();
while(it_iter != item_timers.end()) {
if(it_iter->second.Check()) {
parse->EventItem(EVENT_TIMER, this, a_inst, nullptr, it_iter->first, 0);
if (parse->ItemHasQuestSub(a_inst, EVENT_TIMER)) {
parse->EventItem(EVENT_TIMER, this, a_inst, nullptr, it_iter->first, 0);
}
}
++it_iter;
}