mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 11:28:25 +00:00
[Bots] Add Quest API Support for Limits. (#2522)
* [Bots] Add Quest API Support for Limits. # Perl - Add `$client->GetBotCreationLimit()` to Perl. - Add `$client->GetBotCreationLimit(class_id)` to Perl. - Add `$client->GetBotRequiredLevel()` to Perl. - Add `$client->GetBotRequiredLevel(class_id)` to Perl. - Add `$client->GetBotSpawnLimit()` to Perl. - Add `$client->GetBotSpawnLimit(class_id)` to Perl. - Add `$client->SetBotCreationLimit(creation_limit)` to Perl. - Add `$client->SetBotCreationLimit(creation_limit, class_id)` to Perl. - Add `$client->SetBotRequiredLevel(required_level)` to Perl. - Add `$client->SetBotRequiredLevel(required_level, class_id)` to Perl. - Add `$client->SetBotSpawnLimit(spawn_limit)` to Perl. - Add `$client->SetBotSpawnLimit(spawn_limit, class_id)` to Perl. - Add `$entity_list->GetBotListByCharacterID(character_id, class_id)` to Perl. # Lua - Add `client:GetBotCreationLimit()` to Lua. - Add `client:GetBotCreationLimit(class_id)` to Lua. - Add `client:GetBotRequiredLevel()` to Lua. - Add `client:GetBotRequiredLevel(class_id)` to Lua. - Add `client:GetBotSpawnLimit()` to Lua. - Add `client:GetBotSpawnLimit(class_id)` to Lua. - Add `client:SetBotCreationLimit(creation_limit)` to Lua. - Add `client:SetBotCreationLimit(creation_limit, class_id)` to Lua. - Add `client:SetBotRequiredLevel(required_level)` to Lua. - Add `client:SetBotRequiredLevel(required_level, class_id)` to Lua. - Add `client:SetBotSpawnLimit(spawn_limit)` to Lua. - Add `client:SetBotSpawnLimit(spawn_limit, class_id)` to Lua. - Add `entity_list:GetBotListByCharacterID(character_id, class_id)` to Lua. # Notes - Allows operators to set creation and spawn limits based on class, as well as required level. - Using the class-inspecific methods sets the global limit or required level. - Global limits are checked prior to class-specific limits and if they are not met, creation or spawn is disallowed. - Modified preexisting Quest API to make use of this new stuff under the hood. * Update bot_command.cpp * Add client bot file.
This commit is contained in:
+14
-2
@@ -1065,11 +1065,21 @@ int Perl__createbotcount()
|
||||
return quest_manager.createbotcount();
|
||||
}
|
||||
|
||||
int Perl__createbotcount(uint8 class_id)
|
||||
{
|
||||
return quest_manager.createbotcount(class_id);
|
||||
}
|
||||
|
||||
int Perl__spawnbotcount()
|
||||
{
|
||||
return quest_manager.spawnbotcount();
|
||||
}
|
||||
|
||||
int Perl__spawnbotcount(uint8 class_id)
|
||||
{
|
||||
return quest_manager.spawnbotcount(class_id);
|
||||
}
|
||||
|
||||
bool Perl__botquest()
|
||||
{
|
||||
return quest_manager.botquest();
|
||||
@@ -3847,8 +3857,10 @@ void perl_register_quest()
|
||||
|
||||
#ifdef BOTS
|
||||
package.add("botquest", &Perl__botquest);
|
||||
package.add("spawnbotcount", &Perl__spawnbotcount);
|
||||
package.add("createbotcount", &Perl__createbotcount);
|
||||
package.add("spawnbotcount", (int(*)())&Perl__spawnbotcount);
|
||||
package.add("spawnbotcount", (int(*)(uint8))&Perl__spawnbotcount);
|
||||
package.add("createbotcount", (int(*)())&Perl__createbotcount);
|
||||
package.add("createbotcount", (int(*)(uint8))&Perl__createbotcount);
|
||||
package.add("createBot", &Perl__createBot);
|
||||
#endif //BOTS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user