diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 9056aaf9..c65b06ed 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -17,6 +17,9 @@ AiPlayerbot.DeleteRandomBotAccounts = 0 # auto-login all player alts as bots on player login AiPlayerbot.BotAutologin = 0 +# Allow login other players' characters as bots +AiPlayerbot.allowPlayerBots = 0 + # Guild Task system AiPlayerbot.EnableGuildTasks = 0 diff --git a/src/PlayerbotMgr.cpp b/src/PlayerbotMgr.cpp index 4489a253..49dbf467 100644 --- a/src/PlayerbotMgr.cpp +++ b/src/PlayerbotMgr.cpp @@ -527,6 +527,9 @@ std::string const PlayerbotHolder::ProcessBotCommand(std::string const cmd, Obje if (ObjectAccessor::FindPlayer(guid)) return "player already logged in"; + if (!sPlayerbotAIConfig->allowPlayerBots && !isRandomAccount && !isMasterAccount) + return "You cannot login another player's character as bot."; + AddPlayerBot(guid, masterAccountId); return "ok"; }