[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
+1 -9
View File
@@ -31,9 +31,7 @@
#include <string>
#ifdef BOTS
#include "bot.h"
#endif
#ifndef WIN32
#include <stdlib.h>
@@ -198,10 +196,8 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
act_power = CastToClient()->GetFocusEffect(focusPetPower, spell_id);//Client only
act_power = CastToClient()->mod_pet_power(act_power, spell_id);
}
#ifdef BOTS
else if (IsBot())
act_power = CastToBot()->GetFocusEffect(focusPetPower, spell_id);
#endif
}
else if (petpower > 0)
act_power = petpower;
@@ -231,11 +227,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
memcpy(npc_type, base, sizeof(NPCType));
// If pet power is set to -1 in the DB, use stat scaling
if ((IsClient()
#ifdef BOTS
|| IsBot()
#endif
) && record.petpower == -1)
if ((IsClient() || IsBot()) && record.petpower == -1)
{
float scale_power = (float)act_power / 100.0f;
if(scale_power > 0)