[Performance] Pull up CanUpdateAI() check

This commit is contained in:
Yunfan Li
2024-10-06 12:21:33 +08:00
parent 269deafc84
commit b2dae08221

View File

@@ -314,6 +314,10 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
AllowActivity();
if (!CanUpdateAI())
return;
Spell* currentSpell = bot->GetCurrentSpell(CURRENT_GENERIC_SPELL);
if (!currentSpell)
currentSpell = bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL);