mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 00:18:18 +00:00
[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:
+9
-12
@@ -27,9 +27,7 @@
|
||||
#include "entity.h"
|
||||
#include "mob.h"
|
||||
|
||||
#ifdef BOTS
|
||||
#include "bot.h"
|
||||
#endif
|
||||
|
||||
#include "map.h"
|
||||
#include "water_map.h"
|
||||
@@ -818,14 +816,15 @@ type', in which case, the answer is yes.
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
// this is HIGHLY inefficient
|
||||
bool HasRuleDefined = false;
|
||||
bool IsBotAttackAllowed = false;
|
||||
IsBotAttackAllowed = Bot::IsBotAttackAllowed(mob1, mob2, HasRuleDefined);
|
||||
if(HasRuleDefined)
|
||||
return IsBotAttackAllowed;
|
||||
#endif //BOTS
|
||||
if (RuleB(Bots, Enabled)) {
|
||||
// this is HIGHLY inefficient
|
||||
bool HasRuleDefined = false;
|
||||
bool IsBotAttackAllowed = false;
|
||||
IsBotAttackAllowed = Bot::IsBotAttackAllowed(mob1, mob2, HasRuleDefined);
|
||||
if (HasRuleDefined) {
|
||||
return IsBotAttackAllowed;
|
||||
}
|
||||
}
|
||||
|
||||
// we fell through, now we swap the 2 mobs and run through again once more
|
||||
tempmob = mob1;
|
||||
@@ -905,10 +904,8 @@ bool Mob::IsBeneficialAllowed(Mob *target)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#ifdef BOTS
|
||||
else if(mob2->IsBot())
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
else if(_NPC(mob1))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user