Update rpg status probability

This commit is contained in:
Yunfan Li
2024-12-11 23:00:03 +08:00
parent 69fe9a2d81
commit f26cebb518
3 changed files with 5 additions and 5 deletions

View File

@@ -424,7 +424,7 @@ void PlayerbotFactory::Randomize(bool incremental)
bot->SetHealth(bot->GetMaxHealth());
bot->SetPower(POWER_MANA, bot->GetMaxPower(POWER_MANA));
bot->SaveToDB(false, false);
LOG_INFO("playerbots", "Initialization Done.");
// LOG_INFO("playerbots", "Initialization Done.");
if (pmo)
pmo->finish();
}

View File

@@ -44,7 +44,7 @@ bool NewRpgStatusUpdateAction::Execute(Event event)
}
}
// IDLE -> GO_INNKEEPER
if (bot->GetLevel() >= 6 && roll <= 55)
else if (bot->GetLevel() >= 6 && roll <= 50)
{
WorldPosition pos = SelectRandomInnKeeperPos();
if (pos != WorldPosition() && bot->GetExactDist(pos) > 50.0f)
@@ -56,7 +56,7 @@ bool NewRpgStatusUpdateAction::Execute(Event event)
}
}
// IDLE -> GO_GRIND
if (roll <= 90)
else if (roll <= 90)
{
WorldPosition pos = SelectRandomGrindPos();
if (pos != WorldPosition())
@@ -167,7 +167,7 @@ WorldPosition NewRpgStatusUpdateAction::SelectRandomGrindPos()
}
}
WorldPosition dest;
if (urand(1, 100) <= 75 && !hi_prepared_locs.empty())
if (urand(1, 100) <= 50 && !hi_prepared_locs.empty())
{
uint32 idx = urand(0, hi_prepared_locs.size() - 1);
dest = hi_prepared_locs[idx];

View File

@@ -24,7 +24,7 @@ protected:
// const int32 setGrindInterval = 5 * 60 * 1000;
// const int32 setNpcInterval = 1 * 60 * 1000;
const int32 statusNearNpcDuration = 5 * 60 * 1000;
const int32 statusNearRandomDuration = 3 * 60 * 1000;
const int32 statusNearRandomDuration = 5 * 60 * 1000;
const int32 statusRestDuration = 2 * 60 * 1000;
WorldPosition SelectRandomGrindPos();
WorldPosition SelectRandomInnKeeperPos();