mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +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:
@@ -383,19 +383,10 @@ Mob *HateList::GetEntWithMostHateOnList(Mob *center, Mob *skip, bool skip_mezzed
|
||||
|
||||
int64 current_hate = cur->stored_hate_amount;
|
||||
|
||||
#ifdef BOTS
|
||||
if (cur->entity_on_hatelist->IsClient() || cur->entity_on_hatelist->IsBot()){
|
||||
|
||||
if (cur->entity_on_hatelist->IsClient() && cur->entity_on_hatelist->CastToClient()->IsSitting()){
|
||||
aggro_mod += RuleI(Aggro, SittingAggroMod);
|
||||
}
|
||||
#else
|
||||
if (cur->entity_on_hatelist->IsClient()){
|
||||
|
||||
if (cur->entity_on_hatelist->CastToClient()->IsSitting()){
|
||||
aggro_mod += RuleI(Aggro, SittingAggroMod);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (center){
|
||||
if (center->GetTarget() == cur->entity_on_hatelist)
|
||||
@@ -445,14 +436,12 @@ Mob *HateList::GetEntWithMostHateOnList(Mob *center, Mob *skip, bool skip_mezzed
|
||||
|
||||
if (top_client_type_in_range != nullptr && top_hate != nullptr) {
|
||||
bool isTopClientType = top_hate->IsClient();
|
||||
#ifdef BOTS
|
||||
if (!isTopClientType) {
|
||||
if (top_hate->IsBot()) {
|
||||
isTopClientType = true;
|
||||
top_client_type_in_range = top_hate;
|
||||
}
|
||||
}
|
||||
#endif //BOTS
|
||||
|
||||
if (!isTopClientType) {
|
||||
if (top_hate->IsMerc()) {
|
||||
@@ -850,7 +839,6 @@ void HateList::RemoveStaleEntries(int time_ms, float dist)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
Bot* HateList::GetRandomBotOnHateList(bool skip_mezzed)
|
||||
{
|
||||
int count = list.size();
|
||||
@@ -899,7 +887,6 @@ Bot* HateList::GetRandomBotOnHateList(bool skip_mezzed)
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
Client* HateList::GetRandomClientOnHateList(bool skip_mezzed)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user