mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
fix(Core/LFG): Random Dungeon Finder should ignore heroic dungeon locks (#24021)
This commit is contained in:
@@ -688,7 +688,7 @@ namespace lfg
|
||||
// xinef: dont check compatibile dungeons for already running group (bind problems)
|
||||
if (!isContinue)
|
||||
{
|
||||
GetCompatibleDungeons(dungeons, players, joinData.lockmap);
|
||||
GetCompatibleDungeons(dungeons, players, joinData.lockmap, rDungeonId);
|
||||
if (dungeons.empty())
|
||||
joinData.result = grp ? LFG_JOIN_PARTY_NOT_MEET_REQS : LFG_JOIN_NOT_MEET_REQS;
|
||||
}
|
||||
@@ -1485,7 +1485,7 @@ namespace lfg
|
||||
@param[in] players Set of players to check their dungeon restrictions
|
||||
@param[out] lockMap Map of players Lock status info of given dungeons (Empty if dungeons is not empty)
|
||||
*/
|
||||
void LFGMgr::GetCompatibleDungeons(LfgDungeonSet& dungeons, LfgGuidSet const& players, LfgLockPartyMap& lockMap)
|
||||
void LFGMgr::GetCompatibleDungeons(LfgDungeonSet& dungeons, LfgGuidSet const& players, LfgLockPartyMap& lockMap, bool isRDF)
|
||||
{
|
||||
lockMap.clear();
|
||||
for (LfgGuidSet::const_iterator it = players.begin(); it != players.end() && !dungeons.empty(); ++it)
|
||||
@@ -1496,6 +1496,9 @@ namespace lfg
|
||||
{
|
||||
uint32 dungeonId = (it2->first & 0x00FFFFFF); // Compare dungeon ids
|
||||
|
||||
if (it2->second == LFG_LOCKSTATUS_RAID_LOCKED && isRDF)
|
||||
continue;
|
||||
|
||||
LfgDungeonSet::iterator itDungeon = dungeons.find(dungeonId);
|
||||
if (itDungeon != dungeons.end())
|
||||
{
|
||||
@@ -1762,11 +1765,9 @@ namespace lfg
|
||||
else
|
||||
{
|
||||
// RDF removes all binds to that map
|
||||
if (randomDungeon && !sInstanceSaveMgr->PlayerIsPermBoundToInstance(player->GetGUID(), dungeon->map, player->GetDungeonDifficulty()))
|
||||
{
|
||||
if (randomDungeon)
|
||||
sInstanceSaveMgr->PlayerUnbindInstance(player->GetGUID(), dungeon->map, player->GetDungeonDifficulty(), true);
|
||||
}
|
||||
}
|
||||
|
||||
playersTeleported.push_back(player);
|
||||
}
|
||||
|
||||
@@ -589,7 +589,7 @@ namespace lfg
|
||||
void DecreaseKicksLeft(ObjectGuid guid);
|
||||
void SetState(ObjectGuid guid, LfgState state);
|
||||
void SetCanOverrideRBState(ObjectGuid guid, bool val);
|
||||
void GetCompatibleDungeons(LfgDungeonSet& dungeons, LfgGuidSet const& players, LfgLockPartyMap& lockMap);
|
||||
void GetCompatibleDungeons(LfgDungeonSet& dungeons, LfgGuidSet const& players, LfgLockPartyMap& lockMap, bool isRDF = false);
|
||||
void _SaveToDB(ObjectGuid guid);
|
||||
LFGDungeonData const* GetLFGDungeon(uint32 id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user