mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Dungeon Finder: fixed logic in dungeon selection
Random number should be generated only once.
This commit is contained in:
@@ -931,7 +931,8 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal)
|
|||||||
// Select a random dungeon from the compatible list
|
// Select a random dungeon from the compatible list
|
||||||
// TODO - Select the dungeon based on group item Level, not just random
|
// TODO - Select the dungeon based on group item Level, not just random
|
||||||
LfgDungeonSet::const_iterator itDungeon = compatibleDungeons.begin();
|
LfgDungeonSet::const_iterator itDungeon = compatibleDungeons.begin();
|
||||||
for (uint8 i = 0; i < urand(0, compatibleDungeons.size() - 1); ++i)
|
uint8 rand = urand(0, compatibleDungeons.size() - 1);
|
||||||
|
for (uint8 i = 0; i < rand; ++i)
|
||||||
++itDungeon;
|
++itDungeon;
|
||||||
|
|
||||||
// Create a new proposal
|
// Create a new proposal
|
||||||
|
|||||||
Reference in New Issue
Block a user