[Bots] Fix FinishBuffing rule (#4961)

This commit is contained in:
nytmyr 2025-06-30 19:54:04 -05:00 committed by GitHub
parent 659a960401
commit f7775c7a75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}