fix lfg action

This commit is contained in:
Yunfan Li
2023-07-26 13:29:57 +08:00
parent a2045d6d76
commit b5508f7595

View File

@@ -250,12 +250,12 @@ bool LfgRoleCheckAction::Execute(Event event)
{ {
uint32 currentRoles = sLFGMgr->GetRoles(bot->GetGUID()); uint32 currentRoles = sLFGMgr->GetRoles(bot->GetGUID());
uint32 newRoles = GetRoles(); uint32 newRoles = GetRoles();
if (currentRoles == newRoles) // if (currentRoles == newRoles)
return false; // return false;
sLFGMgr->SetRoles(bot->GetGUID(), newRoles); sLFGMgr->SetRoles(bot->GetGUID(), newRoles);
sLFGMgr->UpdateRoleCheck(group->GetGUID()); sLFGMgr->UpdateRoleCheck(group->GetGUID(), bot->GetGUID(), newRoles);
LOG_INFO("playerbots", "Bot {} {}:{} <{}>: LFG roles checked", LOG_INFO("playerbots", "Bot {} {}:{} <{}>: LFG roles checked",
bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName().c_str()); bot->GetGUID().ToString().c_str(), bot->GetTeamId() == TEAM_ALLIANCE ? "A" : "H", bot->getLevel(), bot->GetName().c_str());