mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Merge pull request #89 from oiuv/master
fix GM only bug when AiPlayerbot.AddClassCommand=0
This commit is contained in:
commit
cc504fd1ee
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user