From bdba109e4343e8e39f2349a68ca86462c23752aa Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Mon, 30 Jun 2025 19:30:13 -0500 Subject: [PATCH] [Bots] Fix FinishBuffing rule --- zone/bot.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 36fd4e753..7f1be1688 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -9610,14 +9610,9 @@ bool Bot::CastChecks(uint16 spell_id, Mob* tar, uint16 spell_type, bool precheck return false; } - if ( - !BotHasEnoughMana(spell_id) && - ( - !RuleB(Bots, FinishBuffing) || - IsEngaged() || - IsBotBuffSpellType(spell_type) - ) - ) { + bool is_mana_exempt = RuleB(Bots, FinishBuffing) && !IsEngaged() && IsBotBuffSpellType(spell_type); + + if (!BotHasEnoughMana(spell_id) && !is_mana_exempt) { LogBotSpellChecksDetail("{} says, 'Cancelling cast of {} due to !BotHasEnoughMana.'", GetCleanName(), GetSpellName(spell_id)); return false; }