[Bots] Cleanup and remove preprocessors. (#2757)

* [Bots] Cleanup and remove preprocessors.

- Removes every `#ifdef BOTS` we have and locks bots behind `Bots:AllowBots` rule.
- Bot updates are now done by default similar to regular database updates.
- Modify `CMakeLists.txt`, `.drone.yml`, and `BUILD.md` to match the removal of `EQEMU_ENABLE_BOTS`.

* Cleanup

- Add SQL for enabling bots for servers with bots.
- Add message that tells players/operators bots are disabled.

* Suggested changes.

* Bot injection stuff

* Change SQL to bot SQL.

* Tweaks

* Remove `is_bot`

* Update version.h

* Update main.cpp

* Update database.cpp

* Fix name availability crash

* Remove bots from update script

Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
Alex King
2023-01-20 13:35:33 -05:00
committed by GitHub
parent 1f0b2a8991
commit 3335cacac1
91 changed files with 263 additions and 1150 deletions
-6
View File
@@ -1073,8 +1073,6 @@ void Perl__npcfeature(char* feature, int value)
quest_manager.npcfeature(feature, value);
}
#ifdef BOTS
int Perl__createbotcount()
{
return quest_manager.createbotcount();
@@ -1105,8 +1103,6 @@ bool Perl__createBot(const char* firstname, const char* lastname, int level, int
return quest_manager.createBot(firstname, lastname, level, race_id, class_id, gender_id);
}
#endif //BOTS
void Perl__taskselector(perl::array task_ids)
{
if (task_ids.size() > MAXCHOOSERENTRIES)
@@ -3991,14 +3987,12 @@ void perl_register_quest()
auto package = perl.new_package("quest");
#ifdef BOTS
package.add("botquest", &Perl__botquest);
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
package.add("AssignGroupToInstance", &Perl__AssignGroupToInstance);
package.add("AssignRaidToInstance", &Perl__AssignRaidToInstance);