Minor improvments on logs, stats weights and aoe distance calculation (#995)

* StatsCollector for paladin spell

* Remove error log on MoveFromGroup

* Log and timer for CreateRandomBots

* Improve aoe trigger distance calculation

* Reduce spirit weights for heal priest and paladin
This commit is contained in:
Yunfan Li
2025-02-22 10:57:33 +08:00
committed by GitHub
parent a0278f1efb
commit 4b1febc62a
7 changed files with 35 additions and 25 deletions

View File

@@ -455,13 +455,13 @@ void RandomPlayerbotFactory::CreateRandomBots()
{
Field* fields = results->Fetch();
uint32 accId = fields[0].Get<uint32>();
LOG_INFO("playerbots", "Deleting account accID: {}({})...", accId, ++deletion_count);
LOG_DEBUG("playerbots", "Deleting account accID: {}({})...", accId, ++deletion_count);
AccountMgr::DeleteAccount(accId);
} while (results->NextRow());
}
PlayerbotsDatabase.Execute(PlayerbotsDatabase.GetPreparedStatement(PLAYERBOTS_DEL_RANDOM_BOTS));
uint32 timer = getMSTime();
PlayerbotsDatabase.Execute(PlayerbotsDatabase.GetPreparedStatement(PLAYERBOTS_DEL_RANDOM_BOTS));
while (LoginDatabase.QueueSize())
{
std::this_thread::sleep_for(1s);
@@ -479,7 +479,8 @@ void RandomPlayerbotFactory::CreateRandomBots()
// Calculates the total number of required accounts.
uint32 totalAccountCount = CalculateTotalAccountCount();
uint32 timer = getMSTime();
for (uint32 accountNumber = 0; accountNumber < totalAccountCount; ++accountNumber)
{
std::ostringstream out;
@@ -509,12 +510,11 @@ void RandomPlayerbotFactory::CreateRandomBots()
LOG_DEBUG("playerbots", "Account {} created for random bots", accountName.c_str());
}
if (account_creation)
{
LOG_INFO("playerbots", "Waiting for {} accounts loading into database ({} queries)...", account_creation, LoginDatabase.QueueSize());
/* wait for async accounts create to make character create correctly */
uint32 timer = getMSTime();
while (LoginDatabase.QueueSize())
{
std::this_thread::sleep_for(1s);
@@ -527,7 +527,7 @@ void RandomPlayerbotFactory::CreateRandomBots()
std::vector<std::pair<Player*, uint32>> playerBots;
std::vector<WorldSession*> sessionBots;
int bot_creation = 0;
timer = getMSTime();
bool nameCached = false;
for (uint32 accountNumber = 0; accountNumber < totalAccountCount; ++accountNumber)
{
@@ -624,7 +624,6 @@ void RandomPlayerbotFactory::CreateRandomBots()
{
LOG_INFO("playerbots", "Waiting for {} characters loading into database ({} queries)...", bot_creation, CharacterDatabase.QueueSize());
/* wait for characters load into database, or characters will fail to loggin */
uint32 timer = getMSTime();
while (CharacterDatabase.QueueSize())
{
std::this_thread::sleep_for(1s);