mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-28 16:06:25 +00:00
[Performance] Pull up CanUpdateAI() check
This commit is contained in:
@@ -314,6 +314,10 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
|
|||||||
|
|
||||||
AllowActivity();
|
AllowActivity();
|
||||||
|
|
||||||
|
|
||||||
|
if (!CanUpdateAI())
|
||||||
|
return;
|
||||||
|
|
||||||
Spell* currentSpell = bot->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
Spell* currentSpell = bot->GetCurrentSpell(CURRENT_GENERIC_SPELL);
|
||||||
if (!currentSpell)
|
if (!currentSpell)
|
||||||
currentSpell = bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL);
|
currentSpell = bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL);
|
||||||
|
|||||||
Reference in New Issue
Block a user