Просмотр исходного кода

Merge branch 'main' of ssh://192.168.0.8:29418/xianjing into hy_tw-en

# Conflicts:
#	Assets/Content/Config/DownLoadUrlCfg.csv
#	Assets/Src/Core/Config/ConfigMgr.cs
gdl_123 3 месяцев назад
Родитель
Сommit
6cd5197313

+ 1 - 1
Assets/Content/Config/DownLoadUrlCfg.csv

@@ -1,6 +1,6 @@
 ID,Platform,BaseUrl,ServerUrl,Param1,DownloadPath,MaxNum
 ID,Platform,BaseUrl,ServerUrl,Param1,DownloadPath,MaxNum
 int,string,string,string,string,string,int
-1,GameDebug,http://110.40.223.119:88/entw/,http://110.40.223.119:81/,entw,res/AndroidNewRes/,1
+1,GameDebug,http://43.226.57.217:88/entw/,http://43.226.57.217:81/,entw,res/AndroidNewRes/,1
 2,Android,http://128.14.226.105:88/entw/,http://128.14.226.105:81/,entw,res/AndroidNewRes/,1
 3,IOS,http://128.14.226.105:88/entw/,http://128.14.226.105:81/,entw,res/IosRes/,1

+ 2 - 0
Assets/Lua/UI/UILanuch/UILanuchView.lua

@@ -40,6 +40,8 @@ function UILanuchView:Init()
 	self.loginRoot:SetActive(false)
 	self.loadingRoot:SetActive(false)
 	self.logo:SetActive(true)
+	self.scrollbar:SetActive(true)
+	self.numberText:SetActive(true)
 	self.serverBtnState = nil
 	self:RefreshServer()
 	self:RefreshVersionCode()

+ 6 - 3
Assets/Src/Core/Config/ConfigMgr.cs

@@ -478,9 +478,10 @@ public class ConfigMgr : Singleton<ConfigMgr>
         else
             return null;
     }
-
-
-    
+    public void ClearDLUrlData()
+    {
+        urldatas = null;
+    }
 }
 
 public class I18N
@@ -765,4 +766,6 @@ public class EditorConfigCSV
         }
         return Table;
     }
+
+
 }

+ 4 - 4
Assets/Src/Core/DownLoad/AssetDownloader.cs

@@ -79,12 +79,12 @@ public class AssetDownloader : SingletonMono<AssetDownloader>
 
 
 
-    private IEnumerator DownloadFile(string url, Action<UnityWebRequest> callback)
+    private IEnumerator DownloadFile(string url, Action<UnityWebRequest> callback, int _timeout = 5)
     {
         Debug.Log($"url = {url}");
         UnityWebRequest webRqst = UnityWebRequest.Get(url);
         float timeOut = Time.time;
-        webRqst.timeout = 20;
+        webRqst.timeout = _timeout;
         UnityWebRequestAsyncOperation asyncOperation = webRqst.SendWebRequest();
         float progress = 0;
        
@@ -291,9 +291,9 @@ public class AssetDownloader : SingletonMono<AssetDownloader>
     }
 
 
-    public void DownLoadFileByCoroutine(string url, Action<UnityWebRequest> callback)
+    public void DownLoadFileByCoroutine(string url, Action<UnityWebRequest> callback,int timeout = 5)
     {
-        StartCoroutine(DownloadFile(url, callback));
+        StartCoroutine(DownloadFile(url, callback,5));
     }
 
     public void AssetLoadToLocalByCorutine(string url, string toPath, Action<byte[]> callback = null)

+ 23 - 2
Assets/Src/Core/DownLoad/DownloadMgr.cs

@@ -84,7 +84,6 @@ public class DownloadMgr : Singleton<DownloadMgr>
 
     private int tryGetVersionCount;
     public bool isQiangDownload;
-
     public string ResVersion { get; private set; }
     public override void Init()
     {
@@ -926,7 +925,7 @@ public class DownloadMgr : Singleton<DownloadMgr>
             downloadUrl = GetDownloadUrl();
             Log("downloadUrl = " + downloadUrl);
         }
-
+        ConfigMgr.Instance.ClearDLUrlData();
     }
 
 
@@ -967,4 +966,26 @@ public class DownloadMgr : Singleton<DownloadMgr>
 
         return ret;
     }
+
+    public DownLoadUrlCfg GetDLCfgByKey(string key)
+    {
+        if (downLoadUrlCfgs.ContainsKey(key))
+        {
+            return downLoadUrlCfgs[key];
+        }
+        return null;
+    }
+
+    /// <summary>
+    /// BaseUrl   是否开启检查
+    /// ServerUrl url
+    /// Param1 url参数,平台
+    /// DownloadPath 是否隐藏进度条
+    /// </summary>
+    /// <returns></returns>
+    public DownLoadUrlCfg GetCheckSHCfg()
+    {
+        return GetDLCfgByKey("ShenHe");
+    }
+
 }

+ 1 - 1
Assets/Src/Core/DownLoad/DownloadTask.cs

@@ -73,7 +73,7 @@ public class DownloadTask : MonoBehaviour
         {
             ret = false;
         }
-        webRqst.timeout = 20;
+        webRqst.timeout = 5;
         return ret;
     }
 

+ 5 - 0
Assets/Src/Core/DownLoad/FileHelper.cs

@@ -476,6 +476,11 @@ public class FileHelper
         return stringBuilder.ToString();
     }
 
+
+    public static bool CheckStringIsTrue(string str)
+    {
+        return str == "true" || str == "TRUE" || str == "True";
+    }
     //public static string[][] GetCsvDatas(string text)
     //{
     //    using (System.IO.StringReader stringReader = new System.IO.StringReader(text))

+ 68 - 3
Assets/Src/GameLogic/LaunchLoadMgr.cs

@@ -114,9 +114,58 @@ public class LaunchLoadMgr
         }
     }
 
-    private IEnumerator CheckResUpdate()
+    private void CheckISShenHe()
     {
         DownloadMgr.Instance.InitUrlCfg();
+        DownLoadUrlCfg cfg = DownloadMgr.Instance.GetCheckSHCfg();
+        bool isOpenCheck = false;
+        string url = "";
+        string param = "";
+        bool active = true;
+        bool lpactive = true;
+        if (cfg!=null)
+        {
+            isOpenCheck = FileHelper.CheckStringIsTrue(cfg.BaseUrl);
+            url = cfg.ServerUrl;
+            param = cfg.Param1;
+            active = FileHelper.CheckStringIsTrue(cfg.DownloadPath);
+            lpactive = cfg.MaxNum == 1;
+        }
+
+        if (isOpenCheck)
+        {
+            string checkurl = $"{url}{param}";
+            AssetDownloader.Instance.DownLoadFileByCoroutine(checkurl, webreq =>
+             {
+                 bool isShenHe = true;
+                 if (webreq != null)
+                 {
+                     string data = webreq.downloadHandler.text;
+                     isShenHe =  data == "1" || data == "\"1\"";
+                 }
+
+                 if (isShenHe)
+                 {
+                     SetLoadScrollBarActive(active);
+                     SetLoadPrecentActive(lpactive);
+                     OnEndDownload();
+                 }
+                 else
+                 {
+                     GameMgr.Instance.DoTaskByCorutine(CheckResUpdate);
+                 }
+             },2);
+        }
+        else
+        {
+            GameMgr.Instance.DoTaskByCorutine(CheckResUpdate);
+        }
+
+    }
+
+    private IEnumerator CheckResUpdate()
+    {
+        m_LoadingRootGo.SetActive(true);
         DownloadMgr.Instance.CheckVersion();
         SetLoadDes("CheckRes");
         SetLoadPrecent(0);
@@ -174,6 +223,12 @@ public class LaunchLoadMgr
         }
         yield return new WaitForSeconds(1);
         DownloadMgr.Instance.Free();
+        OnEndDownload();
+    }
+
+    private void OnEndDownload()
+    {
+        m_LoadingRootGo.SetActive(true);
         GameMgr.Instance.CheckVersion();
         GameMgr.Instance.SetSDKName(DownloadMgr.Instance.GetSDKName());
         //m_LoadingRootGo.SetActive(false);
@@ -201,7 +256,7 @@ public class LaunchLoadMgr
     {
         TimerManager.Instance.RemoveTimer(timerSequence);
         m_TimerId = 0;
-        m_LoadingRootGo.SetActive(true);
+        //m_LoadingRootGo.SetActive(true);
         SetLoadEffectShowState(true);
 
 
@@ -216,7 +271,8 @@ public class LaunchLoadMgr
     private void OnLoadCfgEnd(CoreEvent<int> ce)
     {
         EventMgr.RemoveEventListener<int>(ECoreEventType.EID_ConfigMgrInit, OnLoadCfgEnd);
-        GameMgr.Instance.DoTaskByCorutine(CheckResUpdate);
+        //GameMgr.Instance.DoTaskByCorutine(CheckResUpdate);
+        CheckISShenHe();
     }
     private void OnConfigMgrInited(CoreEvent<int> ce)
     {
@@ -469,4 +525,13 @@ public class LaunchLoadMgr
             m_LoadScrollBar.size = precent * 0.01f;
     }
 
+
+    private void SetLoadScrollBarActive(bool active)
+    {
+        m_LoadScrollBar.gameObject.SetActive(active);
+    }
+    private void SetLoadPrecentActive(bool active)
+    {
+        m_LoadPrecentTxt.gameObject.SetActive(active);
+    }
 }

+ 47 - 47
Build/BuildDependenceResource/PackConfig.json

@@ -35,11 +35,11 @@
             "obscureKey": "",
             "obscureOffsetMin": 0,
             "obscureOffsetValues": [],
-            "sdkVerifyUrl": "http://110.40.223.119:81//",
-            "serverListUrl": "http://110.40.223.119:81//serverlist",
-            "notifyUrl": "http://110.40.223.119:81//notice",
-            "specialInfoUrl": "http://110.40.223.119:81//channel",
-            "customerServiceInfoUrl": "http://110.40.223.119:81//vipService",
+            "sdkVerifyUrl": "http://43.226.57.217:81//",
+            "serverListUrl": "http://43.226.57.217:81//serverlist",
+            "notifyUrl": "http://43.226.57.217:81//notice",
+            "specialInfoUrl": "http://43.226.57.217:81//channel",
+            "customerServiceInfoUrl": "http://43.226.57.217:81//vipService",
             "leBian_MainChId": "69423",
             "leBian_ClientChId": "PATCH_V3",
             "leBian_SECID": "dmcve6kq.c",
@@ -149,11 +149,11 @@
             "obscureKey": "",
             "obscureOffsetMin": 0,
             "obscureOffsetValues": [],
-            "sdkVerifyUrl": "http://110.40.223.119:81//",
-            "serverListUrl": "http://110.40.223.119:81//serverlist",
-            "notifyUrl": "http://110.40.223.119:88/res/NoticeNew/",
-            "specialInfoUrl": "http://110.40.223.119:81//channel",
-            "customerServiceInfoUrl": "http://110.40.223.119:81//vipService",
+            "sdkVerifyUrl": "http://43.226.57.217:81//",
+            "serverListUrl": "http://43.226.57.217:81//serverlist",
+            "notifyUrl": "http://43.226.57.217:88/res/NoticeNew/",
+            "specialInfoUrl": "http://43.226.57.217:81//channel",
+            "customerServiceInfoUrl": "http://43.226.57.217:81//vipService",
             "leBian_MainChId": "69423",
             "leBian_ClientChId": "youyi_bt_jj",
             "leBian_SECID": "dmcve6kq.c",
@@ -435,11 +435,11 @@
             "obscureKey": "",
             "obscureOffsetMin": 0,
             "obscureOffsetValues": [],
-            "sdkVerifyUrl": "http://110.40.223.119:81//",
-            "serverListUrl": "http://110.40.223.119:81//serverlist",
+            "sdkVerifyUrl": "http://43.226.57.217:81//",
+            "serverListUrl": "http://43.226.57.217:81//serverlist",
             "notifyUrl": "http://cxzcdn.hkhappygame.com/res/TestServerNotice/",
-            "specialInfoUrl": "http://110.40.223.119:81//channel",
-            "customerServiceInfoUrl": "http://110.40.223.119:81//vipService",
+            "specialInfoUrl": "http://43.226.57.217:81//channel",
+            "customerServiceInfoUrl": "http://43.226.57.217:81//vipService",
             "leBian_MainChId": "69423",
             "leBian_ClientChId": "youyi_bt_jj",
             "leBian_SECID": "dmcve6kq.c",
@@ -544,11 +544,11 @@
             "obscureKey": "",
             "obscureOffsetMin": 0,
             "obscureOffsetValues": [],
-            "sdkVerifyUrl": "http://110.40.223.119:81//",
-            "serverListUrl": "http://110.40.223.119:81//serverlist",
-            "notifyUrl": "http://110.40.223.119:88/res/NoticeNew/",
-            "specialInfoUrl": "http://110.40.223.119:81//channel",
-            "customerServiceInfoUrl": "http://110.40.223.119:81//vipService",
+            "sdkVerifyUrl": "http://43.226.57.217:81//",
+            "serverListUrl": "http://43.226.57.217:81//serverlist",
+            "notifyUrl": "http://43.226.57.217:88/res/NoticeNew/",
+            "specialInfoUrl": "http://43.226.57.217:81//channel",
+            "customerServiceInfoUrl": "http://43.226.57.217:81//vipService",
             "leBian_MainChId": "69423",
             "leBian_ClientChId": "youyi_bt_jj",
             "leBian_SECID": "dmcve6kq.c",
@@ -705,11 +705,11 @@
             "obscureKey": "",
             "obscureOffsetMin": 0,
             "obscureOffsetValues": [],
-            "sdkVerifyUrl": "http://110.40.223.119:81//",
-            "serverListUrl": "http://110.40.223.119:81//serverlist",
-            "notifyUrl": "http://110.40.223.119:88/res/NoticeNew/",
-            "specialInfoUrl": "http://110.40.223.119:81//channel",
-            "customerServiceInfoUrl": "http://110.40.223.119:81//vipService",
+            "sdkVerifyUrl": "http://43.226.57.217:81//",
+            "serverListUrl": "http://43.226.57.217:81//serverlist",
+            "notifyUrl": "http://43.226.57.217:88/res/NoticeNew/",
+            "specialInfoUrl": "http://43.226.57.217:81//channel",
+            "customerServiceInfoUrl": "http://43.226.57.217:81//vipService",
             "leBian_MainChId": "69423",
             "leBian_ClientChId": "youyi_bt_jj",
             "leBian_SECID": "dmcve6kq.c",
@@ -814,11 +814,11 @@
             "obscureKey": "",
             "obscureOffsetMin": 0,
             "obscureOffsetValues": [],
-            "sdkVerifyUrl": "http://110.40.223.119:81//",
-            "serverListUrl": "http://110.40.223.119:81//serverlist",
-            "notifyUrl": "http://110.40.223.119:88/res/NoticeNew/",
-            "specialInfoUrl": "http://110.40.223.119:81//channel",
-            "customerServiceInfoUrl": "http://110.40.223.119:81//vipService",
+            "sdkVerifyUrl": "http://43.226.57.217:81//",
+            "serverListUrl": "http://43.226.57.217:81//serverlist",
+            "notifyUrl": "http://43.226.57.217:88/res/NoticeNew/",
+            "specialInfoUrl": "http://43.226.57.217:81//channel",
+            "customerServiceInfoUrl": "http://43.226.57.217:81//vipService",
             "leBian_MainChId": "69423",
             "leBian_ClientChId": "youyi_bt_jj",
             "leBian_SECID": "dmcve6kq.c",
@@ -864,11 +864,11 @@
             "obscureKey": "",
             "obscureOffsetMin": 0,
             "obscureOffsetValues": [],
-            "sdkVerifyUrl": "http://110.40.223.119:81//",
-            "serverListUrl": "http://110.40.223.119:81//serverlist",
-            "notifyUrl": "http://110.40.223.119:88/res/NoticeNew/",
-            "specialInfoUrl": "http://110.40.223.119:81//channel",
-            "customerServiceInfoUrl": "http://110.40.223.119:81//vipService",
+            "sdkVerifyUrl": "http://43.226.57.217:81//",
+            "serverListUrl": "http://43.226.57.217:81//serverlist",
+            "notifyUrl": "http://43.226.57.217:88/res/NoticeNew/",
+            "specialInfoUrl": "http://43.226.57.217:81//channel",
+            "customerServiceInfoUrl": "http://43.226.57.217:81//vipService",
             "leBian_MainChId": "69423",
             "leBian_ClientChId": "youyi_bt_jj",
             "leBian_SECID": "dmcve6kq.c",
@@ -1028,11 +1028,11 @@
             "obscureKey": "",
             "obscureOffsetMin": 0,
             "obscureOffsetValues": [],
-            "sdkVerifyUrl": "http://110.40.223.119:81//",
-            "serverListUrl": "http://110.40.223.119:81//serverlist",
-            "notifyUrl": "http://110.40.223.119:81//notice",
-            "specialInfoUrl": "http://110.40.223.119:81//channel",
-            "customerServiceInfoUrl": "http://110.40.223.119:81//vipService",
+            "sdkVerifyUrl": "http://43.226.57.217:81//",
+            "serverListUrl": "http://43.226.57.217:81//serverlist",
+            "notifyUrl": "http://43.226.57.217:81//notice",
+            "specialInfoUrl": "http://43.226.57.217:81//channel",
+            "customerServiceInfoUrl": "http://43.226.57.217:81//vipService",
             "leBian_MainChId": "69510",
             "leBian_ClientChId": "youyi_cxzjj_bt",
             "leBian_SECID": "jbr2lfjj.c",
@@ -1227,11 +1227,11 @@
             "obscureKey": "",
             "obscureOffsetMin": 0,
             "obscureOffsetValues": [],
-            "sdkVerifyUrl": "http://110.40.223.119:81//",
-            "serverListUrl": "http://110.40.223.119:81//serverlist",
+            "sdkVerifyUrl": "http://43.226.57.217:81//",
+            "serverListUrl": "http://43.226.57.217:81//serverlist",
             "notifyUrl": "http://cxzcdn.hkhappygame.com/res/TestServerNotice/",
-            "specialInfoUrl": "http://110.40.223.119:81//channel",
-            "customerServiceInfoUrl": "http://110.40.223.119:81//vipService",
+            "specialInfoUrl": "http://43.226.57.217:81//channel",
+            "customerServiceInfoUrl": "http://43.226.57.217:81//vipService",
             "leBian_MainChId": "69031",
             "leBian_ClientChId": "cxzjj_bt",
             "leBian_SECID": "tx75web0.c",
@@ -1685,11 +1685,11 @@
             "obscureKey": "",
             "obscureOffsetMin": 0,
             "obscureOffsetValues": [],
-            "sdkVerifyUrl": "http://110.40.223.119:81//",
-            "serverListUrl": "http://110.40.223.119:81//serverlist",
+            "sdkVerifyUrl": "http://43.226.57.217:81//",
+            "serverListUrl": "http://43.226.57.217:81//serverlist",
             "notifyUrl": "http://cxzcdn.hkhappygame.com/res/TestServerNotice/",
-            "specialInfoUrl": "http://110.40.223.119:81//channel",
-            "customerServiceInfoUrl": "http://110.40.223.119:81//vipService"
+            "specialInfoUrl": "http://43.226.57.217:81//channel",
+            "customerServiceInfoUrl": "http://43.226.57.217:81//vipService"
         }
     ]
 }

+ 21 - 16
README.md

@@ -4,22 +4,27 @@
 
 | 分支 | 说明 |
 |:-------:|:-------:|
- |   cn_0_1  | 国内 0.1 版
- | cn_merage
- | cn_zhuanFu | 国内专服
- | hy_en |海外英文(英美)
- | hy_iios_new | 海外ios(港澳台)
- | hy_ios | 海外ios(港澳台)(旧)
- | hy_ios_en |海外英文IOS(英美)
- | hy_new | 海外(港澳台)
- | hy_oldhp
- | hy_ru |海外俄语
- | hy_skin | 舍弃掉的
- | hy_test  | 海外测试(用于测试服,一般用于合并主分支的修改)(港澳台)
- | main  |主
- | new | 海外ios(港澳台)(旧)
- | skin_test
- | sskin  | 皮肤测试
+|   cn_0_1  | 国内 0.1 版
+| cn_merage | 合并
+| cn_zhuanFu | 国内专服
+| hy_en | 海外英文(英美)
+| hy_iios_new | 海外ios(港澳台)
+| hy_ios | 海外ios(港澳台)(旧)
+| hy_ios_en | 海外英文IOS(英美)
+| hy_new | 海外(港澳台)
+| hy_oldhp | 旧版hp
+| hy_ru | 海外俄语
+| hy_skin | 舍弃掉的
+| hy_test  | 海外测试(用于测试服,一般用于合并主分支的修改)(港澳台)
+| main  | 主
+| new | 海外ios(港澳台)(旧)
+| skin_test | 皮肤测试
+| sskin  | 皮肤测试
+
+> 各语言最新分支 
+> > 英文版: hy_dny </br>
+> > 繁体:hy_tw-en </br>
+> > 俄语:hy_ru </br>
 
 ## 目录结构说明
 ### 常规目录