From 604256a2232ccb4c02161d7db7226c6a4bdfc9ed Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Sun, 12 Feb 2023 23:19:23 -0500 Subject: [PATCH] [Quest API] (Performance) Check event exists before export and execute EVENT_RESPAWN (#2917) # Notes - Optionally parse this event instead of always doing so. --- zone/client_process.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 7f6ed7302..21d6f80a0 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -2156,8 +2156,9 @@ void Client::HandleRespawnFromHover(uint32 Option) } //After they've respawned into the same zone, trigger EVENT_RESPAWN - std::string export_string = fmt::format("{}", Option); - parse->EventPlayer(EVENT_RESPAWN, this, export_string, is_rez ? 1 : 0); + if (parse->PlayerHasQuestSub(EVENT_RESPAWN)) { + parse->EventPlayer(EVENT_RESPAWN, this, std::to_string(Option), is_rez ? 1 : 0); + } //Pop Rez option from the respawn options list; //easiest way to make sure it stays at the end and