mxwow modules

This commit is contained in:
mikx
2025-03-24 23:53:45 -04:00
parent 93073b0be2
commit e87efbaf6e
99 changed files with 4909 additions and 814 deletions

View File

@@ -24,12 +24,17 @@ bool TradeStatusAction::Execute(Event event)
return false;
PlayerbotAI* traderBotAI = GET_PLAYERBOT_AI(trader);
if (trader != master && !traderBotAI)
// Allow the master and group members to trade
if (trader != master && !traderBotAI && (!bot->GetGroup() || !bot->GetGroup()->IsMember(trader->GetGUID())))
{
bot->Whisper("I'm kind of busy now", LANG_UNIVERSAL, trader);
return false;
}
if ((trader != master || !botAI->GetSecurity()->CheckLevelFor(PLAYERBOT_SECURITY_ALLOW_ALL, true, master)) &&
// 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)) &&
!traderBotAI)
{
WorldPacket p;
@@ -109,9 +114,9 @@ bool TradeStatusAction::Execute(Event event)
bot->SetFacingToObject(trader);
BeginTrade();
return true;
}
return false;
}