[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
@@ -43,9 +43,7 @@
#include "water_map.h"
#include "npc_scale_manager.h"
#ifdef BOTS
#include "bot.h"
#endif
#include <cctype>
#include <stdio.h>
@@ -320,11 +318,9 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi
if (!EQ::ValueWithin(npc_type_data->npc_spells_id, EQ::constants::BotSpellIDs::Warrior, EQ::constants::BotSpellIDs::Berserker)) {
AI_Init();
AI_Start();
#ifdef BOTS
} else {
CastToBot()->AI_Bot_Init();
CastToBot()->AI_Bot_Start();
#endif
}
d_melee_texture1 = npc_type_data->d_melee_texture1;
@@ -1120,11 +1116,9 @@ void NPC::Depop(bool start_spawn_timer) {
if (IsNPC()) {
parse->EventNPC(EVENT_DESPAWN, this, nullptr, "", 0);
DispatchZoneControllerEvent(EVENT_DESPAWN_ZONE, this, "", 0, nullptr);
#ifdef BOTS
} else if (IsBot()) {
parse->EventBot(EVENT_DESPAWN, CastToBot(), nullptr, "", 0);
DispatchZoneControllerEvent(EVENT_DESPAWN_ZONE, this, "", 0, nullptr);
#endif
}
p_depop = true;