New rpg bug fix that preventing bots from long distance movement

This commit is contained in:
Yunfan Li
2024-12-15 16:46:44 +08:00
parent 9b41798eee
commit a91aa3e392
3 changed files with 5 additions and 5 deletions

View File

@@ -720,7 +720,7 @@ void PlayerbotAI::HandleTeleportAck()
// SetNextCheckDelay(urand(2000, 5000));
if (sPlayerbotAIConfig->applyInstanceStrategies)
ApplyInstanceStrategies(bot->GetMapId(), true);
Reset();
Reset(true);
}
SetNextCheckDelay(sPlayerbotAIConfig->globalCoolDown);
@@ -769,14 +769,14 @@ void PlayerbotAI::Reset(bool full)
->setTarget(sTravelMgr->nullTravelDestination, sTravelMgr->nullWorldPosition, true);
aiObjectContext->GetValue<TravelTarget*>("travel target")->Get()->setStatus(TRAVEL_STATUS_EXPIRED);
aiObjectContext->GetValue<TravelTarget*>("travel target")->Get()->setExpireIn(1000);
rpgInfo = NewRpgInfo();
}
aiObjectContext->GetValue<GuidSet&>("ignore rpg target")->Get().clear();
bot->GetMotionMaster()->Clear();
// bot->CleanupAfterTaxiFlight();
InterruptSpell();
rpgInfo = NewRpgInfo();
if (full)
{

View File

@@ -1495,7 +1495,7 @@ void RandomPlayerbotMgr::PrepareTeleportCache()
}
LOG_INFO("playerbots", ">> {} locations for level collected.", collected_locs);
LOG_INFO("playerbots", "Preparing innkeepers locations for level collected");
LOG_INFO("playerbots", "Preparing innkeepers locations for level collected...");
if (sPlayerbotAIConfig->enableNewRpgStrategy)
{
results = WorldDatabase.Query(

View File

@@ -44,7 +44,7 @@ bool NewRpgStatusUpdateAction::Execute(Event event)
}
}
// IDLE -> GO_INNKEEPER
else if (bot->GetLevel() >= 6 && roll <= 45)
else if (bot->GetLevel() >= 6 && roll <= 40)
{
WorldPosition pos = SelectRandomInnKeeperPos();
if (pos != WorldPosition() && bot->GetExactDist(pos) > 50.0f)