// Token: 0x06002016 RID: 8214 RVA: 0x00096C74 File Offset: 0x00094E74 public override void OnLobbiesUpdated() { base.OnLobbiesUpdated(); if (SteamLobbyFinder.steamClient.IsValid) { List <LobbyList.Lobby> lobbies = SteamLobbyFinder.steamClient.LobbyList.Lobbies; List <LobbyList.Lobby> list = new List <LobbyList.Lobby>(); ulong currentLobby = SteamLobbyFinder.steamClient.Lobby.CurrentLobby; bool isValid = SteamLobbyFinder.steamClient.Lobby.IsValid; int currentLobbySize = isValid ? SteamLobbyFinder.GetCurrentLobbyRealPlayerCount() : LocalUserManager.readOnlyLocalUsersList.Count; if (SteamworksLobbyManager.ownsLobby || !isValid) { for (int i = 0; i < lobbies.Count; i++) { if ((!isValid || lobbies[i].LobbyID < currentLobby) && SteamLobbyFinder.CanJoinLobby(currentLobbySize, lobbies[i])) { list.Add(lobbies[i]); } } if (list.Count > 0) { SteamworksLobbyManager.JoinLobby(new CSteamID(list[0].LobbyID)); } } Debug.LogFormat("Found {0} lobbies, {1} joinable.", new object[] { lobbies.Count, list.Count }); } }
// Token: 0x06002015 RID: 8213 RVA: 0x00096BC4 File Offset: 0x00094DC4 public override void Update() { base.Update(); if (SteamworksLobbyManager.hasMinimumPlayerCount) { this.outer.SetNextState(new SteamLobbyFinder.LobbyStateMultiSearch()); return; } if (this.lobbyFinder.refreshTimer <= 0f) { if (base.age >= this.lobbyFinder.joinOnlyDuration && SteamLobbyFinder.steamClient.Lobby.LobbyType != Lobby.Type.Public) { Debug.LogFormat("Unable to find joinable lobby after {0} seconds. Setting lobby to public.", new object[] { this.lobbyFinder.age }); SteamLobbyFinder.steamClient.Lobby.LobbyType = Lobby.Type.Public; } this.lobbyFinder.refreshTimer = this.lobbyFinder.refreshInterval; SteamLobbyFinder.RequestLobbyListRefresh(); } }
// Token: 0x06001FFB RID: 8187 RVA: 0x000966B0 File Offset: 0x000948B0 private static bool CanJoinLobby(int currentLobbySize, LobbyList.Lobby lobby) { return(currentLobbySize + SteamLobbyFinder.GetRealLobbyPlayerCount(lobby) < lobby.MemberLimit); }