Add config option for RND bot trading. (#1132)

* Add config option for RNDbot trading.
This commit is contained in:
Paolo
2025-03-28 08:10:49 -07:00
committed by GitHub
parent 495269bfa0
commit 917c96a281
4 changed files with 10 additions and 0 deletions

View File

@@ -32,6 +32,12 @@ bool TradeStatusAction::Execute(Event event)
return false;
}
if (!sPlayerbotAIConfig->enableRandomBotTrading && sRandomPlayerbotMgr->IsRandomBot(bot))
{
bot->Whisper("Trading is disabled", LANG_UNIVERSAL, trader);
return false;
}
// Allow trades from group members or bots
if ((!bot->GetGroup() || !bot->GetGroup()->IsMember(trader->GetGUID())) &&
(trader != master || !botAI->GetSecurity()->CheckLevelFor(PLAYERBOT_SECURITY_ALLOW_ALL, true, master)) &&