示例#1
0
        // Token: 0x0600007A RID: 122 RVA: 0x0000CEE4 File Offset: 0x0000B0E4
        public static int CheckLobby(ulong Id)
        {
            DebugTools.Print("Begin lobby Check (" + Id + ")");
            SteamData.GetLobbyList();
            int lobbyIndex = SteamData.GetLobbyIndex(Id);

            if (lobbyIndex == -1)
            {
                DebugTools.Print("Lobby Check: The lobby does not exist.");
                return(1);
            }
            if (Id == GameData.lobbyId && GameData.onlinePlayerCount > 0)
            {
                DebugTools.Print("Lobby Check: You are in this lobby.");
                return(0);
            }
            SteamData.GetLobbyPlayers(Id);
            if (SteamData.playerCount < 0)
            {
                return(SteamData.playerCount);
            }
            DebugTools.Write("Lobby Check: ");
            if (SteamData.lobbyFriendCount == 0 && SteamData.LobbyList[lobbyIndex].typeId == 3)
            {
                Debug.Print("You do not have permission to join this lobby.");
                return(2);
            }
            if (SteamData.lobbyBanCount > 0)
            {
                Debug.Print("This lobby contains a banned player.");
                return(3);
            }
            Debug.Print("No issues.");
            return(4);
        }
示例#2
0
 // Token: 0x06000071 RID: 113 RVA: 0x0000C993 File Offset: 0x0000AB93
 public static void Init()
 {
     DebugTools.Print("Startup: Initialising Steam data.");
     SteamData.GetFriendList();
     if (SteamData.errorCode == 0)
     {
         SteamData.GetLobbyList();
     }
 }
示例#3
0
 // Token: 0x06000005 RID: 5 RVA: 0x000022C4 File Offset: 0x000004C4
 public void RefreshList()
 {
     DebugTools.Print("Request: Refresh all lobbies list.");
     this.ButtonRefreshList.Enabled = false;
     this.ButtonRefreshList.Text    = "Refreshing...";
     this.ButtonRefreshList.Update();
     SteamData.GetLobbyList();
     this.UpdateStatic();
     this.ButtonRefreshList.Enabled = true;
     this.ButtonRefreshList.Text    = "Refresh List";
     this.ButtonRefreshList.Update();
 }