From ccce14238e6f5842e7ee90a3f63c3165fc2576d1 Mon Sep 17 00:00:00 2001 From: Keleborn <22352763+Celandriel@users.noreply.github.com> Date: Sun, 3 May 2026 07:16:34 -0700 Subject: [PATCH] Core Update, change to DeserterCheck and signature (#2354) ## Pull Request Description Required change for https://github.com/azerothcore/azerothcore-wotlk/pull/24641 ## 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 ## Impact Assessment - Does this change increase per-bot/per-tick processing or risk scaling poorly with thousands of bots? - - [ ] No, not at all - - [ ] Minimal impact (**explain below**) - - [ ] Moderate impact (**explain below**) - Does this change modify default bot behavior? - - [ ] No - - [ ] Yes (**explain why**) - Does this change add new decision branches or increase maintenance complexity? - - [ ] No - - [ ] Yes (**explain below**) ## AI Assistance Was AI assistance used while working on this change? - - [ ] No - - [ ] Yes (**explain below**) ## Final Checklist - - [ ] Stability is not compromised. - - [ ] Performance impact is understood, tested, and acceptable. - - [ ] Added logic complexity is justified and explained. - - [ ] Any new bot dialogue lines are translated. - - [ ] Documentation updated if needed (Conf comments, WiKi commands). ## Notes for Reviewers --- src/Ai/Base/Actions/BattleGroundJoinAction.cpp | 2 +- src/Ai/Base/Trigger/PvpTriggers.cpp | 2 +- src/Bot/Factory/RandomPlayerbotFactory.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Ai/Base/Actions/BattleGroundJoinAction.cpp b/src/Ai/Base/Actions/BattleGroundJoinAction.cpp index ab897a1b2..58ee42cfa 100644 --- a/src/Ai/Base/Actions/BattleGroundJoinAction.cpp +++ b/src/Ai/Base/Actions/BattleGroundJoinAction.cpp @@ -343,7 +343,7 @@ bool BGJoinAction::isUseful() return false; // check Deserter debuff - if (!bot->CanJoinToBattleground()) + if (bot->IsDeserter()) return false; // check if has free queue slots (pointless as already making sure not in queue) diff --git a/src/Ai/Base/Trigger/PvpTriggers.cpp b/src/Ai/Base/Trigger/PvpTriggers.cpp index 31fcd0357..b20c5df97 100644 --- a/src/Ai/Base/Trigger/PvpTriggers.cpp +++ b/src/Ai/Base/Trigger/PvpTriggers.cpp @@ -297,7 +297,7 @@ bool PlayerWantsInBattlegroundTrigger::IsActive() if (bot->GetBattleground() && bot->GetBattleground()->GetStatus() == STATUS_IN_PROGRESS) return false; - if (!bot->CanJoinToBattleground()) + if (bot->IsDeserter()) return false; return true; diff --git a/src/Bot/Factory/RandomPlayerbotFactory.cpp b/src/Bot/Factory/RandomPlayerbotFactory.cpp index 617e4006c..530715191 100644 --- a/src/Bot/Factory/RandomPlayerbotFactory.cpp +++ b/src/Bot/Factory/RandomPlayerbotFactory.cpp @@ -619,7 +619,7 @@ void RandomPlayerbotFactory::CreateRandomBots() else password = accountName; - AccountMgr::CreateAccount(accountName, password); + sAccountMgr->CreateAccount(accountName, password); LOG_DEBUG("playerbots", "Account {} created for random bots", accountName.c_str()); }