mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +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:
+15
-17
@@ -343,9 +343,9 @@ bool Group::AddMember(Mob* newmember, const char *NewMemberName, uint32 Characte
|
||||
|
||||
safe_delete(outapp);
|
||||
|
||||
#ifdef BOTS
|
||||
Bot::UpdateGroupCastingRoles(this);
|
||||
#endif
|
||||
if (RuleB(Bots, Enabled)) {
|
||||
Bot::UpdateGroupCastingRoles(this);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -524,9 +524,9 @@ bool Group::UpdatePlayer(Mob* update){
|
||||
if (update->IsClient() && !mentoree && mentoree_name.length() && !mentoree_name.compare(update->GetName()))
|
||||
mentoree = update->CastToClient();
|
||||
|
||||
#ifdef BOTS
|
||||
Bot::UpdateGroupCastingRoles(this);
|
||||
#endif
|
||||
if (RuleB(Bots, Enabled)) {
|
||||
Bot::UpdateGroupCastingRoles(this);
|
||||
}
|
||||
|
||||
return updateSuccess;
|
||||
}
|
||||
@@ -561,9 +561,9 @@ void Group::MemberZoned(Mob* removemob) {
|
||||
if (removemob->IsClient() && removemob == mentoree)
|
||||
mentoree = nullptr;
|
||||
|
||||
#ifdef BOTS
|
||||
Bot::UpdateGroupCastingRoles(this);
|
||||
#endif
|
||||
if (RuleB(Bots, Enabled)) {
|
||||
Bot::UpdateGroupCastingRoles(this);
|
||||
}
|
||||
}
|
||||
|
||||
void Group::SendGroupJoinOOZ(Mob* NewMember) {
|
||||
@@ -782,9 +782,9 @@ bool Group::DelMember(Mob* oldmember, bool ignoresender)
|
||||
ClearAllNPCMarks();
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
Bot::UpdateGroupCastingRoles(this);
|
||||
#endif
|
||||
if (RuleB(Bots, Enabled)) {
|
||||
Bot::UpdateGroupCastingRoles(this);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -895,9 +895,9 @@ uint32 Group::GetTotalGroupDamage(Mob* other) {
|
||||
}
|
||||
|
||||
void Group::DisbandGroup(bool joinraid) {
|
||||
#ifdef BOTS
|
||||
Bot::UpdateGroupCastingRoles(this, true);
|
||||
#endif
|
||||
if (RuleB(Bots, Enabled)) {
|
||||
Bot::UpdateGroupCastingRoles(this, true);
|
||||
}
|
||||
|
||||
auto outapp = new EQApplicationPacket(OP_GroupUpdate, sizeof(GroupUpdate_Struct));
|
||||
|
||||
@@ -990,7 +990,6 @@ void Group::GetClientList(std::list<Client*>& client_list, bool clear_list)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
void Group::GetBotList(std::list<Bot*>& bot_list, bool clear_list)
|
||||
{
|
||||
if (clear_list)
|
||||
@@ -1001,7 +1000,6 @@ void Group::GetBotList(std::list<Bot*>& bot_list, bool clear_list)
|
||||
bot_list.push_back(bot_iter->CastToBot());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
bool Group::Process() {
|
||||
if(disbandcheck && !GroupCount())
|
||||
|
||||
Reference in New Issue
Block a user