mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Quest API] (Performance) Check event exists before export and execute EVENT_BOT_CREATE (#2886)
* [Quest API] Optionally parse EVENT_BOT_CREATE - Optionally parse this event instead of always doing so. * Cleanup * Cleanup
This commit is contained in:
+11
-9
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user