diff options
-rwxr-xr-x | src/server/game/DungeonFinding/LFGMgr.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index c2da032ccdf..9e9603dc5fe 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -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); |