Prechádzať zdrojové kódy

Merge branch 'master' of http://192.168.2.10:3000/GFG/Client

zhangyuqian 1 rok pred
rodič
commit
e884205ea0

+ 25 - 15
GameClient/Assets/Game/HotUpdate/Platform/QDManager.cs

@@ -149,26 +149,36 @@ namespace GFGGame
         //上报角色行为给sdk
         public static void PushRoleAction(DouYouRoleLogReportType reportType)
         {
-            //改名上报给sdk
-            var zoneScene = GameGlobal.zoneScene;
-            if (zoneScene == null) return;
+            switch (LauncherConfig.ChannelId)
+            {
+                case (int)ChannelID.Test:
+
+                    break;
+                case (int)ChannelID.DouYou:
+                    //改名上报给sdk
+                    var zoneScene = GameGlobal.zoneScene;
+                    if (zoneScene == null) return;
 
-            if (zoneScene.GetComponent<RoleInfosComponent>() == null ||
-                zoneScene.GetComponent<RoleInfosComponent>().IsDisposed) return;
+                    if (zoneScene.GetComponent<RoleInfosComponent>() == null ||
+                        zoneScene.GetComponent<RoleInfosComponent>().IsDisposed) return;
 
-            var roleInfo = zoneScene.GetComponent<RoleInfosComponent>().GetCurrentRole();
-            if (roleInfo == null) return;
+                    var roleInfo = zoneScene.GetComponent<RoleInfosComponent>().GetCurrentRole();
+                    if (roleInfo == null) return;
 
-            if (GameGlobal.myNumericComponent == null) return;
-            int lvl = GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl);
+                    if (GameGlobal.myNumericComponent == null) return;
+                    int lvl = GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl);
 
-            if (zoneScene.GetComponent<ServerInfosComponent>() == null) return;
-            if (zoneScene.GetComponent<ServerInfosComponent>().recentlyServerInfo == null) return;
+                    if (zoneScene.GetComponent<ServerInfosComponent>() == null) return;
+                    if (zoneScene.GetComponent<ServerInfosComponent>().recentlyServerInfo == null) return;
 
-            string serverName = zoneScene.GetComponent<ServerInfosComponent>().recentlyServerInfo.ServerName;
-            QDDouYouManagerInit.Instance.ReportRole((int)reportType,
-                roleInfo.Id.ToString(), lvl.ToString(), roleInfo.Name, roleInfo.ServerId.ToString(),
-                serverName);
+                    string serverName = zoneScene.GetComponent<ServerInfosComponent>().recentlyServerInfo.ServerName;
+                    QDDouYouManagerInit.Instance.ReportRole((int)reportType,
+                        roleInfo.Id.ToString(), lvl.ToString(), roleInfo.Name, roleInfo.ServerId.ToString(),
+                        serverName);
+                    break;
+                default:
+                    break;
+            }
         }
 
         public static bool IsTaptap