Exemplo n.º 1
0
 private void FinalizeRequest(bool forDisable = false)
 {
     SteamMatchmakingServers.ReleaseRequest(this._request);
     this._response = null;
     if (this._spinner)
     {
         this._spinner.SetActive(false);
     }
     if (!forDisable)
     {
         foreach (MpGameRow mpGameRow in this._rows)
         {
             MpDedicatedServerRow mpDedicatedServerRow = (MpDedicatedServerRow)mpGameRow;
             if (mpDedicatedServerRow)
             {
                 UITweener componentInChildren = mpDedicatedServerRow._VACProtected.GetComponentInChildren <UITweener>();
                 if (componentInChildren)
                 {
                     componentInChildren.enabled = true;
                 }
             }
         }
         this._mainUI._gameBrowserScreenDS._grid.repositionNow = true;
         this._mainUI._gameBrowserScreenDS._scrollview.UpdateScrollbars();
         this.CheckValidScrollBar();
     }
 }
Exemplo n.º 2
0
 private MpDedicatedServerRow GetRow()
 {
     if (this._rowsPool.Count > 0)
     {
         MpDedicatedServerRow mpDedicatedServerRow = this._rowsPool.Dequeue();
         if (mpDedicatedServerRow)
         {
             return(mpDedicatedServerRow);
         }
     }
     return(UnityEngine.Object.Instantiate <MpDedicatedServerRow>(this._rowPrefab, this._mainUI._gameBrowserScreenDS._grid.transform));
 }
Exemplo n.º 3
0
    private void ProcessServerResponded(HServerListRequest hRequest, int iServer)
    {
        this.listCount++;
        gameserveritem_t serverDetails = SteamMatchmakingServers.GetServerDetails(hRequest, iServer);

        if (serverDetails.m_nAppID == 242760u || serverDetails.m_nAppID == 556450u)
        {
            MpDedicatedServerRow mpDedicatedServerRow = UnityEngine.Object.Instantiate <MpDedicatedServerRow>(this._rowPrefab);
            mpDedicatedServerRow.transform.parent     = this._mainUI._gameBrowserScreenDS._grid.transform;
            mpDedicatedServerRow.transform.localScale = this._rowPrefab.transform.localScale;
            mpDedicatedServerRow.gameObject.SetActive(true);
            this._previusInstantiateServerRowIsFinished = true;
            mpDedicatedServerRow._gameName.text         = serverDetails.GetServerName();
            mpDedicatedServerRow._ip.text   = serverDetails.m_NetAdr.GetConnectionAddressString();
            mpDedicatedServerRow._ping.text = serverDetails.m_nPing + "ms";
            mpDedicatedServerRow._VACProtected.SetActive(serverDetails.m_bSecure);
            mpDedicatedServerRow._passwordProtected.SetActive(serverDetails.m_bPassword);
            mpDedicatedServerRow.Server            = serverDetails;
            mpDedicatedServerRow._playerLimit.text = string.Format("{0} / {1}", serverDetails.m_nPlayers, serverDetails.m_nMaxPlayers);
            this._rows.Add(mpDedicatedServerRow);
            string[] array = serverDetails.GetGameTags().Split(new char[]
            {
                ';'
            });
            string item = (array == null || array.Length <= 0) ? string.Empty : array[0];
            string a    = (array == null || array.Length <= 1) ? "-1" : array[1];
            bool   flag = a != "__F486E3E06B8E13E0388571BE0FDC8A35182D8BE83E9256BA53BC5FBBDBCF23BC";
            mpDedicatedServerRow._versionMismatch = flag;
            mpDedicatedServerRow._prefabDbVersionMissmatch.SetActive(flag);
            mpDedicatedServerRow._previousPlayed = this._mainUI.PreviouslyPlayedServers.Contains(item);
            mpDedicatedServerRow.RefreshName(this._sortOptions);
            bool flag2 = !string.IsNullOrEmpty(this._mainUI._gameBrowserScreenDS._filter.value);
            if (flag2)
            {
                string value = this._mainUI._gameBrowserScreenDS._filter.value.ToLowerInvariant();
                bool   flag3 = mpDedicatedServerRow._gameName.text.ToLowerInvariant().Contains(value);
                if (mpDedicatedServerRow.gameObject.activeSelf != flag3)
                {
                    mpDedicatedServerRow.transform.parent = ((!flag3) ? this._mainUI._gameBrowserScreenDS._grid.transform.parent : this._mainUI._gameBrowserScreenDS._grid.transform);
                    mpDedicatedServerRow.gameObject.SetActive(flag3);
                }
            }
            else if (!mpDedicatedServerRow.gameObject.activeSelf)
            {
                mpDedicatedServerRow.transform.parent = this._mainUI._gameBrowserScreenDS._grid.transform;
                mpDedicatedServerRow.gameObject.SetActive(true);
            }
            this._mainUI._gameBrowserScreenDS._grid.repositionNow = true;
            this._mainUI._gameBrowserScreenDS._scrollview.UpdateScrollbars();
        }
    }
Exemplo n.º 4
0
    private void SortByNotSecure(MpGameRow row)
    {
        MpDedicatedServerRow mpDedicatedServerRow = (MpDedicatedServerRow)row;

        if (mpDedicatedServerRow)
        {
            if (!mpDedicatedServerRow._VACProtected)
            {
                MpDedicatedServerRow mpDedicatedServerRow2 = mpDedicatedServerRow;
                mpDedicatedServerRow2.name += "0";
            }
            else
            {
                MpDedicatedServerRow mpDedicatedServerRow3 = mpDedicatedServerRow;
                mpDedicatedServerRow3.name += "1";
            }
        }
    }
Exemplo n.º 5
0
    private void SortByNoVersionMismatch(MpGameRow row)
    {
        MpDedicatedServerRow mpDedicatedServerRow = (MpDedicatedServerRow)row;

        if (mpDedicatedServerRow)
        {
            if (!mpDedicatedServerRow._versionMismatch)
            {
                MpDedicatedServerRow mpDedicatedServerRow2 = mpDedicatedServerRow;
                mpDedicatedServerRow2.name += "0";
            }
            else
            {
                MpDedicatedServerRow mpDedicatedServerRow3 = mpDedicatedServerRow;
                mpDedicatedServerRow3.name += "1";
            }
        }
    }
Exemplo n.º 6
0
    private void SortByPasswordProtected(MpGameRow row)
    {
        MpDedicatedServerRow mpDedicatedServerRow = (MpDedicatedServerRow)row;

        if (mpDedicatedServerRow)
        {
            if (mpDedicatedServerRow._passwordProtected)
            {
                MpDedicatedServerRow mpDedicatedServerRow2 = mpDedicatedServerRow;
                mpDedicatedServerRow2.name += "0";
            }
            else
            {
                MpDedicatedServerRow mpDedicatedServerRow3 = mpDedicatedServerRow;
                mpDedicatedServerRow3.name += "1";
            }
        }
    }
Exemplo n.º 7
0
    private void SortByNoPlayers(MpGameRow row)
    {
        MpDedicatedServerRow mpDedicatedServerRow = (MpDedicatedServerRow)row;

        if (mpDedicatedServerRow)
        {
            if (mpDedicatedServerRow.Server.m_nPlayers == 0)
            {
                MpDedicatedServerRow mpDedicatedServerRow2 = mpDedicatedServerRow;
                mpDedicatedServerRow2.name += "0";
            }
            else
            {
                MpDedicatedServerRow mpDedicatedServerRow3 = mpDedicatedServerRow;
                mpDedicatedServerRow3.name += "1";
            }
        }
    }
Exemplo n.º 8
0
    private void ProcessServerData(gameserveritem_t server)
    {
        this._processedServers++;
        MpDedicatedServerRow row = this.GetRow();

        row._gameName.text = server.GetServerName();
        row._ping.text     = server.m_nPing + "ms";
        if (row._passwordProtected.activeSelf != server.m_bPassword)
        {
            row._passwordProtected.SetActive(server.m_bPassword);
        }
        row.Server            = server;
        row._playerLimit.text = string.Format("{0} / {1}", server.m_nPlayers, server.m_nMaxPlayers);
        this._rows.Add(row);
        string[] array = server.GetGameTags().Split(new char[]
        {
            ';'
        });
        string item = (array == null || array.Length <= 0) ? string.Empty : array[0];
        string a    = (array == null || array.Length <= 1) ? "-1" : array[1];
        bool   flag = a != "__E3C26D06F07B6AB14EC25F4823E9A30D6B4ED0450527C1E768739D96C9F061AE";

        row._versionMismatch = flag;
        if (row._prefabDbVersionMissmatch.activeSelf != flag)
        {
            row._prefabDbVersionMissmatch.SetActive(flag);
        }
        row._previousPlayed = this._mainUI.PreviouslyPlayedServers.Contains(item);
        row.RefreshName(this._sortOptions);
        bool flag2 = !string.IsNullOrEmpty(this._lastFilterValue);

        if (flag2)
        {
            bool flag3 = row._gameName.text.ToLowerInvariant().Contains(this._lastFilterValue);
            if (row.gameObject.activeInHierarchy != flag3)
            {
                row.transform.SetParent((!flag3) ? this._offGridRows.transform : this._mainUI._gameBrowserScreenDS._grid.transform);
            }
        }
        else if (!row.gameObject.activeInHierarchy)
        {
            row.transform.SetParent(this._mainUI._gameBrowserScreenDS._grid.transform);
        }
    }