[Bots] Add Bot-specific Spell Settings. (#2553)

* [Bots] Add Bot-specific Spell Settings.

# Notes
- Allows players to set `priority`, `min_level`, `max_level`, `min_hp`, `max_hp`, and `is_enabled` settings per spell based on targeted bot.
- Lets players disable spells they don't want their bots casting or change the criteria they cast them at if they want.

* Update botspellsai.cpp

* Update 2022_11_19_bot_spell_settings.sql

* Typo.

* Update botspellsai.cpp

* Cleanup and add Reload Methods to Perl/Lua.
This commit is contained in:
Alex King
2022-11-27 14:46:36 -05:00
committed by GitHub
parent f6c5560e9c
commit 2d364e2fd1
16 changed files with 1583 additions and 122 deletions
+5 -4
View File
@@ -533,8 +533,8 @@ public:
const NPCType* LoadNPCTypesData(uint32 id, bool bulk_load = false);
/*Bots */
DBbotspells_Struct* GetBotSpells(uint32 iDBSpellsID);
void ClearBotSpells() { Bot_Spells_Cache.clear(); Bot_Spells_LoadTried.clear(); }
DBbotspells_Struct* GetBotSpells(uint32 bot_spell_id);
void ClearBotSpells() { bot_spells_cache.clear(); bot_spells_loadtried.clear(); }
/* Mercs */
const NPCType* GetMercType(uint32 id, uint16 raceid, uint32 clientlevel);
@@ -637,8 +637,9 @@ protected:
std::unordered_set<uint32> npc_spells_loadtried;
DBnpcspellseffects_Struct** npc_spellseffects_cache;
bool* npc_spellseffects_loadtried;
std::unordered_map<uint32, DBbotspells_Struct> Bot_Spells_Cache;
std::unordered_set<uint32> Bot_Spells_LoadTried;
std::unordered_map<uint32, DBbotspells_Struct> bot_spells_cache;
std::unordered_set<uint32> bot_spells_loadtried;
};
extern ZoneDatabase database;