From 30f1960003762cc24fdadfcf1bba5f2c4b6015e2 Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Fri, 6 Dec 2024 22:33:32 -0600 Subject: [PATCH] add timer checks to Idle/Engaged/Pursue CastCheck to early terminate --- zone/botspellsai.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zone/botspellsai.cpp b/zone/botspellsai.cpp index f83455cc8..410aa7e69 100644 --- a/zone/botspellsai.cpp +++ b/zone/botspellsai.cpp @@ -633,7 +633,7 @@ bool Bot::AIDoSpellCast(int32 i, Mob* tar, int32 mana_cost, uint32* oDontDoAgain } bool Bot::AI_PursueCastCheck() { - if (GetAppearance() == eaDead || IsFeared() || IsSilenced() || IsAmnesiad() || GetHP() < 0) { + if (GetAppearance() == eaDead || delaytimer || spellend_timer.Enabled() || IsFeared() || IsSilenced() || IsAmnesiad() || GetHP() < 0) { return false; } @@ -682,7 +682,7 @@ bool Bot::AI_PursueCastCheck() { } bool Bot::AI_IdleCastCheck() { - if (GetAppearance() == eaDead || IsFeared() || IsSilenced() || IsAmnesiad() || GetHP() < 0) { + if (GetAppearance() == eaDead || delaytimer || spellend_timer.Enabled() || IsFeared() || IsSilenced() || IsAmnesiad() || GetHP() < 0) { return false; } @@ -745,7 +745,7 @@ bool Bot::AI_IdleCastCheck() { } bool Bot::AI_EngagedCastCheck() { - if (GetAppearance() == eaDead || IsFeared() || IsSilenced() || IsAmnesiad() || GetHP() < 0) { + if (GetAppearance() == eaDead || delaytimer || spellend_timer.Enabled() || IsFeared() || IsSilenced() || IsAmnesiad() || GetHP() < 0) { return false; }