[Bots] Move BotGetSpellsByType to cache (#4655)

This commit is contained in:
nytmyr
2025-02-07 13:05:36 -06:00
committed by GitHub
parent e0d95b4302
commit ed7023f336
4 changed files with 29 additions and 28 deletions
+2 -2
View File
@@ -305,7 +305,7 @@ public:
uint16 BotGetSpells(int spellslot) { return AIBot_spells[spellslot].spellid; }
uint32 BotGetSpellType(int spellslot) { return AIBot_spells[spellslot].type; }
uint16 BotGetSpellPriority(int spellslot) { return AIBot_spells[spellslot].priority; }
std::vector<BotSpells_wIndex> BotGetSpellsByType(uint16 spell_type);
const std::vector<BotSpells_wIndex>& BotGetSpellsByType(uint16 spell_type) const;
float GetProcChances(float ProcBonus, uint16 hand) override;
int GetHandToHandDamage(void) override;
bool TryFinishingBlow(Mob *defender, int64 &damage) override;
@@ -669,7 +669,7 @@ public:
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);
uint16 GetParentSpellType(uint16 spell_type);
static uint16 GetParentSpellType(uint16 spell_type);
bool IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id);
inline uint16 GetCastedSpellType() const { return _castedSpellType; }
void SetCastedSpellType(uint16 spell_type);