[Quest API] (Performance) Check event exists before export and execute EVENT_GM_COMMAND (#2890)

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

View File

@ -590,7 +590,9 @@ int command_realdispatch(Client *c, std::string message, bool ignore_status)
return -1;
}
parse->EventPlayer(EVENT_GM_COMMAND, c, message, 0);
if (parse->PlayerHasQuestSub(EVENT_GM_COMMAND)) {
parse->EventPlayer(EVENT_GM_COMMAND, c, message, 0);
}
if (player_event_logs.IsEventEnabled(PlayerEvent::GM_COMMAND) && message != "#help") {
auto e = PlayerEvent::GMCommandEvent{