瀏覽代碼

调整配置, 兼容芭乐,同时兼容官包,之后都是同一个渠道id做数据互通

hexiaojie 11 月之前
父節點
當前提交
054c463928

+ 2 - 0
GameClient/.idea/.idea.GameClient/.idea/.gitignore

@@ -11,3 +11,5 @@
 # Datasource local storage ignored files
 /dataSources/
 /dataSources.local.xml
+# GitHub Copilot persisted chat sessions
+/copilot/chatSessions

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Platform/QDDouYouManagerIos.cs

@@ -223,7 +223,7 @@ namespace GFGGame
         public void LogoutSuccessAb(string message)
         {
             Debug.Log("Game.HotUpdate LogoutSuccessAb: " + message);
-            GameController.QuitToLoginView(true);
+            GameController.QuitToLoginView(false);
             EventAgent.DispatchEvent(ConstMessage.OUT_LOGIN);
         }
 

+ 105 - 74
GameClient/Assets/Game/HotUpdate/Platform/QDManager.cs

@@ -17,19 +17,23 @@ namespace GFGGame
                     //QDShareManager.Instance.Init();
                     break;
                 case (int)ChannelID.DouYou:
-                    QDDouYouManager.Instance.Init();
+                    if (LauncherConfig.platformId == 2)
+                    {
+                        QDDouYouManagerIos.Instance.Init();
+                    }
+                    else
+                    {
+                        QDDouYouManager.Instance.Init();
+                    }
+
                     //QDShareManager.Instance.Init();
                     break;
                 case (int)ChannelID.DouYouDev:
                     QDDouYouManager.Instance.Init();
                     //QDShareManager.Instance.Init();
                     break;
-                case (int)ChannelID.AppStore:
-                    if (LauncherConfig.isUseDouYouIos == "1")
-                    {
-                        QDDouYouManagerIos.Instance.Init();
-                    }
-                    else
+                case (int)ChannelID.GFG:
+                    if (LauncherConfig.platformId == 2)
                     {
                         QDAppStoreManager.Init();
                     }
@@ -55,24 +59,25 @@ namespace GFGGame
 
                     break;
                 case (int)ChannelID.DouYou:
-                    QDDouYouManager.Instance.Login();
-                    break;
-                case (int)ChannelID.DouYouDev:
-                    QDDouYouManager.Instance.Login();
-                    break;
-                case (int)ChannelID.AppStore:
-                    if (LauncherConfig.isUseDouYouIos == "1")
+                    if (LauncherConfig.platformId == 2)
                     {
                         QDDouYouManagerIos.Instance.Login();
                     }
                     else
                     {
-                        bool loginAppStore = GameController.CheckLoginCache(true);
-                        if (!loginAppStore)
-                        {
-                            ViewManager.Hide<ModalStatusView>();
-                            ViewManager.Show<LoginInputView>();
-                        }
+                        QDDouYouManager.Instance.Login();
+                    }
+
+                    break;
+                case (int)ChannelID.DouYouDev:
+                    QDDouYouManager.Instance.Login();
+                    break;
+                case (int)ChannelID.GFG:
+                    bool loginAppStore = GameController.CheckLoginCache(true);
+                    if (!loginAppStore)
+                    {
+                        ViewManager.Hide<ModalStatusView>();
+                        ViewManager.Show<LoginInputView>();
                     }
 
                     break;
@@ -89,17 +94,17 @@ namespace GFGGame
 
                     break;
                 case (int)ChannelID.DouYou:
-                    QDDouYouManager.Instance.OnCreateRole();
+                    if (LauncherConfig.platformId == 1)
+                    {
+                        QDDouYouManager.Instance.OnCreateRole();
+                    }
+
                     break;
                 case (int)ChannelID.DouYouDev:
                     QDDouYouManager.Instance.OnCreateRole();
                     break;
-                case (int)ChannelID.AppStore:
-                    if (LauncherConfig.isUseDouYouIos == "1")
-                    {
-                        QDDouYouManagerIos.Instance.OnCreateRole();
-                    }
-                    else
+                case (int)ChannelID.GFG:
+                    if (LauncherConfig.platformId == 2)
                     {
                         QDAppStoreManager.OnCreateRole();
                     }
@@ -118,18 +123,22 @@ namespace GFGGame
 
                     break;
                 case (int)ChannelID.DouYou:
-                    QDDouYouManager.Instance.OnEnterGame();
-                    break;
-                case (int)ChannelID.DouYouDev:
-                    QDDouYouManager.Instance.OnEnterGame();
-                    break;
-                case (int)ChannelID.AppStore:
-                    if (LauncherConfig.isUseDouYouIos == "1")
+                    if (LauncherConfig.platformId == 2)
                     {
                         QDDouYouManagerIos.Instance.OnEnterGame();
                     }
                     else
                     {
+                        QDDouYouManager.Instance.OnEnterGame();
+                    }
+
+                    break;
+                case (int)ChannelID.DouYouDev:
+                    QDDouYouManager.Instance.OnEnterGame();
+                    break;
+                case (int)ChannelID.GFG:
+                    if (LauncherConfig.platformId == 2)
+                    {
                         QDAppStoreManager.OnEnterGame();
                     }
 
@@ -148,17 +157,21 @@ namespace GFGGame
 
                     break;
                 case (int)ChannelID.DouYou:
-                    QDDouYouManager.Instance.OnQuitToLoginView();
+                    if (LauncherConfig.platformId == 2)
+                    {
+                        QDDouYouManagerIos.Instance.OnQuitToLoginView();
+                    }
+                    else
+                    {
+                        QDDouYouManager.Instance.OnQuitToLoginView();
+                    }
+
                     break;
                 case (int)ChannelID.DouYouDev:
                     QDDouYouManager.Instance.OnQuitToLoginView();
                     break;
-                case (int)ChannelID.AppStore:
-                    if (LauncherConfig.isUseDouYouIos == "1")
-                    {
-                        QDDouYouManagerIos.Instance.OnQuitToLoginView();
-                    }
-              
+                case (int)ChannelID.GFG:
+
                     break;
                 default:
                     break;
@@ -173,21 +186,25 @@ namespace GFGGame
 
                     break;
                 case (int)ChannelID.DouYou:
-                    QDDouYouManager.Instance.Pay(buyID, count, orderID, price);
-                    break;
-                case (int)ChannelID.DouYouDev:
-                    QDDouYouManager.Instance.Pay(buyID, count, orderID, price);
-                    break;
-                case (int)ChannelID.AppStore:
-                    if (LauncherConfig.isUseDouYouIos == "1")
+                    if (LauncherConfig.platformId == 2)
                     {
                         QDDouYouManagerIos.Instance.Pay(buyID, count, orderID, price);
                     }
                     else
                     {
+                        QDDouYouManager.Instance.Pay(buyID, count, orderID, price);
+                    }
+
+                    break;
+                case (int)ChannelID.DouYouDev:
+                    QDDouYouManager.Instance.Pay(buyID, count, orderID, price);
+                    break;
+                case (int)ChannelID.GFG:
+                    if (LauncherConfig.platformId == 2)
+                    {
                         QDAppStoreManager.Pay(buyID, count, orderID, price);
                     }
-                    
+
                     break;
                 default:
                     break;
@@ -210,21 +227,22 @@ namespace GFGGame
 
                     break;
                 case (int)ChannelID.DouYou:
-                    QDDouYouManager.Instance.Logout();
-                    break;
-                case (int)ChannelID.DouYouDev:
-                    QDDouYouManager.Instance.Logout();
-                    break;
-                case (int)ChannelID.AppStore:
-                    if (LauncherConfig.isUseDouYouIos == "1")
+                    if (LauncherConfig.platformId == 2)
                     {
                         QDDouYouManagerIos.Instance.Logout();
                     }
                     else
                     {
-                        ViewManager.Show<LoginInputView>();
+                        QDDouYouManager.Instance.Logout();
                     }
-         
+
+                    break;
+                case (int)ChannelID.DouYouDev:
+                    QDDouYouManager.Instance.Logout();
+                    break;
+                case (int)ChannelID.GFG:
+                    ViewManager.Show<LoginInputView>();
+
                     break;
                 default:
                     break;
@@ -239,17 +257,22 @@ namespace GFGGame
                     GameController.ShowExitAlert();
                     break;
                 case (int)ChannelID.DouYou:
-                    QDDouYouManager.Instance.Exit();
+                    if (LauncherConfig.platformId == 2)
+                    {
+                        QDDouYouManagerIos.Instance.Exit();
+                    }
+                    else
+                    {
+                        QDDouYouManager.Instance.Exit();
+                    }
+
                     break;
                 case (int)ChannelID.DouYouDev:
                     QDDouYouManager.Instance.Exit();
                     break;
-                case (int)ChannelID.AppStore:
-                    if (LauncherConfig.isUseDouYouIos == "1")
-                    {
-                        QDDouYouManagerIos.Instance.Exit();
-                    }
-                    
+                case (int)ChannelID.GFG:
+                    GameController.ShowExitAlert();
+
                     break;
                 default:
                     break;
@@ -286,21 +309,29 @@ namespace GFGGame
 
                     break;
                 case (int)ChannelID.DouYou:
-                    QDDouYouManagerInit.Instance.ReportRole((int)reportType,
-                        roleInfo.Id.ToString(), roleLvl.ToString(), roleInfo.Name, roleInfo.ServerId.ToString(),
-                        serverName);
+                    if (LauncherConfig.platformId == 2)
+                    {
+                        QDDouYouManagerInitIos.Instance.ReportRoleInfo(((int)reportType).ToString(),
+                            roleInfo.ServerId.ToString(),
+                            serverName, roleInfo.Id.ToString(), roleInfo.Name, roleLvl.ToString(), vipLvl.ToString(),
+                            partyName,
+                            roleBalence);
+                    }
+                    else
+                    {
+                        QDDouYouManagerInit.Instance.ReportRole((int)reportType,
+                            roleInfo.Id.ToString(), roleLvl.ToString(), roleInfo.Name, roleInfo.ServerId.ToString(),
+                            serverName);
+                    }
+
                     break;
                 case (int)ChannelID.DouYouDev:
                     QDDouYouManagerInit.Instance.ReportRole((int)reportType,
                         roleInfo.Id.ToString(), roleLvl.ToString(), roleInfo.Name, roleInfo.ServerId.ToString(),
                         serverName);
                     break;
-                case (int)ChannelID.AppStore:
-                    QDDouYouManagerInitIos.Instance.ReportRoleInfo(((int)reportType).ToString(),
-                        roleInfo.ServerId.ToString(),
-                        serverName, roleInfo.Id.ToString(), roleInfo.Name, roleLvl.ToString(), vipLvl.ToString(),
-                        partyName,
-                        roleBalence);
+                case (int)ChannelID.GFG:
+
                     break;
                 default:
                     break;

+ 8 - 4
GameClient/Assets/Game/Launcher/LauncherConfig.cs

@@ -72,7 +72,7 @@ namespace GFGGame
 
         public static void InitScriptCompilation()
         {
-            launcherRootUrl = "http://gfg-client.obs.cn-north-4.myhuaweicloud.com/";
+            launcherRootUrl = "http://cdn.goufuguiwxw.com/";
 #if PT_DEV
             //外网dev版本
             netType = EnumNetType.LOCAL;
@@ -94,13 +94,13 @@ namespace GFGGame
             netType = EnumNetType.PUBLIC;
             cfgName = "cfg_ios";
             platformId = 2;
-            ChannelId = (int)ChannelID.AppStore;
+            ChannelId = (int)ChannelID.GFG;
 #elif PT_IosLocal
-            netType = EnumNetType.LOCAL;
+            netType = EnumNetType.PUBLIC;
             cfgName = "cfg_iosLocal";
             platformId = 2;
             isUseDouYouIos = "1";
-            ChannelId = (int)ChannelID.AppStore;
+            ChannelId = (int)ChannelID.GFG;
 #else
             netType = EnumNetType.LOCAL;
             cfgName = "cfg_local";
@@ -145,6 +145,10 @@ namespace GFGGame
             if (!string.IsNullOrEmpty(result.isUseDouYouIos))
             {
                 LauncherConfig.isUseDouYouIos = result.isUseDouYouIos;
+                if (LauncherConfig.isUseDouYouIos == "1")
+                {
+                    ChannelId = (int)ChannelID.DouYou;
+                }
             }
 
             LauncherConfig.manifest_v = result.manifest_v;

+ 15 - 7
GameClient/Assets/Game/Launcher/Platform/QDManagerInit.cs

@@ -10,24 +10,32 @@ namespace GFGGame.Launcher
             switch (LauncherConfig.ChannelId)
             {
                 case (int)ChannelID.DouYou:
-                    QDDouYouManagerInit.Instance.InitSDK(LauncherConfig.douYouAdId);
+                    if (LauncherConfig.platformId == 2)
+                    {
+                        QDDouYouManagerInitIos.Instance.InitSDK(LauncherConfig.gameId, LauncherConfig.douYouAdId,
+                            LauncherConfig.showLog == "1");
+                    }
+                    else
+                    {
+                        QDDouYouManagerInit.Instance.InitSDK(LauncherConfig.douYouAdId);
+                    }
+
                     //QDShareManagerInit.Instance.InitSDK();
                     break;
                 case (int)ChannelID.DouYouDev:
                     QDDouYouManagerInit.Instance.InitSDK(LauncherConfig.douYouAdId);
                     //QDShareManagerInit.Instance.InitSDK();
                     break;
-                case (int)ChannelID.AppStore:
-                    if (LauncherConfig.isUseDouYouIos == "1")
+                case (int)ChannelID.GFG:
+                    if (LauncherConfig.platformId == 2)
                     {
-                        QDDouYouManagerInitIos.Instance.InitSDK(LauncherConfig.gameId, LauncherConfig.douYouAdId,
-                            LauncherConfig.showLog == "1");
+                        QDAppStoreManagerInit.InitPlatform();
                     }
                     else
                     {
-                        QDAppStoreManagerInit.InitPlatform();
+                        UniEvent.SendMessage(new LauncherEvent.InitPlatformResult() { success = true });
                     }
-                    
+
                     break;
                 default:
                     UniEvent.SendMessage(new LauncherEvent.InitPlatformResult() { success = true });