From 410a8fa5eb41e11955725c7651bf4146ed46e05e Mon Sep 17 00:00:00 2001 From: dillyns <49765217+dillyns@users.noreply.github.com> Date: Fri, 12 Jun 2026 16:06:14 -0400 Subject: [PATCH] Load saved strategies for selfbot (#2458) ## Pull Request Description When you enable selfbot you always get default strategies for your class and talents. This PR loads the characters last saved strategies. ## Feature Evaluation - Describe the **minimum logic** required to achieve the intended behavior. - Describe the **processing cost** when this logic executes across many bots. ## How to Test the Changes Before run ".playerbot bot self" then "co ?" You should see that are given default strategies for your class/spec change it via "co +" ex. I told an arcane mage to use frost strategy using "co +frost,?" disable selfbot via ".playerbot bot self" reenable selfbot again and check the strategies. they will be defaults again After After reenabling selfbot and check strategies, your changes should be maintained. ## Impact Assessment - Does this change increase per-bot/per-tick processing or risk scaling poorly with thousands of bots? - - [x] No, not at all - - [ ] Minimal impact (**explain below**) - - [ ] Moderate impact (**explain below**) - Does this change modify default bot behavior? - - [x] No - - [ ] Yes (**explain why**) - Does this change add new decision branches or increase maintenance complexity? - - [x] No - - [ ] Yes (**explain below**) ## AI Assistance Was AI assistance used while working on this change? - - [x] No - - [ ] Yes (**explain below**) ## Final Checklist - - [x] Stability is not compromised. - - [x] Performance impact is understood, tested, and acceptable. - - [x] Added logic complexity is justified and explained. - - [x] Any new bot dialogue lines are translated. - - [x] Documentation updated if needed (Conf comments, WiKi commands). ## Notes for Reviewers --- src/Bot/PlayerbotMgr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bot/PlayerbotMgr.cpp b/src/Bot/PlayerbotMgr.cpp index 9d9f5688f..511b21a9f 100644 --- a/src/Bot/PlayerbotMgr.cpp +++ b/src/Bot/PlayerbotMgr.cpp @@ -1068,6 +1068,7 @@ std::vector PlayerbotHolder::HandlePlayerbotCommand(char const* arg messages.push_back("Enable player botAI"); PlayerbotsMgr::instance().AddPlayerbotData(master, true); GET_PLAYERBOT_AI(master)->SetMaster(master); + PlayerbotRepository::instance().Load(GET_PLAYERBOT_AI(master)); } return messages;