[Bots] Move commanded spell map to zone (#4755)

- Moves the mapping of commanded spell min levels to zone rather than to each individual bot.
- Adds support for sub spell types.
This commit is contained in:
nytmyr
2025-03-06 16:05:36 -06:00
committed by GitHub
parent 94553501ba
commit 1d4ba082ad
7 changed files with 90 additions and 64 deletions
+1 -5
View File
@@ -685,11 +685,9 @@ public:
// Spell lists
void CheckBotSpells();
void MapSpellTypeLevels();
const std::map<int32_t, std::map<int32_t, BotSpellTypesByClass>>& GetCommandedSpellTypesMinLevels() { return commanded_spells_min_level; }
std::list<BotSpellTypeOrder> GetSpellTypesPrioritized(uint8 priority_type);
static uint16 GetParentSpellType(uint16 spell_type);
bool IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id);
static bool IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id);
inline uint16 GetCastedSpellType() const { return _castedSpellType; }
void SetCastedSpellType(uint16 spell_type);
bool IsValidSpellTypeSubType(uint16 spell_type, uint16 sub_type, uint16 spell_id);
@@ -1153,8 +1151,6 @@ protected:
std::vector<BotSpells> AIBot_spells_enforced;
std::unordered_map<uint16, std::vector<BotSpells_wIndex>> AIBot_spells_by_type;
std::map<int32_t, std::map<int32_t, BotSpellTypesByClass>> commanded_spells_min_level;
std::vector<BotTimer> bot_timers;
std::vector<BotBlockedBuffs> bot_blocked_buffs;