mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 00:18:18 +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:
@@ -2426,6 +2426,17 @@ bool QuestManager::createBot(const char *name, const char *lastname, uint8 level
|
||||
new_bot->GetBotID()
|
||||
).c_str()
|
||||
);
|
||||
|
||||
const auto export_string = fmt::format(
|
||||
"{} {} {} {} {}",
|
||||
name,
|
||||
new_bot->GetBotID(),
|
||||
race,
|
||||
botclass,
|
||||
gender
|
||||
);
|
||||
|
||||
parse->EventPlayer(EVENT_BOT_CREATE, initiator, export_string, 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user