diff --git a/zone/bot.cpp b/zone/bot.cpp index 4d9214c71..a8bc91638 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2137,6 +2137,7 @@ void Bot::AI_Process() SetSpellTargetList(spellTargetList); std::vector groupSpellTargetList = GatherSpellTargets(); SetGroupSpellTargetList(groupSpellTargetList); + SetTempSpellType(UINT16_MAX); // HEAL ROTATION CASTING CHECKS HealRotationChecks(); diff --git a/zone/bot.h b/zone/bot.h index d2488671b..e0177e257 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -467,6 +467,8 @@ public: void SetGroupSpellTargetList(std::vector spellTargetList) { _groupSpellTargetList = spellTargetList; } Raid* GetStoredRaid() { return _storedRaid; } void SetStoredRaid(Raid* storedRaid) { _storedRaid = storedRaid; } + uint16 GetTempSpellType() { return _tempSpellType; } + void SetTempSpellType(uint16 spellType) { _tempSpellType = spellType; } void AssignBotSpellsToTypes(std::vector& AIBot_spells, std::unordered_map>& AIBot_spells_by_type); bool IsTargetAlreadyReceivingSpell(Mob* tar, uint16 spell_id); bool DoResistCheck(Mob* target, uint16 spell_id, int32 resist_limit); @@ -1105,6 +1107,7 @@ private: std::vector _spellTargetList; std::vector _groupSpellTargetList; Raid* _storedRaid; + uint16 _tempSpellType; // Private "base stats" Members int32 _baseMR; diff --git a/zone/botspellsai.cpp b/zone/botspellsai.cpp index 5f3c3d784..054b82ac9 100644 --- a/zone/botspellsai.cpp +++ b/zone/botspellsai.cpp @@ -56,7 +56,8 @@ bool Bot::AICastSpell(Mob* tar, uint8 iChance, uint16 spellType, uint16 subTarge uint8 botClass = GetClass(); - SetCastedSpellType(UINT16_MAX); + SetCastedSpellType(UINT16_MAX); // this is for recast timers + SetTempSpellType(spellType); // this is for spell checks BotSpell botSpell; botSpell.SpellId = 0;