fix(Core/LFG): Fixed showing dungeon access requirements only for lea… (#14116)

fix(Core/LFG): Fixed showing dungeon access requirements only for leaders in LFG.

Fixes #14070
This commit is contained in:
UltraNix
2022-12-25 14:17:15 +01:00
committed by GitHub
parent 2e001e7a6d
commit 49ad7402d9
4 changed files with 32 additions and 23 deletions

View File

@@ -36,7 +36,7 @@ namespace lfg
if (!sLFGMgr->isOptionEnabled(LFG_OPTION_ENABLE_DUNGEON_FINDER | LFG_OPTION_ENABLE_RAID_BROWSER | LFG_OPTION_ENABLE_SEASONAL_BOSSES))
return;
sLFGMgr->InitializeLockedDungeons(player);
sLFGMgr->InitializeLockedDungeons(player, player->GetGroup());
}
void LFGPlayerScript::OnLogout(Player* player)
@@ -68,7 +68,8 @@ namespace lfg
ObjectGuid guid = player->GetGUID();
ObjectGuid gguid = sLFGMgr->GetGroup(guid);
if (Group const* group = player->GetGroup())
Group const* group = player->GetGroup();
if (group)
{
ObjectGuid gguid2 = group->GetGUID();
if (gguid != gguid2)
@@ -77,7 +78,7 @@ namespace lfg
}
}
sLFGMgr->InitializeLockedDungeons(player);
sLFGMgr->InitializeLockedDungeons(player, group);
sLFGMgr->SetTeam(player->GetGUID(), player->GetTeamId());
// TODO - Restore LfgPlayerData and send proper status to player if it was in a group
}
@@ -86,7 +87,7 @@ namespace lfg
{
MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
if (mapEntry->IsDungeon() && difficulty > DUNGEON_DIFFICULTY_NORMAL)
sLFGMgr->InitializeLockedDungeons(player);
sLFGMgr->InitializeLockedDungeons(player, player->GetGroup());
}
void LFGPlayerScript::OnMapChanged(Player* player)