[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
-12
View File
@@ -47,8 +47,6 @@ public:
std::vector<std::any> *extra_pointers) { return 0; }
virtual int EventEncounter(QuestEventID evt, std::string encounter_name, std::string data, uint32 extra_data,
std::vector<std::any> *extra_pointers) { return 0; }
#ifdef BOTS
virtual int EventBot(
QuestEventID evt,
Bot *bot,
@@ -70,7 +68,6 @@ public:
) {
return 0;
}
#endif
virtual bool HasQuestSub(uint32 npcid, QuestEventID evt) { return false; }
virtual bool HasGlobalQuestSub(QuestEventID evt) { return false; }
@@ -80,11 +77,8 @@ public:
virtual bool ItemHasQuestSub(EQ::ItemInstance *itm, QuestEventID evt) { return false; }
virtual bool EncounterHasQuestSub(std::string encounter_name, QuestEventID evt) { return false; }
virtual bool HasEncounterSub(const std::string& package_name, QuestEventID evt) { return false; }
#ifdef BOTS
virtual bool BotHasQuestSub(QuestEventID evt) { return false; }
virtual bool GlobalBotHasQuestSub(QuestEventID evt) { return false; }
#endif
virtual void LoadNPCScript(std::string filename, int npc_id) { }
virtual void LoadGlobalNPCScript(std::string filename) { }
@@ -93,11 +87,8 @@ public:
virtual void LoadItemScript(std::string filename, EQ::ItemInstance *item) { }
virtual void LoadSpellScript(std::string filename, uint32 spell_id) { }
virtual void LoadEncounterScript(std::string filename, std::string encounter_name) { }
#ifdef BOTS
virtual void LoadBotScript(std::string filename) { }
virtual void LoadGlobalBotScript(std::string filename) { }
#endif
virtual int DispatchEventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
std::vector<std::any> *extra_pointers) { return 0; }
@@ -107,8 +98,6 @@ public:
std::vector<std::any> *extra_pointers) { return 0; }
virtual int DispatchEventSpell(QuestEventID evt, Mob* mob, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
std::vector<std::any> *extra_pointers) { return 0; }
#ifdef BOTS
virtual int DispatchEventBot(
QuestEventID evt,
Bot *bot,
@@ -119,7 +108,6 @@ public:
) {
return 0;
}
#endif
virtual void AddVar(std::string name, std::string val) { }
virtual std::string GetVar(std::string name) { return std::string(); }