From 5204af3c6acb3a55af1aa3ec037bac3c00d2be7e Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期六, 29 九月 2018 21:18:53 +0800
Subject: [PATCH] 3335 ios打包添加appstore审核期限,在这个期限内,不访问后台
---
Core/GameEngine/Model/Config/LoginSeverListConfig.cs.meta | 12 +++
Core/GameEngine/Model/ConfigManager.cs | 3
System/Login/ServerData.cs | 17 ++++
Core/GameEngine/Login/LoginStage.cs | 5 +
Core/GameEngine/Login/Launch.cs | 43 ++++++----
System/Login/ServerListCenter.cs | 67 ++++++++++++----
Core/GameEngine/Model/Config/LoginSeverListConfig.cs | 50 ++++++++++++
7 files changed, 160 insertions(+), 37 deletions(-)
diff --git a/Core/GameEngine/Login/Launch.cs b/Core/GameEngine/Login/Launch.cs
index 64c235e..bb44367 100644
--- a/Core/GameEngine/Login/Launch.cs
+++ b/Core/GameEngine/Login/Launch.cs
@@ -119,25 +119,9 @@
break;
}
- m_CurrentStage = LaunchStage.ClientVersion;
- if (!Application.isEditor || InGameDownTestUtility.enable)
- {
- VersionUtility.Instance.RequestVersionCheck();
- progressBuf = progress;
- timer = 0f;
- duration = 1f;
-
- while (!VersionUtility.Instance.completed)
- {
- timer += Time.deltaTime;
- progress = Mathf.Clamp(progressBuf + timer / duration * 0.1f, progressBuf, progressBuf + 0.1f);
- yield return null;
- }
- }
#endif
-#if UNITY_IOS && !UNITY_EDITOR
-
+#if UNITY_ANDROID
if (!VersionUtility.Instance.InIosAuditTime())
{
m_CurrentStage = LaunchStage.ClientVersion;
@@ -156,6 +140,31 @@
}
}
}
+#endif
+
+#if UNITY_IOS
+ if (!VersionUtility.Instance.InIosAuditTime())
+ {
+ m_CurrentStage = LaunchStage.ClientVersion;
+ if (!Application.isEditor || InGameDownTestUtility.enable)
+ {
+ VersionUtility.Instance.RequestVersionCheck();
+ progressBuf = progress;
+ timer = 0f;
+ duration = 1f;
+
+ while (!VersionUtility.Instance.completed)
+ {
+ timer += Time.deltaTime;
+ progress = Mathf.Clamp(progressBuf + timer / duration * 0.1f, progressBuf, progressBuf + 0.1f);
+ yield return null;
+ }
+ }
+ }
+
+#endif
+
+#if UNITY_IOS && !UNITY_EDITOR
if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 1)
{
diff --git a/Core/GameEngine/Login/LoginStage.cs b/Core/GameEngine/Login/LoginStage.cs
index fa5c067..9b767ac 100644
--- a/Core/GameEngine/Login/LoginStage.cs
+++ b/Core/GameEngine/Login/LoginStage.cs
@@ -18,6 +18,11 @@
backGroundWin.ShowLoginEffect();
}
+ if (VersionUtility.Instance.InIosAuditTime())
+ {
+ ServerListCenter.Instance.ParseServerLocalServerList();
+ }
+
if (VersionConfig.Get().isBanShu)
{
WindowCenter.Instance.Open<BanShuLoginWin>(true);
diff --git a/Core/GameEngine/Model/Config/LoginSeverListConfig.cs b/Core/GameEngine/Model/Config/LoginSeverListConfig.cs
new file mode 100644
index 0000000..9d2eaa7
--- /dev/null
+++ b/Core/GameEngine/Model/Config/LoginSeverListConfig.cs
@@ -0,0 +1,50 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Saturday, September 29, 2018
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+
+ public partial class LoginSeverListConfig : ConfigBase {
+
+ public int ID { get ; private set ; }
+ public string ip { get ; private set; }
+ public string pagePort { get ; private set; }
+ public int gatePort { get ; private set ; }
+ public string serverName { get ; private set; }
+
+ public override string getKey()
+ {
+ return ID.ToString();
+ }
+
+ public override void Parse() {
+ try
+ {
+ ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
+
+ ip = rawContents[1].Trim();
+
+ pagePort = rawContents[2].Trim();
+
+ gatePort=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
+
+ serverName = rawContents[4].Trim();
+ }
+ catch (Exception ex)
+ {
+ DebugEx.Log(ex);
+ }
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/Core/GameEngine/Model/Config/LoginSeverListConfig.cs.meta b/Core/GameEngine/Model/Config/LoginSeverListConfig.cs.meta
new file mode 100644
index 0000000..0841cbc
--- /dev/null
+++ b/Core/GameEngine/Model/Config/LoginSeverListConfig.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 26aef6c81733c0440a426102e8c58da7
+timeCreated: 1538225014
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/GameEngine/Model/ConfigManager.cs b/Core/GameEngine/Model/ConfigManager.cs
index 40529d1..24783e0 100644
--- a/Core/GameEngine/Model/ConfigManager.cs
+++ b/Core/GameEngine/Model/ConfigManager.cs
@@ -31,6 +31,7 @@
{
StartSyncTask<PriorBundleConfig>(AssetPath.Resource);
StartSyncTask<PriorLanguageConfig>(AssetPath.Resource);
+ StartSyncTask<LoginSeverListConfig>(AssetPath.Resource);
}
List<ConfigTask> configTasks = new List<ConfigTask>();
@@ -203,7 +204,7 @@
}
}
- var allowTaskCount = completedCount <= 7 ? GetMinWorkingTaskCount() : GetMaxWorkingTaskCount();
+ var allowTaskCount = completedCount <= 8 ? GetMinWorkingTaskCount() : GetMaxWorkingTaskCount();
var workingCount = 0;
for (int i = 0; i < configTasks.Count; i++)
{
diff --git a/System/Login/ServerData.cs b/System/Login/ServerData.cs
index cc0049d..cd5702a 100644
--- a/System/Login/ServerData.cs
+++ b/System/Login/ServerData.cs
@@ -86,6 +86,23 @@
public int level;
public DateTime last_login_time;
+ public ServerData(LoginSeverListConfig config)
+ {
+ region_flag = config.ID;
+ name = config.serverName;
+ running_status = 1;
+ statue = 1;
+ is_recommend = 0;
+ region_domain = config.ip;
+ int.TryParse(config.pagePort, out login_port);
+ game_port = config.gatePort;
+ start_date = DateTime.Now;
+ job = string.Empty;
+ roleid = string.Empty;
+ level = 0;
+ last_login_time = DateTime.Now;
+ }
+
public static int Compare(ServerData _lhs, ServerData _rhs)
{
if (_lhs.is_recommend != _rhs.is_recommend)
diff --git a/System/Login/ServerListCenter.cs b/System/Login/ServerListCenter.cs
index 33da4a9..913e890 100644
--- a/System/Login/ServerListCenter.cs
+++ b/System/Login/ServerListCenter.cs
@@ -18,11 +18,9 @@
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;
@@ -36,14 +34,11 @@
}
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;
@@ -60,8 +55,7 @@
bool serverListPlayerPartGot = false;
bool serverListCommonPartGot = false;
- public bool serverListGot
- {
+ public bool serverListGot {
get { return serverListCommonPartGot; }
}
@@ -72,14 +66,11 @@
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);
}
}
@@ -142,6 +133,11 @@
public void RequestJumpUrl()
{
+ if (VersionUtility.Instance.InIosAuditTime())
+ {
+ return;
+ }
+
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);
@@ -178,6 +174,11 @@
void RequestServerCommonList()
{
+ if (VersionUtility.Instance.InIosAuditTime())
+ {
+ return;
+ }
+
HttpRequest.Instance.RequestHttpGet(SERVERLIST_URL_COMMON, HttpRequest.defaultHttpContentType, 1, OnGetServerList);
}
@@ -222,6 +223,11 @@
public void RequestServerListPlayer(string _accountName)
{
+ if (VersionUtility.Instance.InIosAuditTime())
+ {
+ return;
+ }
+
accountNameBuf = _accountName;
var url = string.Empty;
var tables = new Dictionary<string, string>();
@@ -293,6 +299,30 @@
return false;
}
+ public void ParseServerLocalServerList()
+ {
+ serverListCommonPartGot = true;
+ var configs = Config.Instance.GetAllValues<LoginSeverListConfig>();
+ var count = configs.Count;
+ serverInfoCommon = new ServerInfoCommon();
+ serverInfoCommon.common = new ServerGroup[1];
+ serverInfoCommon.common[0] = new ServerGroup();
+ serverInfoCommon.common[0].group_title = "1鍖�";
+ serverInfoCommon.common[0].group_list = new ServerData[count];
+ for (var i = 0; i < count; i++)
+ {
+ var config = configs[i];
+ serverInfoCommon.common[0].group_list[i] = new ServerData(config);
+ }
+
+ FiltrateDefaultServerAndServerGroup();
+
+ if (onServerListRefreshEvent != null)
+ {
+ onServerListRefreshEvent();
+ }
+ }
+
public List<string> GetAllServerGroup()
{
var serverGroupTitles = new List<string>();
@@ -319,7 +349,6 @@
return serverGroupTitles;
}
-
private void ProcessRecentServerData()
{
--
Gitblit v1.8.0