mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-13 06:48:20 +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:
@@ -71,10 +71,7 @@ public:
|
||||
bool PlayerHasQuestSub(QuestEventID evt, bool check_encounters = false);
|
||||
bool SpellHasQuestSub(uint32 spell_id, QuestEventID evt, bool check_encounters = false);
|
||||
bool ItemHasQuestSub(EQ::ItemInstance *itm, QuestEventID evt, bool check_encounters = false);
|
||||
|
||||
#ifdef BOTS
|
||||
bool BotHasQuestSub(QuestEventID evt);
|
||||
#endif
|
||||
|
||||
int EventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<std::any> *extra_pointers = nullptr);
|
||||
@@ -87,7 +84,6 @@ public:
|
||||
int EventEncounter(QuestEventID evt, std::string encounter_name, std::string data, uint32 extra_data,
|
||||
std::vector<std::any> *extra_pointers = nullptr);
|
||||
|
||||
#ifdef BOTS
|
||||
int EventBot(
|
||||
QuestEventID evt,
|
||||
Bot *bot,
|
||||
@@ -96,7 +92,6 @@ public:
|
||||
uint32 extra_data,
|
||||
std::vector<std::any> *extra_pointers = nullptr
|
||||
);
|
||||
#endif
|
||||
|
||||
void GetErrors(std::list<std::string> &quest_errors);
|
||||
|
||||
@@ -131,18 +126,13 @@ private:
|
||||
bool SpellHasEncounterSub(uint32 spell_id, QuestEventID evt);
|
||||
bool ItemHasEncounterSub(EQ::ItemInstance* item, QuestEventID evt);
|
||||
bool HasEncounterSub(QuestEventID evt, const std::string& package_name);
|
||||
|
||||
#ifdef BOTS
|
||||
bool BotHasQuestSubLocal(QuestEventID evt);
|
||||
bool BotHasQuestSubGlobal(QuestEventID evt);
|
||||
#endif
|
||||
|
||||
int EventNPCLocal(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers);
|
||||
int EventNPCGlobal(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers);
|
||||
int EventPlayerLocal(QuestEventID evt, Client *client, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers);
|
||||
int EventPlayerGlobal(QuestEventID evt, Client *client, std::string data, uint32 extra_data, std::vector<std::any> *extra_pointers);
|
||||
|
||||
#ifdef BOTS
|
||||
int EventBotLocal(
|
||||
QuestEventID evt,
|
||||
Bot *bot,
|
||||
@@ -159,7 +149,6 @@ private:
|
||||
uint32 extra_data,
|
||||
std::vector<std::any> *extra_pointers
|
||||
);
|
||||
#endif
|
||||
|
||||
QuestInterface *GetQIByNPCQuest(uint32 npcid, std::string &filename);
|
||||
QuestInterface *GetQIByGlobalNPCQuest(std::string &filename);
|
||||
@@ -168,11 +157,8 @@ private:
|
||||
QuestInterface *GetQIBySpellQuest(uint32 spell_id, std::string &filename);
|
||||
QuestInterface *GetQIByItemQuest(std::string item_script, std::string &filename);
|
||||
QuestInterface *GetQIByEncounterQuest(std::string encounter_name, std::string &filename);
|
||||
|
||||
#ifdef BOTS
|
||||
QuestInterface *GetQIByBotQuest(std::string &filename);
|
||||
QuestInterface *GetQIByGlobalBotQuest(std::string &filename);
|
||||
#endif
|
||||
|
||||
int DispatchEventNPC(QuestEventID evt, NPC* npc, Mob *init, std::string data, uint32 extra_data,
|
||||
std::vector<std::any> *extra_pointers);
|
||||
@@ -182,8 +168,6 @@ private:
|
||||
std::vector<std::any> *extra_pointers);
|
||||
int DispatchEventSpell(QuestEventID evt, Mob* mob, Client *client, uint32 spell_id, std::string data, uint32 extra_data,
|
||||
std::vector<std::any> *extra_pointers);
|
||||
|
||||
#ifdef BOTS
|
||||
int DispatchEventBot(
|
||||
QuestEventID evt,
|
||||
Bot *bot,
|
||||
@@ -192,7 +176,6 @@ private:
|
||||
uint32 extra_data,
|
||||
std::vector<std::any> *extra_pointers
|
||||
);
|
||||
#endif
|
||||
|
||||
std::map<uint32, QuestInterface*> _interfaces;
|
||||
std::map<uint32, std::string> _extensions;
|
||||
@@ -204,13 +187,8 @@ private:
|
||||
uint32 _global_npc_quest_status;
|
||||
uint32 _player_quest_status;
|
||||
uint32 _global_player_quest_status;
|
||||
|
||||
#ifdef BOTS
|
||||
uint32 _bot_quest_status;
|
||||
uint32 _global_bot_quest_status;
|
||||
#endif
|
||||
|
||||
|
||||
std::map<uint32, uint32> _spell_quest_status;
|
||||
std::map<uint32, uint32> _item_quest_status;
|
||||
std::map<std::string, uint32> _encounter_quest_status;
|
||||
|
||||
Reference in New Issue
Block a user