From f26cebb51840c0609dfe157f13ad49203f7558e8 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Wed, 11 Dec 2024 23:00:03 +0800 Subject: [PATCH] Update rpg status probability --- src/factory/PlayerbotFactory.cpp | 2 +- src/strategy/actions/NewRpgAction.cpp | 6 +++--- src/strategy/actions/NewRpgAction.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/factory/PlayerbotFactory.cpp b/src/factory/PlayerbotFactory.cpp index 076500f6..89de2570 100644 --- a/src/factory/PlayerbotFactory.cpp +++ b/src/factory/PlayerbotFactory.cpp @@ -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(); } diff --git a/src/strategy/actions/NewRpgAction.cpp b/src/strategy/actions/NewRpgAction.cpp index 4c5f8d6a..6b7e9e07 100644 --- a/src/strategy/actions/NewRpgAction.cpp +++ b/src/strategy/actions/NewRpgAction.cpp @@ -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]; diff --git a/src/strategy/actions/NewRpgAction.h b/src/strategy/actions/NewRpgAction.h index 5bef88aa..a61b83d4 100644 --- a/src/strategy/actions/NewRpgAction.h +++ b/src/strategy/actions/NewRpgAction.h @@ -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();