From 234b7db8b5c8e32fcaf9090c856d22ce30b007bc Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Wed, 26 Jul 2023 13:58:20 +0800 Subject: [PATCH] lfg related --- src/PlayerbotSecurity.cpp | 18 +++++++++--------- src/strategy/actions/LfgActions.cpp | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/PlayerbotSecurity.cpp b/src/PlayerbotSecurity.cpp index af0edb3a..8ba538e9 100644 --- a/src/PlayerbotSecurity.cpp +++ b/src/PlayerbotSecurity.cpp @@ -36,16 +36,16 @@ PlayerbotSecurityLevel PlayerbotSecurity::LevelFor(Player* from, DenyReason* rea return PLAYERBOT_SECURITY_DENY_ALL; } - if (sLFGMgr->GetState(bot->GetGUID()) != lfg::LFG_STATE_NONE) - { - if (!bot->GetGuildId() || bot->GetGuildId() != from->GetGuildId()) - { - if (reason) - *reason = PLAYERBOT_DENY_LFG; + // if (sLFGMgr->GetState(bot->GetGUID()) != lfg::LFG_STATE_NONE) + // { + // if (!bot->GetGuildId() || bot->GetGuildId() != from->GetGuildId()) + // { + // if (reason) + // *reason = PLAYERBOT_DENY_LFG; - return PLAYERBOT_SECURITY_TALK; - } - } + // return PLAYERBOT_SECURITY_TALK; + // } + // } Group* group = from->GetGroup(); if (group) diff --git a/src/strategy/actions/LfgActions.cpp b/src/strategy/actions/LfgActions.cpp index 86f9cd47..a5f5eaec 100644 --- a/src/strategy/actions/LfgActions.cpp +++ b/src/strategy/actions/LfgActions.cpp @@ -250,8 +250,8 @@ bool LfgRoleCheckAction::Execute(Event event) { uint32 currentRoles = sLFGMgr->GetRoles(bot->GetGUID()); uint32 newRoles = GetRoles(); - // if (currentRoles == newRoles) - // return false; + if (currentRoles == newRoles) + return false; sLFGMgr->SetRoles(bot->GetGUID(), newRoles);