From 33f5e733dc9a2611d084a2af65716c70ea25818d Mon Sep 17 00:00:00 2001 From: Keleborn <22352763+Celandriel@users.noreply.github.com> Date: Mon, 29 Dec 2025 15:53:37 -0800 Subject: [PATCH] feat. Enable bots to respond to GM messages. (#1909) I found an existing config option that allows bots to speak without a master, and extended its use so that protected commands (nc, co) are taken from a bot by GM players. This is primarily a debugging tool and shouldnt be on generally. My testing of this is the following. With the option off, no error is seen, but no text output is shown. With the option on GM accounts (Whether GM is on or off) will respond to nc and co commands by just saying the output directly. Strategies can be changed by GMs for bots whom they are not masters for (Note, im pretty sure that a GM could change the strategies even before this change, you just couldnt see the output of that.) For non GM characters you get "Invite me to your group first" with the option on/off. --- src/PlayerbotAI.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index e926c68b..d05bbe5c 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -930,7 +930,6 @@ void PlayerbotAI::HandleCommand(uint32 type, std::string const text, Player* fro fromPlayer->SendDirectMessage(&data); return; } - if (!IsAllowedCommand(filtered) && (!GetSecurity()->CheckLevelFor(PLAYERBOT_SECURITY_ALLOW_ALL, type != CHAT_MSG_WHISPER, fromPlayer))) return; @@ -2803,7 +2802,12 @@ bool PlayerbotAI::TellMaster(std::ostringstream& stream, PlayerbotSecurityLevel bool PlayerbotAI::TellMaster(std::string const text, PlayerbotSecurityLevel securityLevel) { - if (!master || !TellMasterNoFacing(text, securityLevel)) + if (!master) + { + if (sPlayerbotAIConfig->randomBotSayWithoutMaster) + return TellMasterNoFacing(text, securityLevel); + } + if (!TellMasterNoFacing(text, securityLevel)) return false; if (!bot->isMoving() && !bot->IsInCombat() && bot->GetMapId() == master->GetMapId() &&