Browse Source

添加打点

lzx 1 day ago
parent
commit
ddf93b807f

+ 2 - 0
Assets/Scripts/GameLogic/Player/AccountFileInfo.cs

@@ -168,6 +168,8 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
 
         public bool MusicBg = true;
         public bool MusicEffects = true;
+
+        public int totalAds;
     }
 
     [System.Serializable]

+ 10 - 0
Assets/Scripts/GameLogic/SDK/DBManager.cs

@@ -19,4 +19,14 @@ public class DBManager : Singleton<DBManager>
     {
         TalkingDataManager.Instance.TrackEvent(key, lable);
     }
+        
+    /// <summary>
+    /// 更新用户属性
+    /// </summary>
+    /// <param name="properties"></param>
+    public void UpdateUserProperty(Dictionary<string, object> properties)
+    {
+        
+    }
+    
 }

+ 15 - 4
Assets/Scripts/GameUI/EventManager/DialogueManager.cs

@@ -43,7 +43,7 @@ public class DialogueManager : Singleton<DialogueManager>
         }
         else
         {
-            await PlayDialogue(dialogueID, true,true);
+            await PlayDialogue(dialogueID, true, true);
         }
 
         // EndDialogue1();
@@ -69,7 +69,7 @@ public class DialogueManager : Singleton<DialogueManager>
         }
     }
 
-    private async CTask PlayDialogue(int dialogueID, bool isShowTips = false,bool isShowAnima = false)
+    private async CTask PlayDialogue(int dialogueID, bool isShowTips = false, bool isShowAnima = false)
     {
         currentDialogueID = dialogueID;
 
@@ -141,7 +141,7 @@ public class DialogueManager : Singleton<DialogueManager>
             {
                 await DialoguePanel.OpenDialoguePanel(CurrentEventList, dialogueConfig.ID, null,
                     ShowDialogueEventData.MessageShowType.Verbatim,
-                    FishDialogue,isShowAnima);
+                    FishDialogue, isShowAnima);
             }
             else
             {
@@ -263,7 +263,8 @@ public class DialogueManager : Singleton<DialogueManager>
                     // }
                     // else
                     {
-                        List<ItemInfo> items = DropManager.Instance.Drop(dialogueConfig.PrizeIDs[i],dialogueConfig.PrizeNums[i]);
+                        List<ItemInfo> items =
+                            DropManager.Instance.Drop(dialogueConfig.PrizeIDs[i], dialogueConfig.PrizeNums[i]);
                         itemInfos.AddRange(items);
                     }
                 }
@@ -355,6 +356,16 @@ public class DialogueManager : Singleton<DialogueManager>
                     EventSystemManager.Instance.AddEvent(dialogueConfig.ResultOptions[0]);
                 if (eventList != null)
                 {
+                    EventConfig eventConfig =
+                        ConfigComponent.Instance.Get<EventConfig>(dialogueConfig.ResultOptions[0]);
+                    if (eventConfig.EventTriggerType == 4)
+                    {
+                        Dictionary<string, object> properties = new Dictionary<string, object>();
+                        properties.Add("#MainId", EventSystemManager.Instance.GetMainEventDta()?.eventID);
+                        DBManager.Instance.CustomEvent("#CurMainEventId", properties);
+                        DBManager.Instance.UpdateUserProperty(properties);
+                    }
+
                     AccountFileInfo.Instance.playerData.eventList.Add(eventList);
                     AccountFileInfo.Instance.SavePlayerData();
                 }

+ 4 - 0
Assets/Scripts/GameUI/UI/GuidePanel/PlayerGuideManager.cs

@@ -769,6 +769,10 @@ namespace Fort23.Mono
             {
                 //容错:
                 await guideLogic.Guide();
+                Dictionary<string, object> dictionary = new Dictionary<string, object>();
+                dictionary.Add("#GroupID", curPhase);
+                dictionary.Add("#CurStep", curStep);
+                DBManager.Instance.CustomEvent("#UserGuide", dictionary);
             }
             catch (System.Exception e)
             {

+ 6 - 0
Assets/Scripts/GameUI/UI/HeroInformationPanel/HeroBreakthroughPanel.cs

@@ -224,6 +224,12 @@ namespace Fort23.Mono
                     delegate(bool isWin)
                     {
                         LogTool.Log("战斗完成" + isWin);
+                        Dictionary<string,object> dic = new Dictionary<string, object>();
+                        dic.Add("#BattleID", heroPowerUpConfig.DujieLevelbattleID);
+                        dic.Add("#IsWin", isWin);
+                        dic.Add("#UpGongFaIDs", PlayerManager.Instance.GongFaControl.allUseSkill);
+                        dic.Add("#UpGongFaIDs", PlayerManager.Instance.FaBaoControl.FightFaBao);
+                        DBManager.Instance.CustomEvent("#XinMo",dic);
                         if (isWin)
                         {
                             PlayerManager.Instance.myHero.heroData.isCombat = true;