mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 10:30:01 +01:00
[Performance] Pull up CanUpdateAI() check
This commit is contained in:
parent
269deafc84
commit
b2dae08221
@ -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);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user