Эх сурвалжийг харах

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

leiyasi 1 жил өмнө
parent
commit
425c2559d7

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Controller/GuideController.cs

@@ -160,7 +160,7 @@ namespace GFGGame
             {
                 return;
             }
-            LogServerHelper.SendNodeLog(GuideDataManager.currentGuideId * 100 + 1);
+            LogServerHelper.SendGuideFlowLog(GuideDataManager.currentGuideId * 100 + 1);
             ViewManager.Show<GuideView>(new List<object> { target, guideKey, guideStr, guideId, index, yTxt, justHint, noTips });
         }
         public static bool TryCompleteGuideIndex(string guideKey, int index)
@@ -204,7 +204,7 @@ namespace GFGGame
                 }
                 MainDataManager.Instance.CanSwipe = true;
                 
-                LogServerHelper.SendNodeLog(GuideDataManager.currentGuideId * 100 + 2);
+                LogServerHelper.SendGuideFlowLog(GuideDataManager.currentGuideId * 100 + 2);
                 GuideDataManager.currentGuideId = 0;
                 
                 HideGuide();

+ 24 - 4
GameClient/Assets/Game/HotUpdate/Controller/LogServerHelper.cs

@@ -21,14 +21,13 @@ namespace GFGGame
             logData.Account = DeviceUniqueIdHelper.GetDeviceUniqueId();
             logData.EventType = node;
             var logStr = zoneScene.GetComponent<LogSplicingComponent>().LogObjectToStr(logData);
-            //HttpTool.Instance.Post(GameConfig.logApiReportUrl, logStr);
             var body = $"?logStr={logStr}";
-            HttpTool.Instance.Get(GameConfig.logApiReportUrl + body, null,false);
+            HttpTool.Instance.Get(GameConfig.logApiReportUrl + body, null, false);
         }
+
         /// <summary>
         /// 发送玩法参与度
         /// </summary>
-        /// <param name="node"></param>
         public static void SendPlayParticipationLog(int eventType, int type)
         {
             var zoneScene = GameGlobal.zoneScene;
@@ -45,7 +44,28 @@ namespace GFGGame
             var logStr = zoneScene.GetComponent<LogSplicingComponent>().LogObjectToStr(logData);
             //HttpTool.Instance.Post(GameConfig.logApiReportUrl, logStr);
             var body = $"?logStr={logStr}";
-            HttpTool.Instance.Get(GameConfig.logApiReportUrl + body, null,false);
+            HttpTool.Instance.Get(GameConfig.logApiReportUrl + body, null, false);
+        }
+
+        /// <summary>
+        /// 发送引导日志
+        /// </summary>
+        /// <param name="node"></param>
+        public static void SendGuideFlowLog(int node)
+        {
+            var zoneScene = GameGlobal.zoneScene;
+            var logData = ET.GuideFlow.Instance;
+            logData.EventId = GenerateIDUtil.GenerateId();
+            logData.DtEventTime = DateTimeUtil.GetNowTime(DateTimeUtil.FormatE);
+            logData.PlatFormId = LauncherConfig.platformId;
+            logData.ChannelId = LauncherConfig.ChannelId;
+            logData.ServerId = zoneScene.GetComponent<ServerInfosComponent>().CurrentServerId;
+            logData.GuideId = node;
+            logData.PlayerId = zoneScene.GetComponent<RoleInfosComponent>().CurrentRoleId;
+            logData.PlayerName = zoneScene.GetComponent<RoleInfosComponent>().GetCurrentRoleName();
+            var logStr = zoneScene.GetComponent<LogSplicingComponent>().LogObjectToStr(logData);
+            var body = $"?logStr={logStr}";
+            HttpTool.Instance.Get(GameConfig.logApiReportUrl + body, null, false);
         }
     }
 }

+ 27 - 1
GameClient/Assets/Game/HotUpdate/Views/Store/StoreView.cs

@@ -4,6 +4,7 @@ using FairyGUI;
 using System.Collections.Generic;
 using ET;
 using UnityEngine;
+using System;
 // using System.Diagnostics;
 
 namespace GFGGame
@@ -47,8 +48,9 @@ namespace GFGGame
             _ui.m_comTab.m_c1.onChanged.Add(OnTabChange);
             _ui.m_listSubTab.itemRenderer = RenderListSubTabItem;
             _ui.m_listSubTab.onClickItem.Add(OnListSubTabClick);
-
+            PreloadStoreChargeAddUp();
         }
+
         protected override void AddEventListener()
         {
             base.AddEventListener();
@@ -245,5 +247,29 @@ namespace GFGGame
                 RedDotController.Instance.SetComRedDot(_ui.m_listSubTab.GetChildAt(ConstStoreSubId.STORE_MONTH_BROCADE_WEAV).asCom, RedDotDataManager.Instance.GetStoreBrocadeWeavRewardRed());
             }
         }
+
+        //会员中心模型预加载
+        private void PreloadStoreChargeAddUp()
+        {
+            int vipIndex = Math.Max(0, RoleDataManager.vipLv - 1);
+            for (int i = vipIndex; i >= 0; i--)
+            {
+                PreloadSuitModel(i);
+            }
+            for (int i = vipIndex + 1; i < VipCfgArray.Instance.dataArray.Length - 1; i++)
+            {
+                PreloadSuitModel(i);
+            }
+        }
+
+        private void PreloadSuitModel(int index)
+        {
+            VipCfg vipCfg = VipCfgArray.Instance.dataArray[index + 1];
+            SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(vipCfg.suitId);
+            ResType resType = ResType.Sprite;
+            if (suitCfg.aniRes != "")
+                resType = ResType.Animation;
+            PreloadManager.Instance.PreloadSuitRes(vipCfg.suitId, resType, new int[] { ConstDressUpItemType.BEI_JING }, true);
+        }
     }
 }