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