[Quest API] (Performance) Check event exists before export and execute EVENT_RESPAWN (#2917)

# Notes
- Optionally parse this event instead of always doing so.
This commit is contained in:
Alex King 2023-02-12 23:19:23 -05:00 committed by GitHub
parent 2dffc66c6f
commit 604256a223
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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