add config for another player's character as bot

This commit is contained in:
Oiuv
2024-03-31 23:57:17 +08:00
parent 39eb6a0087
commit 429bce3080
2 changed files with 6 additions and 0 deletions

View File

@@ -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

View File

@@ -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";
}