From 1bf24273d286c7a9d6e158d639d2d624e059d15e Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Sun, 12 Feb 2023 23:16:39 -0500 Subject: [PATCH] [Quest API] (Performance) Check event exists before export and execute EVENT_TICK (#2919) # Notes - Optionally parse this event instead of always doing so. --- zone/npc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zone/npc.cpp b/zone/npc.cpp index 2b3b1d879..c65d86dc3 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -898,7 +898,10 @@ bool NPC::Process() } if (tic_timer.Check()) { - parse->EventNPC(EVENT_TICK, this, nullptr, "", 0); + if (parse->HasQuestSub(GetNPCTypeID(), EVENT_TICK)) { + parse->EventNPC(EVENT_TICK, this, nullptr, "", 0); + } + BuffProcess(); if (currently_fleeing) {