mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-28 15:57:58 +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:
@@ -2601,12 +2601,10 @@ void Perl_Client_ApplySpell(Client* self, int spell_id, int duration, bool allow
|
||||
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets);
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
void Perl_Client_ApplySpell(Client* self, int spell_id, int duration, bool allow_pets, bool allow_bots)
|
||||
{
|
||||
self->ApplySpell(spell_id, duration, ApplySpellType::Solo, allow_pets, true, allow_bots);
|
||||
}
|
||||
#endif
|
||||
|
||||
void Perl_Client_ApplySpellGroup(Client* self, int spell_id)
|
||||
{
|
||||
@@ -2623,12 +2621,10 @@ void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration, bool
|
||||
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets);
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
void Perl_Client_ApplySpellGroup(Client* self, int spell_id, int duration, bool allow_pets, bool allow_bots)
|
||||
{
|
||||
self->ApplySpell(spell_id, duration, ApplySpellType::Group, allow_pets, true, allow_bots);
|
||||
}
|
||||
#endif
|
||||
|
||||
void Perl_Client_ApplySpellRaid(Client* self, int spell_id)
|
||||
{
|
||||
@@ -2650,12 +2646,10 @@ void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, bool a
|
||||
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
void Perl_Client_ApplySpellRaid(Client* self, int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots)
|
||||
{
|
||||
self->ApplySpell(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
|
||||
}
|
||||
#endif
|
||||
|
||||
void Perl_Client_SetSpellDuration(Client* self, int spell_id)
|
||||
{
|
||||
@@ -2672,12 +2666,10 @@ void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration, bool
|
||||
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets);
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
void Perl_Client_SetSpellDuration(Client* self, int spell_id, int duration, bool allow_pets, bool allow_bots)
|
||||
{
|
||||
self->SetSpellDuration(spell_id, duration, ApplySpellType::Solo, allow_pets, true, allow_bots);
|
||||
}
|
||||
#endif
|
||||
|
||||
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id)
|
||||
{
|
||||
@@ -2694,12 +2686,10 @@ void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration,
|
||||
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets);
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
void Perl_Client_SetSpellDurationGroup(Client* self, int spell_id, int duration, bool allow_pets, bool allow_bots)
|
||||
{
|
||||
self->SetSpellDuration(spell_id, duration, ApplySpellType::Group, allow_pets, true, allow_bots);
|
||||
}
|
||||
#endif
|
||||
|
||||
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id)
|
||||
{
|
||||
@@ -2721,12 +2711,10 @@ void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration,
|
||||
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only);
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
void Perl_Client_SetSpellDurationRaid(Client* self, int spell_id, int duration, bool allow_pets, bool is_raid_group_only, bool allow_bots)
|
||||
{
|
||||
self->SetSpellDuration(spell_id, duration, ApplySpellType::Raid, allow_pets, is_raid_group_only, allow_bots);
|
||||
}
|
||||
#endif
|
||||
|
||||
perl::array Perl_Client_GetPEQZoneFlags(Client* self)
|
||||
{
|
||||
@@ -2814,8 +2802,6 @@ void Perl_Client_SendPath(Client* self, Mob* target)
|
||||
self->SendPath(target);
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
|
||||
int Perl_Client_GetBotRequiredLevel(Client* self)
|
||||
{
|
||||
return self->GetBotRequiredLevel();
|
||||
@@ -2886,8 +2872,6 @@ void Perl_Client_CampAllBots(Client* self, uint8 class_id)
|
||||
self->CampAllBots(class_id);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void perl_register_client()
|
||||
{
|
||||
perl::interpreter perl(PERL_GET_THX);
|
||||
@@ -2922,22 +2906,16 @@ void perl_register_client()
|
||||
package.add("ApplySpell", (void(*)(Client*, int))&Perl_Client_ApplySpell);
|
||||
package.add("ApplySpell", (void(*)(Client*, int, int))&Perl_Client_ApplySpell);
|
||||
package.add("ApplySpell", (void(*)(Client*, int, int, bool))&Perl_Client_ApplySpell);
|
||||
#ifdef BOTS
|
||||
package.add("ApplySpell", (void(*)(Client*, int, int, bool, bool))&Perl_Client_ApplySpell);
|
||||
#endif
|
||||
package.add("ApplySpellGroup", (void(*)(Client*, int))&Perl_Client_ApplySpellGroup);
|
||||
package.add("ApplySpellGroup", (void(*)(Client*, int, int))&Perl_Client_ApplySpellGroup);
|
||||
package.add("ApplySpellGroup", (void(*)(Client*, int, int, bool))&Perl_Client_ApplySpellGroup);
|
||||
#ifdef BOTS
|
||||
package.add("ApplySpellGroup", (void(*)(Client*, int, int, bool, bool))&Perl_Client_ApplySpellGroup);
|
||||
#endif
|
||||
package.add("ApplySpellRaid", (void(*)(Client*, int))&Perl_Client_ApplySpellRaid);
|
||||
package.add("ApplySpellRaid", (void(*)(Client*, int, int))&Perl_Client_ApplySpellRaid);
|
||||
package.add("ApplySpellRaid", (void(*)(Client*, int, int, bool))&Perl_Client_ApplySpellRaid);
|
||||
package.add("ApplySpellRaid", (void(*)(Client*, int, int, bool, bool))&Perl_Client_ApplySpellRaid);
|
||||
#ifdef BOTS
|
||||
package.add("ApplySpellRaid", (void(*)(Client*, int, int, bool, bool, bool))&Perl_Client_ApplySpellRaid);
|
||||
#endif
|
||||
package.add("AssignTask", (void(*)(Client*, int))&Perl_Client_AssignTask);
|
||||
package.add("AssignTask", (void(*)(Client*, int, int))&Perl_Client_AssignTask);
|
||||
package.add("AssignTask", (void(*)(Client*, int, int, bool))&Perl_Client_AssignTask);
|
||||
@@ -2949,10 +2927,8 @@ void perl_register_client()
|
||||
package.add("CalcPriceMod", (float(*)(Client*))&Perl_Client_CalcPriceMod);
|
||||
package.add("CalcPriceMod", (float(*)(Client*, Mob*))&Perl_Client_CalcPriceMod);
|
||||
package.add("CalcPriceMod", (float(*)(Client*, Mob*, bool))&Perl_Client_CalcPriceMod);
|
||||
#ifdef BOTS
|
||||
package.add("CampAllBots", (void(*)(Client*))&Perl_Client_CampAllBots);
|
||||
package.add("CampAllBots", (void(*)(Client*, uint8))&Perl_Client_CampAllBots);
|
||||
#endif
|
||||
package.add("CanEnterZone", (bool(*)(Client*, std::string))&Perl_Client_CanEnterZone);
|
||||
package.add("CanEnterZone", (bool(*)(Client*, std::string, int16))&Perl_Client_CanEnterZone);
|
||||
package.add("CanHaveSkill", &Perl_Client_CanHaveSkill);
|
||||
@@ -3037,18 +3013,12 @@ void perl_register_client()
|
||||
package.add("GetBindZ", (float(*)(Client*, int))&Perl_Client_GetBindZ);
|
||||
package.add("GetBindZoneID", (uint32_t(*)(Client*))&Perl_Client_GetBindZoneID);
|
||||
package.add("GetBindZoneID", (uint32_t(*)(Client*, int))&Perl_Client_GetBindZoneID);
|
||||
|
||||
#ifdef BOTS
|
||||
|
||||
package.add("GetBotCreationLimit", (uint32(*)(Client*))&Perl_Client_GetBotCreationLimit);
|
||||
package.add("GetBotCreationLimit", (uint32(*)(Client*, uint8))&Perl_Client_GetBotCreationLimit);
|
||||
package.add("GetBotRequiredLevel", (int(*)(Client*))&Perl_Client_GetBotRequiredLevel);
|
||||
package.add("GetBotRequiredLevel", (int(*)(Client*, uint8))&Perl_Client_GetBotRequiredLevel);
|
||||
package.add("GetBotSpawnLimit", (int(*)(Client*))&Perl_Client_GetBotSpawnLimit);
|
||||
package.add("GetBotSpawnLimit", (int(*)(Client*, uint8))&Perl_Client_GetBotSpawnLimit);
|
||||
|
||||
#endif
|
||||
|
||||
package.add("GetCarriedMoney", &Perl_Client_GetCarriedMoney);
|
||||
package.add("GetCarriedPlatinum", &Perl_Client_GetCarriedPlatinum);
|
||||
package.add("GetCharacterFactionLevel", &Perl_Client_GetCharacterFactionLevel);
|
||||
@@ -3306,18 +3276,12 @@ void perl_register_client()
|
||||
package.add("SetBindPoint", (void(*)(Client*, int, int, float, float))&Perl_Client_SetBindPoint);
|
||||
package.add("SetBindPoint", (void(*)(Client*, int, int, float, float, float))&Perl_Client_SetBindPoint);
|
||||
package.add("SetBindPoint", (void(*)(Client*, int, int, float, float, float, float))&Perl_Client_SetBindPoint);
|
||||
|
||||
#ifdef BOTS
|
||||
|
||||
package.add("SetBotCreationLimit", (void(*)(Client*, uint32))&Perl_Client_SetBotCreationLimit);
|
||||
package.add("SetBotCreationLimit", (void(*)(Client*, uint32, uint8))&Perl_Client_SetBotCreationLimit);
|
||||
package.add("SetBotRequiredLevel", (void(*)(Client*, int))&Perl_Client_SetBotRequiredLevel);
|
||||
package.add("SetBotRequiredLevel", (void(*)(Client*, int, uint8))&Perl_Client_SetBotRequiredLevel);
|
||||
package.add("SetBotSpawnLimit", (void(*)(Client*, int))&Perl_Client_SetBotSpawnLimit);
|
||||
package.add("SetBotSpawnLimit", (void(*)(Client*, int, uint8))&Perl_Client_SetBotSpawnLimit);
|
||||
|
||||
#endif
|
||||
|
||||
package.add("SetClientMaxLevel", &Perl_Client_SetClientMaxLevel);
|
||||
package.add("SetConsumption", &Perl_Client_SetConsumption);
|
||||
package.add("SetCustomItemData", &Perl_Client_SetCustomItemData);
|
||||
@@ -3355,22 +3319,16 @@ void perl_register_client()
|
||||
package.add("SetSpellDuration", (void(*)(Client*, int))&Perl_Client_SetSpellDuration);
|
||||
package.add("SetSpellDuration", (void(*)(Client*, int, int))&Perl_Client_SetSpellDuration);
|
||||
package.add("SetSpellDuration", (void(*)(Client*, int, int, bool))&Perl_Client_SetSpellDuration);
|
||||
#ifdef BOTS
|
||||
package.add("SetSpellDuration", (void(*)(Client*, int, int, bool, bool))&Perl_Client_SetSpellDuration);
|
||||
#endif
|
||||
package.add("SetSpellDurationGroup", (void(*)(Client*, int))&Perl_Client_SetSpellDurationGroup);
|
||||
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int))&Perl_Client_SetSpellDurationGroup);
|
||||
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int, bool))&Perl_Client_SetSpellDurationGroup);
|
||||
#ifdef BOTS
|
||||
package.add("SetSpellDurationGroup", (void(*)(Client*, int, int, bool, bool))&Perl_Client_SetSpellDurationGroup);
|
||||
#endif
|
||||
package.add("SetSpellDurationRaid", (void(*)(Client*, int))&Perl_Client_SetSpellDurationRaid);
|
||||
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int))&Perl_Client_SetSpellDurationRaid);
|
||||
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, bool))&Perl_Client_SetSpellDurationRaid);
|
||||
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, bool, bool))&Perl_Client_SetSpellDurationRaid);
|
||||
#ifdef BOTS
|
||||
package.add("SetSpellDurationRaid", (void(*)(Client*, int, int, bool, bool, bool))&Perl_Client_SetSpellDurationRaid);
|
||||
#endif
|
||||
package.add("SetStartZone", (void(*)(Client*, uint32))&Perl_Client_SetStartZone);
|
||||
package.add("SetStartZone", (void(*)(Client*, uint32, float, float, float))&Perl_Client_SetStartZone);
|
||||
package.add("SetStartZone", (void(*)(Client*, uint32, float, float, float, float))&Perl_Client_SetStartZone);
|
||||
|
||||
Reference in New Issue
Block a user