Core/Dungeon Finder: Added condition to avoid unnecessary checks to the joining result.

This commit is contained in:
Manuel Carrasco
2011-08-05 21:47:12 -03:00
parent 5b0b53a8c0
commit 763d59aeec
+11 -7
View File
@@ -539,14 +539,18 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon
} }
} }
// Expand random dungeons and check restrictions // it could be changed
if (rDungeonId) if (joinData.result == LFG_JOIN_OK)
dungeons = GetDungeonsByRandom(rDungeonId); {
// Expand random dungeons and check restrictions
if (rDungeonId)
dungeons = GetDungeonsByRandom(rDungeonId);
// if we have lockmap then there are no compatible dungeons // if we have lockmap then there are no compatible dungeons
GetCompatibleDungeons(dungeons, players, joinData.lockmap); GetCompatibleDungeons(dungeons, players, joinData.lockmap);
if (dungeons.empty()) if (dungeons.empty())
joinData.result = grp ? LFG_JOIN_PARTY_NOT_MEET_REQS : LFG_JOIN_NOT_MEET_REQS; joinData.result = grp ? LFG_JOIN_PARTY_NOT_MEET_REQS : LFG_JOIN_NOT_MEET_REQS;
}
} }
// Can't join. Send result // Can't join. Send result