mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Dungeon Finder: Added condition to avoid unnecessary checks to the joining result.
This commit is contained in:
@@ -539,14 +539,18 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon
|
||||
}
|
||||
}
|
||||
|
||||
// Expand random dungeons and check restrictions
|
||||
if (rDungeonId)
|
||||
dungeons = GetDungeonsByRandom(rDungeonId);
|
||||
// it could be changed
|
||||
if (joinData.result == LFG_JOIN_OK)
|
||||
{
|
||||
// Expand random dungeons and check restrictions
|
||||
if (rDungeonId)
|
||||
dungeons = GetDungeonsByRandom(rDungeonId);
|
||||
|
||||
// if we have lockmap then there are no compatible dungeons
|
||||
GetCompatibleDungeons(dungeons, players, joinData.lockmap);
|
||||
if (dungeons.empty())
|
||||
joinData.result = grp ? LFG_JOIN_PARTY_NOT_MEET_REQS : LFG_JOIN_NOT_MEET_REQS;
|
||||
// if we have lockmap then there are no compatible dungeons
|
||||
GetCompatibleDungeons(dungeons, players, joinData.lockmap);
|
||||
if (dungeons.empty())
|
||||
joinData.result = grp ? LFG_JOIN_PARTY_NOT_MEET_REQS : LFG_JOIN_NOT_MEET_REQS;
|
||||
}
|
||||
}
|
||||
|
||||
// Can't join. Send result
|
||||
|
||||
Reference in New Issue
Block a user