Core/Dungeon Finder: Better solution for 24bb62e (fixed logic in dungeon selection)

This commit is contained in:
Spp
2011-08-05 12:51:36 +02:00
parent 4ecda557e4
commit 287b9e423c

View File

@@ -931,9 +931,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal)
// Select a random dungeon from the compatible list
// TODO - Select the dungeon based on group item Level, not just random
LfgDungeonSet::const_iterator itDungeon = compatibleDungeons.begin();
uint8 rand = urand(0, compatibleDungeons.size() - 1);
for (uint8 i = 0; i < rand; ++i)
++itDungeon;
std::advance(itDungeon, urand(0, compatibleDungeons.size() - 1));
// Create a new proposal
pProposal = new LfgProposal(*itDungeon);