Auto teleport check; Miscs

This commit is contained in:
Yunfan Li
2024-01-08 23:31:05 +08:00
parent b3c9f8d796
commit 8b333a853b
3 changed files with 20 additions and 13 deletions

View File

@@ -11,6 +11,9 @@ bool AutoTeleportForLevelAction::Execute(Event event) {
if (!sPlayerbotAIConfig->autoTeleportForLevel || !sRandomPlayerbotMgr->IsRandomBot(bot)) {
return false;
}
if (botAI->HasRealPlayerMaster()) {
return false;
}
sRandomPlayerbotMgr->RandomTeleportForLevel(bot);
return true;
}

View File

@@ -1055,7 +1055,8 @@ float MovementAction::MoveDelay(float distance)
void MovementAction::WaitForReach(float distance)
{
float delay = 1000.0f * MoveDelay(distance) + sPlayerbotAIConfig->reactDelay;
float delay = 1000.0f * MoveDelay(distance);
if (delay > sPlayerbotAIConfig->maxWaitForMove)
delay = sPlayerbotAIConfig->maxWaitForMove;