[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
-8
View File
@@ -32,9 +32,7 @@
#include "fastmath.h"
#include "../common/data_verification.h"
#ifdef BOTS
#include "bot.h"
#endif
#include <glm/gtx/projection.hpp>
#include <algorithm>
@@ -1119,14 +1117,12 @@ void Mob::AI_Process() {
return;
}
#ifdef BOTS
if (IsPet() && GetOwner() && GetOwner()->IsBot() && target == GetOwner())
{
// this blocks all pet attacks against owner..bot pet test (copied above check)
RemoveFromHateList(this);
return;
}
#endif //BOTS
if (DivineAura())
return;
@@ -1934,11 +1930,9 @@ void Mob::AI_Event_Engaged(Mob *attacker, bool yell_for_help)
}
}
#ifdef BOTS
if (IsBot()) {
parse->EventBot(EVENT_COMBAT, CastToBot(), attacker, "1", 0);
}
#endif
}
// Note: Hate list may not be actually clear until after this function call completes
@@ -1974,10 +1968,8 @@ void Mob::AI_Event_NoLongerEngaged() {
CastToNPC()->SetCombatEvent(false);
}
}
#ifdef BOTS
} else if (IsBot()) {
parse->EventBot(EVENT_COMBAT, CastToBot(), nullptr, "0", 0);
#endif
}
}