From d45213c3609c496cf2a0dbce4d3af73fe11c15de Mon Sep 17 00:00:00 2001 From: Dustin Hendrickson Date: Sun, 16 Nov 2025 10:22:20 -0600 Subject: [PATCH] Fixing persistance esge case issue --- src/mod-player-bot-level-brackets.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mod-player-bot-level-brackets.cpp b/src/mod-player-bot-level-brackets.cpp index 9733e62..02480a9 100644 --- a/src/mod-player-bot-level-brackets.cpp +++ b/src/mod-player-bot-level-brackets.cpp @@ -20,6 +20,7 @@ #include "QueryResult.h" #include #include "Player.h" +#include "PlayerbotAIConfig.h" using namespace Acore::ChatCommands; @@ -660,6 +661,14 @@ static void AdjustBotToRange(Player* bot, int targetRangeIndex, const LevelRange PlayerbotFactory newFactory(bot, newLevel); newFactory.Randomize(false); + // Force reset talents if equipment persistence is enabled and bot rolled to max level + // This is to fix an issue with Playerbots and how Randomization works with Equipment Persistence + if (newLevel == g_RandomBotMaxLevel && sPlayerbotAIConfig->equipmentPersistence) + { + PlayerbotFactory tempFactory(bot, newLevel); + tempFactory.InitTalentsTree(false, true, true); + } + if (g_BotDistFullDebugMode) { PlayerbotAI* botAI = sPlayerbotsMgr->GetPlayerbotAI(bot);