From 21e9e2e2aa3e0f3ba01de2eea2ef4518b8dfd024 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 12 Feb 2024 14:15:57 +0800 Subject: [PATCH] Disable talent initialzation for persistence random bot --- src/PlayerbotFactory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index 51576a99..bea21609 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -195,7 +195,9 @@ void PlayerbotFactory::Randomize(bool incremental) pmo = sPerformanceMonitor->start(PERF_MON_RNDBOT, "PlayerbotFactory_Talents"); LOG_INFO("playerbots", "Initializing talents..."); - InitTalentsTree(); + if (!sPlayerbotAIConfig->equipmentPersistence || bot->GetLevel() < sPlayerbotAIConfig->equipmentPersistenceLevel) { + InitTalentsTree(); + } sRandomPlayerbotMgr->SetValue(bot->GetGUID().GetCounter(), "specNo", 0); if (botAI) { sPlayerbotDbStore->Reset(botAI);