[Bot] Add GetBotOwnerByBotID Method (#2715)

* [Bot] Add GetBotOwnerByBotID Method

* Cleanup.

* Remove EVENT_DESPAWN exports in Lua.

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
Aeadoin
2023-01-10 21:14:42 -05:00
committed by GitHub
parent 0d23ffe5e5
commit 8fe02b5ed1
11 changed files with 107 additions and 10 deletions
+12
View File
@@ -406,6 +406,16 @@ Bot* Perl_EntityList_GetBotByName(EntityList* self, std::string bot_name) // @ca
return self->GetBotByBotName(bot_name);
}
Client* Perl_EntityList_GetBotOwnerByBotEntityID(EntityList* self, uint32_t entity_id) // @categories Script Utility, Bot
{
return self->GetBotOwnerByBotEntityID(entity_id);
}
Client* Perl_EntityList_GetBotOwnerByBotID(EntityList* self, uint32_t bot_id) // @categories Script Utility, Bot
{
return self->GetBotOwnerByBotID(bot_id);
}
perl::array Perl_EntityList_GetBotList(EntityList* self) // @categories Script Utility, Bot
{
perl::array result;
@@ -618,6 +628,8 @@ void perl_register_entitylist()
package.add("GetBotByID", &Perl_EntityList_GetBotByID);
package.add("GetBotByName", &Perl_EntityList_GetBotByName);
package.add("GetBotList", &Perl_EntityList_GetBotList);
package.add("GetBotOwnerByBotEntityID", (Client*(*)(EntityList*, uint32))&Perl_EntityList_GetBotOwnerByBotEntityID);
package.add("GetBotOwnerByBotID", (Client*(*)(EntityList*, uint32))&Perl_EntityList_GetBotOwnerByBotID);
package.add("GetBotListByCharacterID", (perl::array(*)(EntityList*, uint32))&Perl_EntityList_GetBotListByCharacterID);
package.add("GetBotListByCharacterID", (perl::array(*)(EntityList*, uint32, uint8))&Perl_EntityList_GetBotListByCharacterID);
package.add("GetBotListByClientName", (perl::array(*)(EntityList*, std::string))&Perl_EntityList_GetBotListByClientName);