From 69ef0d46cd6c1ab461c53246ff6fb2567ea2d034 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sun, 6 Oct 2024 12:22:48 +0800 Subject: [PATCH] [Performance] YieldThread when casting spell --- src/PlayerbotAI.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index a8c7e8c0..599289ba 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -360,6 +360,7 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal) } // wait for spell cast + YieldThread(GetReactDelay()); return; } @@ -386,9 +387,6 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal) bot->StopMovingOnCurrentPos(); } } - - if (!CanUpdateAI()) - return; if (!bot->InBattleground() && !bot->inRandomLfgDungeon() && bot->GetGroup()) {