[Command] Only follow the command given by master when multiple player one group

This commit is contained in:
Yunfan Li
2024-07-22 20:18:50 +08:00
parent f9bcfeb000
commit c191dfc35f

View File

@@ -350,7 +350,7 @@ void PlayerbotAI::UpdateAIInternal([[maybe_unused]] uint32 elapsed, bool minimal
std::string const command = holder.GetCommand();
Player* owner = holder.GetOwner();
if (!helper.ParseChatCommand(command, owner) && holder.GetType() == CHAT_MSG_WHISPER)
if (owner == master && !helper.ParseChatCommand(command, owner) && holder.GetType() == CHAT_MSG_WHISPER)
{
// To prevent spam caused by WIM
if (!(command.rfind("WIM", 0) == 0) &&