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

竞技场卓越点击战力

zhaoyang 2 жил өмнө
parent
commit
c676bf7201

+ 10 - 7
GameClient/Assets/Game/HotUpdate/Data/ArenaDataManager.cs

@@ -338,7 +338,7 @@ namespace GFGGame
         {
             List<long> fightScoreDatas = new List<long>();
             long itemSum = 0;
-            long clickScore = 0;
+            double clickScore = 0;
             long skillScore = 0;
             for (int i = 0; i < ThemeList.Count; i++)
             {
@@ -346,19 +346,20 @@ namespace GFGGame
                 {
                     long itemsScore = GetItemScoreSum(fightDatas[i].itemScoreList);
                     itemSum += itemsScore;
-                    clickScore += GetPerfectClickScore(fightDatas[i]) / (long)ConstScoreSystem.PART_SCORE;
+                    clickScore += GetPerfectClickScore(fightDatas[i]);
                     skillScore += FightDataManager.Instance.GetSkillFightScore(itemsScore, fightDatas[i].baseScore, fightDatas[i].cardId, fightDatas[i].cardScore, fightDatas[i].skillLvs);
                 }
                 else
                 {
                     long itemsScore = GetItemScoreSum(fightDatas[i].itemScoreList);
                     itemSum += itemsScore;
-                    clickScore += GetRobotPerfectClickScore(fightDatas[i]) / (long)ConstScoreSystem.PART_SCORE;
+                    clickScore += GetRobotPerfectClickScore(fightDatas[i]);
                     skillScore += FightDataManager.Instance.GetSkillFightScore(itemsScore, fightDatas[i].baseScore, fightDatas[i].cardId, fightDatas[i].cardScore, fightDatas[i].skillLvs);
                 }
             }
+            clickScore = clickScore / ConstScoreSystem.PART_SCORE;
             fightScoreDatas.Add(itemSum);
-            fightScoreDatas.Add(clickScore);
+            fightScoreDatas.Add((long)Math.Ceiling(clickScore));
             fightScoreDatas.Add(skillScore);
             return fightScoreDatas;
         }
@@ -380,12 +381,14 @@ namespace GFGGame
         //玩家卓越点击战力
         private long GetPerfectClickScore(FightData roleData)
         {
-            long clickScore = 0;
+            double clickScore = 0;
             foreach (int key in roleData.pardScoreListDic.Keys)
             {
-                clickScore += (long)ScoreSystemData.Instance.GetPartScore(roleData, key, ClickType.PREFACT_CLICK, 0);
+                double partBaseScore = ScoreSystemData.Instance.GetPartBaseScore(roleData, key);
+                double score = (partBaseScore + (roleData.baseScore + roleData.cardScore) * ConstScoreSystem.PERFECT_SCORE) * ConstScoreSystem.CLICK_SCORE;
+                clickScore += score;
             }
-            return clickScore;
+            return (long)Math.Ceiling(clickScore);
         }
         //机器人卓越点击战力
         private long GetRobotPerfectClickScore(FightData robotData)

+ 24 - 10
GameClient/Assets/Game/HotUpdate/Data/ScoreSystemData.cs

@@ -37,20 +37,33 @@ namespace GFGGame
         {
             roleData.pardScoreListDic.Clear();
             roleData.pardListDic.Clear();
+            FightScoreCfg[] typeCfgs = FightScoreCfgArray.Instance.dataArray;
+            for (int j = 0; j < typeCfgs.Length; j++)
+            {
+                FightScoreCfg cfg = typeCfgs[j];
+                if (roleData.pardScoreListDic.ContainsKey(cfg.id) == false)
+                {
+                    roleData.pardScoreListDic.Add(cfg.id, new List<int>());
+                }
+                if (roleData.pardListDic.ContainsKey(cfg.id) == false)
+                {
+                    roleData.pardListDic.Add(cfg.id, new List<int>());
+                }
+            }
             for (int i = 0; i < roleData.itemList.Count; i++)
             {
-                FightScoreCfg[] typeCfgs = FightScoreCfgArray.Instance.dataArray;
+                // FightScoreCfg[] typeCfgs = FightScoreCfgArray.Instance.dataArray;
                 for (int j = 0; j < typeCfgs.Length; j++)
                 {
                     FightScoreCfg cfg = typeCfgs[j];
-                    if (roleData.pardScoreListDic.ContainsKey(cfg.id) == false)
-                    {
-                        roleData.pardScoreListDic.Add(cfg.id, new List<int>());
-                    }
-                    if (roleData.pardListDic.ContainsKey(cfg.id) == false)
-                    {
-                        roleData.pardListDic.Add(cfg.id, new List<int>());
-                    }
+                    // if (roleData.pardScoreListDic.ContainsKey(cfg.id) == false)
+                    // {
+                    //     roleData.pardScoreListDic.Add(cfg.id, new List<int>());
+                    // }
+                    // if (roleData.pardListDic.ContainsKey(cfg.id) == false)
+                    // {
+                    //     roleData.pardListDic.Add(cfg.id, new List<int>());
+                    // }
 
                     bool isCheckFinish = false;
                     for (int k = 0; k < cfg.subTypesArr.Length; k++)
@@ -132,6 +145,7 @@ namespace GFGGame
             double clickScore = (partBaseScore + (roleScore + cardScore) * clickCoefficient) * ConstScoreSystem.CLICK_SCORE;
 
             int score = (int)Math.Ceiling(partScore + clickScore + skillScore);
+            Debug.Log("clickScore:" + clickScore + "    score:" + score);
             return Math.Max(0, score);
         }
 
@@ -159,7 +173,7 @@ namespace GFGGame
         /// </summary>
         /// <param name="partId">评分部位</param>
         /// <returns></returns>
-        private double GetPartBaseScore(FightData roleData, int partId)
+        public double GetPartBaseScore(FightData roleData, int partId)
         {
             double partScore = 0;
             double tagScore = 0;