mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
fix GM only bug when AiPlayerbot.AddClassCommand=0
This commit is contained in:
@@ -386,7 +386,7 @@ AiPlayerbot.AllowedLogFiles = ""
|
||||
# WorldBuff.Faction.Class.MinLevel.MaxLevel
|
||||
|
||||
# Added following config
|
||||
# Selfbot permission level (0 = disabled, 1 = gm only (default), 2 = all players, 3 = activate on login) # AiPlayerbot.SelfBotLevel = 1
|
||||
# Selfbot permission level (0 = disabled, 1 = gm only (default), 2 = all players, 3 = activate on login)
|
||||
AiPlayerbot.SelfBotLevel = 1
|
||||
|
||||
# Enables/Disables bot cheating
|
||||
|
||||
@@ -697,10 +697,6 @@ std::vector<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* arg
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!strncmp(cmd, "initself=", 9)) {
|
||||
if (!strcmp(cmd, "initself=rare")) {
|
||||
if (master->GetSession()->GetSecurity() >= SEC_GAMEMASTER) {
|
||||
@@ -792,8 +788,8 @@ std::vector<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* arg
|
||||
|
||||
if (!strcmp(cmd, "addclass"))
|
||||
{
|
||||
if (sPlayerbotAIConfig->addClassCommand == 0) {
|
||||
messages.push_back("addclass command was disabled, please check your configuration");
|
||||
if (sPlayerbotAIConfig->addClassCommand == 0 && master->GetSession()->GetSecurity() < SEC_GAMEMASTER) {
|
||||
messages.push_back("You do not have permission to create bot by addclass command");
|
||||
return messages;
|
||||
}
|
||||
if (!charname) {
|
||||
|
||||
Reference in New Issue
Block a user