mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-30 22:06:46 +00:00
[Bots] Fix rule Bots:FinishBuffing (#4788)
This commit is contained in:
+8
-1
@@ -9533,7 +9533,14 @@ bool Bot::CastChecks(uint16 spell_id, Mob* tar, uint16 spell_type, bool precheck
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!BotHasEnoughMana(spell_id)) {
|
||||
if (
|
||||
!BotHasEnoughMana(spell_id) &&
|
||||
(
|
||||
!RuleB(Bots, FinishBuffing) ||
|
||||
IsEngaged() ||
|
||||
IsBotBuffSpellType(spell_type)
|
||||
)
|
||||
) {
|
||||
LogBotSpellChecksDetail("{} says, 'Cancelling cast of {} due to !BotHasEnoughMana.'", GetCleanName(), GetSpellName(spell_id));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user