mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 02:20:00 +01:00
[Performance] YieldThread when casting spell
This commit is contained in:
parent
b2dae08221
commit
69ef0d46cd
@ -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())
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user