Core/LFG: Add convenience function to get which random dungeon was selected by queued player
Port From (https://github.com/TrinityCore/TrinityCore/commit/84a0b5569552a9f5a6074d102135933b9a4a52f4)
This commit is contained in:
@@ -1486,6 +1486,22 @@ namespace Game.DungeonFinding
|
||||
return PlayersStore[guid].GetSelectedDungeons();
|
||||
}
|
||||
|
||||
public uint GetSelectedRandomDungeon(ObjectGuid guid)
|
||||
{
|
||||
if (GetState(guid) != LfgState.None)
|
||||
{
|
||||
var dungeons = GetSelectedDungeons(guid);
|
||||
if (!dungeons.Empty())
|
||||
{
|
||||
LFGDungeonData dungeon = GetLFGDungeon(dungeons.First());
|
||||
if (dungeon != null && dungeon.type == LfgType.Raid)
|
||||
return dungeons.First();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Dictionary<uint, LfgLockInfoData> GetLockedDungeons(ObjectGuid guid)
|
||||
{
|
||||
Dictionary<uint, LfgLockInfoData> lockDic = new Dictionary<uint, LfgLockInfoData>();
|
||||
|
||||
Reference in New Issue
Block a user