少年修仙传客户端代码仓库
client_Wu Xijin
2018-09-29 5204af3c6acb3a55af1aa3ec037bac3c00d2be7e
3335 ios打包添加appstore审核期限,在这个期限内,不访问后台
5个文件已修改
2个文件已添加
197 ■■■■ 已修改文件
Core/GameEngine/Login/Launch.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Login/LoginStage.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/LoginSeverListConfig.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/LoginSeverListConfig.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/ConfigManager.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/ServerData.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/ServerListCenter.cs 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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)
        {
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);
Core/GameEngine/Model/Config/LoginSeverListConfig.cs
New file
@@ -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);
            }
        }
    }
}
Core/GameEngine/Model/Config/LoginSeverListConfig.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 26aef6c81733c0440a426102e8c58da7
timeCreated: 1538225014
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
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++)
            {
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)
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()
    {