Handle command and trade check for summoned bot

This commit is contained in:
Yunfan Li
2024-08-07 17:45:21 +08:00
parent 901ae2305c
commit 07c5cf78de
4 changed files with 26 additions and 26 deletions

View File

@@ -655,11 +655,7 @@ void PlayerbotAI::HandleCommand(uint32 type, std::string const text, Player* fro
}
if (!IsAllowedCommand(filtered) &&
(master != fromPlayer ||
!GetSecurity()->CheckLevelFor(PLAYERBOT_SECURITY_ALLOW_ALL, type != CHAT_MSG_WHISPER, fromPlayer)))
return;
if (!IsAllowedCommand(filtered) && master != fromPlayer)
(!GetSecurity()->CheckLevelFor(PLAYERBOT_SECURITY_ALLOW_ALL, type != CHAT_MSG_WHISPER, fromPlayer)))
return;
if (type == CHAT_MSG_RAID_WARNING && filtered.find(bot->GetName()) != std::string::npos &&