Returns the dungeonID of the random dungeon group that provides the best loot for the player.. The dungeonID that is returned refers to an integer found in LFGDungeons.dbc.

This function is normally used only for initialization of the LFGQueueFrame in FrameXML LFDFrame.lua. You can programatically join the suggested queue for a random dungeon for which your character is eligible.


See also Looking for group functions.

Signature:

GetRandomDungeonBestChoice()

Examples:

--Set the currently selected LFG choice to the suggested random dungeon group
LFDQueueFrame.type = GetRandomDungeonBestChoice();

--Ensure that the GUI is updated to reflect the change
UIDropDownMenu_SetSelectedValue(LFDQueueFrameTypeDropDown,LFDQueueFrame.type);
LFDQueueFrame_SetTypeRandomDungeon();
LFDQueueFrameRandom_UpdateFrame();

--Toggle the LFG mode between active and inactive
if not GetLFGMode() then
  ClearAllLFGDungeons();
  SetLFGDungeon(LFDQueueFrame.type);
  JoinLFG();
else
  LeaveLFG();
end;