[Bots] Fix rule Bots:FinishBuffing (#4788)

This commit is contained in:
nytmyr
2025-03-29 15:17:33 -05:00
committed by GitHub
parent deb298dda7
commit d554eb3423
4 changed files with 30 additions and 4 deletions
+3 -1
View File
@@ -562,7 +562,9 @@ bool Bot::AIDoSpellCast(int32 i, Mob* tar, int32 mana_cost, uint32* oDontDoAgain
// Allow bots to cast buff spells even if they are out of mana
if (
RuleB(Bots, FinishBuffing) &&
manaCost > hasMana && AIBot_spells[i].type == BotSpellTypes::Buff
manaCost > hasMana &&
!IsEngaged() &&
IsBotBuffSpellType(AIBot_spells[i].type)
) {
SetMana(manaCost);
}