diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 58ceef906..e6e2782b8 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -9935,17 +9935,18 @@ uint32 helper_bot_create(Client *bot_owner, std::string bot_name, uint8 bot_clas ); bot_id = my_bot->GetBotID(); + if (parse->PlayerHasQuestSub(EVENT_BOT_CREATE)) { + const auto& export_string = fmt::format( + "{} {} {} {} {}", + bot_name, + bot_id, + bot_race, + bot_class, + bot_gender + ); - const auto export_string = fmt::format( - "{} {} {} {} {}", - bot_name, - bot_id, - bot_race, - bot_class, - bot_gender - ); - - parse->EventPlayer(EVENT_BOT_CREATE, bot_owner, export_string, 0); + parse->EventPlayer(EVENT_BOT_CREATE, bot_owner, export_string, 0); + } safe_delete(my_bot); diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 68ee9c379..d2db20bc2 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -2427,16 +2427,18 @@ bool QuestManager::createBot(const char *name, const char *lastname, uint8 level ).c_str() ); - const auto export_string = fmt::format( - "{} {} {} {} {}", - name, - new_bot->GetBotID(), - race, - botclass, - gender - ); + if (parse->PlayerHasQuestSub(EVENT_BOT_CREATE)) { + const auto& export_string = fmt::format( + "{} {} {} {} {}", + name, + new_bot->GetBotID(), + race, + botclass, + gender + ); - parse->EventPlayer(EVENT_BOT_CREATE, initiator, export_string, 0); + parse->EventPlayer(EVENT_BOT_CREATE, initiator, export_string, 0); + } return true; }