mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Quest API] Add EVENT_BOT_CREATE to Perl/Lua (#2713)
* [Quest API] Add EVENT_BOT_CREATE to Perl/Lua # Perl - Add `EVENT_BOT_CREATE`. - Exports `$bot_id`, `$bot_name`, `$bot_class`, `$bot_race`, and `$bot_gender`. # Lua - Add `event_bot_create`. - Exports `e.bot_id`, `e.bot_name`, `e.bot_class`, `e.bot_race`, and `e.bot_gender`.
This commit is contained in:
@@ -9907,6 +9907,18 @@ uint32 helper_bot_create(Client *bot_owner, std::string bot_name, uint8 bot_clas
|
||||
);
|
||||
|
||||
bot_id = my_bot->GetBotID();
|
||||
|
||||
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);
|
||||
|
||||
safe_delete(my_bot);
|
||||
|
||||
return bot_id;
|
||||
|
||||
Reference in New Issue
Block a user