Exemplo n.º 1
0
 public void RefreshServerPlayerList(HeathenGameServerBrowserEntery target)
 {
     CancelServerQuery();
     queryTarget = target;
     playersListWorking.Clear();
     m_ServerQuery = SteamMatchmakingServers.PlayerDetails(target.address.GetIP(), target.address.GetQueryPort(), m_PlayersResponse);
 }
Exemplo n.º 2
0
        public void PingServer(HeathenGameServerBrowserEntery target)
        {
            CancelServerQuery();
            queryTarget = target;

            m_ServerQuery = SteamMatchmakingServers.PlayerDetails(target.address.GetIP(), target.address.GetQueryPort(), m_PlayersResponse);
        }
Exemplo n.º 3
0
 public void RefreshServerRules(HeathenGameServerBrowserEntery target)
 {
     CancelServerQuery();
     queryTarget = target;
     rulesListWorking.Clear();
     m_ServerQuery = SteamMatchmakingServers.ServerRules(target.address.GetIP(), target.address.GetQueryPort(), m_RulesResponse);
 }
Exemplo n.º 4
0
        private void OnRefreshComplete(HServerListRequest hRequest, EMatchMakingServerResponse response)
        {
            Debug.Log("OnRefreshComplete: " + hRequest + " - " + response);
            List <HeathenGameServerBrowserEntery> serverResults = new List <HeathenGameServerBrowserEntery>();
            var count = SteamMatchmakingServers.GetServerCount(hRequest);

            for (int i = 0; i < count; i++)
            {
                var serverItem = SteamMatchmakingServers.GetServerDetails(hRequest, i);

                if (serverItem.m_steamID.m_SteamID != 0 && serverItem.m_nAppID == steamSettings.applicationId.m_AppId)
                {
                    var entry = new HeathenGameServerBrowserEntery();
                    entry.FromGameServerItem(serverItem);
                    serverResults.Add(entry);
                }
            }
            ReleaseRequest();
            Debug.Log(serverResults.Count.ToString() + " Servers Found");

            switch (searchType)
            {
            case SearchType.Internet:
                InternetServers.Clear();
                InternetServers = serverResults;
                InternetServerListUpdated.Invoke();
                break;

            case SearchType.Favorites:
                FavoritesServers.Clear();
                FavoritesServers = serverResults;
                FavoriteServerListUpdated.Invoke();
                break;

            case SearchType.Friends:
                FriendsServers.Clear();
                FriendsServers = serverResults;
                FriendsServerListUpdated.Invoke();
                break;

            case SearchType.LAN:
                LANServers.Clear();
                LANServers = serverResults;
                LANServerListUpdated.Invoke();
                break;

            case SearchType.Spectator:
                SpectatorServers.Clear();
                SpectatorServers = serverResults;
                SpectatorServerListUpdated.Invoke();
                break;

            case SearchType.History:
                HistoryServers.Clear();
                HistoryServers = serverResults;
                HistoryServerListUpdated.Invoke();
                break;

            default:
                break;
            }

            ServerRefreshCompleted.Invoke();
        }
Exemplo n.º 5
0
 public void RefreshServerData(HeathenGameServerBrowserEntery target)
 {
     PingServer(target);
 }