From 691d21c1e4fe997f03294ea770b2309b32a36baf Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期四, 30 八月 2018 18:00:07 +0800
Subject: [PATCH] 3098 去除最近服的测试代码
---
System/Login/ServerListCenter.cs | 92 +++++++++++++++++++++++++---------------------
1 files changed, 50 insertions(+), 42 deletions(-)
diff --git a/System/Login/ServerListCenter.cs b/System/Login/ServerListCenter.cs
index a2c1ada..67db903 100644
--- a/System/Login/ServerListCenter.cs
+++ b/System/Login/ServerListCenter.cs
@@ -1,11 +1,11 @@
-锘縰sing System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using LitJson;
-using System;
-using Snxxz.UI;
-using TableConfig;
-
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using LitJson;
+using System;
+using Snxxz.UI;
+using TableConfig;
+
public class ServerListCenter : Singleton<ServerListCenter>
{
public static readonly string[] JUMP_URL = new string[] { "http://pub.game.2460web.com:11000/server_list/?"
@@ -18,9 +18,11 @@
public ServerInfoCommon serverInfoCommon { get; private set; }
ServerData m_CurrentServer;
- public ServerData currentServer {
+ public ServerData currentServer
+ {
get { return m_CurrentServer; }
- set {
+ set
+ {
m_CurrentServer = value;
m_SelectedServer = true;
@@ -34,11 +36,14 @@
}
string m_CurrentServerGroup = string.Empty;
- public string currentServerGroup {
- get {
+ public string currentServerGroup
+ {
+ get
+ {
return m_CurrentServerGroup;
}
- set {
+ set
+ {
if (m_CurrentServerGroup != value)
{
m_CurrentServerGroup = value;
@@ -55,28 +60,32 @@
bool serverListPlayerPartGot = false;
bool serverListCommonPartGot = false;
- public bool serverListGot {
+ public bool serverListGot
+ {
get { return serverListCommonPartGot; }
}
string accountNameBuf;
- public event Action onServerListRefreshEvent;
- public event Action serverGroupSelectEvent;
+ public event Action onServerListRefreshEvent;
+ public event Action serverGroupSelectEvent;
public event Action serverSelectEvent;
const string LOGIN_SERVER = "LoginServer";
- public int localSaveServerId {
- get {
+ public int localSaveServerId
+ {
+ get
+ {
return LocalSave.GetInt(LOGIN_SERVER);
}
- set {
+ set
+ {
LocalSave.SetInt(LOGIN_SERVER, value);
}
- }
-
- int jumpUrlIndex = 0;
-
+ }
+
+ int jumpUrlIndex = 0;
+
public ServerData GetServerData(int _id)
{
if (serverInfoPlayer != null && serverInfoPlayer.player != null && serverInfoPlayer.player.group_list != null)
@@ -136,8 +145,8 @@
var url = StringUtility.Contact(JUMP_URL[jumpUrlIndex % 2], "flag=", VersionConfig.Get().appId, "_", VersionConfig.Get().branch, "_", VersionConfig.Get().version);
jumpUrlIndex++;
HttpRequest.Instance.RequestHttpGet(url, HttpRequest.defaultHttpContentType, 1, OnRequestJumpUrl);
- }
-
+ }
+
private void OnRequestJumpUrl(bool _ok, string _result)
{
if (_ok)
@@ -152,8 +161,8 @@
{
Clock.Create(DateTime.Now + new TimeSpan(TimeSpan.TicksPerSecond), RequestJumpUrl);
}
- }
-
+ }
+
public void RequestServerList()
{
serverListCommonPartGot = false;
@@ -213,7 +222,6 @@
public void RequestServerListPlayer(string _accountName)
{
- _accountName = "alee18";
accountNameBuf = _accountName;
var url = string.Empty;
var tables = new Dictionary<string, string>();
@@ -229,8 +237,8 @@
}
HttpRequest.Instance.RequestHttpGet(url, HttpRequest.defaultHttpContentType, 1, OnGetServerListPlayer);
- }
-
+ }
+
private void OnGetServerListPlayer(bool _ok, string _result)
{
if (_ok)
@@ -250,8 +258,8 @@
});
}
}
- }
-
+ }
+
public bool TryGetServerGroup(string _key, out ServerGroup _group)
{
if (serverInfoPlayer != null && serverInfoPlayer.player != null && _key == serverInfoPlayer.player.group_title)
@@ -283,8 +291,8 @@
_group = null;
return false;
- }
-
+ }
+
public List<string> GetAllServerGroup()
{
var serverGroupTitles = new List<string>();
@@ -310,9 +318,9 @@
}
return serverGroupTitles;
- }
-
-
+ }
+
+
private void ProcessRecentServerData()
{
if (serverInfoPlayer != null && serverInfoPlayer.player != null && serverInfoCommon != null)
@@ -350,8 +358,8 @@
group.Sort(ServerData.LastLoginTimeCompare);
serverInfoPlayer.player.group_list = group.ToArray();
}
- }
-
+ }
+
private void FiltrateDefaultServerAndServerGroup()
{
if (serverInfoPlayer != null && serverInfoPlayer.player != null && serverInfoPlayer.player.group_list != null && serverInfoPlayer.player.group_list.Length > 0)
@@ -394,6 +402,6 @@
}
- }
-
-}
+ }
+
+}
--
Gitblit v1.8.0