mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Dungeon Finder: Better solution for 24bb62e (fixed logic in dungeon selection)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user