Reset added rndbots on server restart to automatically apply configuration changes (#913)

* Refactor RandomPlayerbotMgr and delete add value on restart server

* Remove reset tips in conf file
This commit is contained in:
Yunfan Li
2025-01-26 19:06:29 +08:00
committed by GitHub
parent 05db6f67b4
commit e571694a88
6 changed files with 28 additions and 13 deletions

View File

@@ -548,9 +548,12 @@ bool PlayerbotAIConfig::Initialize()
{
return true;
}
if (sPlayerbotAIConfig->addClassCommand)
sRandomPlayerbotMgr->PrepareAddclassCache();
if (sPlayerbotAIConfig->enabled)
{
sRandomPlayerbotMgr->Init();
}
sRandomItemMgr->Init();
sRandomItemMgr->InitAfterAhBot();
sPlayerbotTextMgr->LoadBotTexts();
@@ -563,8 +566,6 @@ bool PlayerbotAIConfig::Initialize()
sTravelMgr->LoadQuestTravelTable();
}
if (sPlayerbotAIConfig->randomBotJoinBG)
sRandomPlayerbotMgr->LoadBattleMastersCache();
if (sPlayerbotAIConfig->randomBotSuggestDungeons)
{