Prevent autogear on player alt bots (#772)

* prevent autogear on player alt bots

* update chat message to match other message format

* add config option with default set to 1

* replace end of file blank line

* remove extra space
This commit is contained in:
xSparky911x
2024-12-15 16:37:13 -06:00
committed by GitHub
parent 9fed6bc73a
commit cbadb5765f
4 changed files with 16 additions and 1 deletions

View File

@@ -202,6 +202,16 @@ bool AutoGearAction::Execute(Event event)
botAI->TellError("autogear command is not allowed, please check the configuration.");
return false;
}
if (!sPlayerbotAIConfig->autoGearCommandAltBots)
{
if (!sRandomPlayerbotMgr->IsRandomBot(bot))
{
botAI->TellError("You cannot use autogear on alt bots.");
return false;
}
}
botAI->TellMaster("I'm auto gearing");
uint32 gs = sPlayerbotAIConfig->autoGearScoreLimit == 0
? 0