[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
2023-02-12 23:33:33 -05:00
committed by GitHub
parent 71b2bf6a64
commit fd0764d4cb
2 changed files with 17 additions and 8 deletions
+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;
}