mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Performance] Pull up CanUpdateAI() check
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user