zhaoyang 2 жил өмнө
parent
commit
7ad8b3e7f4

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/ArenaDataManager.cs

@@ -371,7 +371,7 @@ namespace GFGGame
         /// 所有部件主属性和
         /// </summary>
         /// <returns></returns>
-        public long GetItemScoreSum(List<int> itemScoreList)
+        public long GetItemScoreSum(List<float> itemScoreList)
         {
             long scoreSum = 0;
             for (int i = 0; i < itemScoreList.Count; i++)

+ 4 - 1
GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs

@@ -125,7 +125,10 @@ namespace GFGGame
             _targetData.cardScore = fightCfg.targetCardScore;
             _targetData.tags = fightCfg.needTagsArr;
             _targetData.skillLvs = new List<int>(fightCfg.targetSkillLvsArr);
-            _targetData.itemScoreList = new List<int>(fightCfg.targetPartsScoreArr);
+            for (int i = 0; i < fightCfg.targetPartsScoreArr.Length; i++)
+            {
+                _targetData.itemScoreList.Add(fightCfg.targetPartsScoreArr[i]);
+            }
             _targetData.type = FightTargetType.ROBOT;
             _targetData.res = fightCfg.targetRes;
             return _targetData;

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/ScoreSystemData.cs

@@ -43,7 +43,7 @@ namespace GFGGame
                 FightScoreCfg cfg = typeCfgs[j];
                 if (roleData.pardScoreListDic.ContainsKey(cfg.id) == false)
                 {
-                    roleData.pardScoreListDic.Add(cfg.id, new List<int>());
+                    roleData.pardScoreListDic.Add(cfg.id, new List<float>());
                 }
                 if (roleData.pardListDic.ContainsKey(cfg.id) == false)
                 {

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Data/VO/FightData.cs

@@ -12,7 +12,7 @@ namespace GFGGame
         public int cardScore;//卡牌对应主题的属性分数
         public string[] tags = { };////本次战斗要求的标签
         public List<int> skillLvs = new List<int>();
-        public List<int> itemScoreList = new List<int>();//对应服装当前主题的实际分数
+        public List<float> itemScoreList = new List<float>();//对应服装当前主题的实际分数
         public Dictionary<int, int> itemScoreDic = new Dictionary<int, int>();//对应服装当前主题的实际分数
         public int type = 0;
         /**********************************************玩家独立数据*****************************************/
@@ -20,7 +20,7 @@ namespace GFGGame
         public int headId;//头像id
         public int borderId;//头像框id
         public Dictionary<int, List<int>> pardListDic = new Dictionary<int, List<int>>();//战斗部位,部件列表,战斗开始时更新
-        public Dictionary<int, List<int>> pardScoreListDic = new Dictionary<int, List<int>>();//战斗部位,部件分数列表,战斗开始时更新
+        public Dictionary<int, List<float>> pardScoreListDic = new Dictionary<int, List<float>>();//战斗部位,部件分数列表,战斗开始时更新
         public List<int> itemList = new List<int>();
 
         /**********************************************机器人独立数据*****************************************/

+ 7 - 4
GameClient/Assets/Game/HotUpdate/ServerProxy/ArenaSproxy.cs

@@ -317,7 +317,10 @@ namespace GFGGame
                     for (int i = 0; i < response.data.Count; i++)
                     {
                         list[i].cardScore = response.data[i].CardScore;
-                        list[i].itemScoreList = response.data[i].SuitScore;
+                        for (int j = 0; j < response.data[i].SuitScore.Count; j++)
+                        {
+                            list[i].itemScoreList.Add(response.data[i].SuitScore[j]);
+                        }
                         list[i].itemList = response.DressupList[i].EquipIds;
                         list[i].cardId = response.DressupList[i].CardId;
                         List<PassivitySkillCfg> skillCfgs = PassivitySkillCfgArray.Instance.GetCfgsBycardId(response.data[i].CardId);
@@ -424,12 +427,12 @@ namespace GFGGame
                 fightData.tagAddition = robotCfg.tagAddition;
             }
             fightData.itemScoreList.Clear();
-            double randoms = robotProto.Randoms.Count >= robotCfg.partsScoreArr.Length ? (double)robotProto.Randoms[index] / 10000d : 1;
+            float randoms = robotProto.Randoms.Count >= index ? robotProto.Randoms[index] / 10000f : 1f;
 
             for (int i = 0; i < robotCfg.partsScoreArr.Length; i++)
             {
-                double score = (double)robotCfg.partsScoreArr[i] * randoms;
-                fightData.itemScoreList.Add((int)Math.Ceiling(score));
+                float score = robotCfg.partsScoreArr[i] * randoms;
+                fightData.itemScoreList.Add(score);
             }
             fightData.type = FightTargetType.ROBOT;
             fightData.res = string.IsNullOrEmpty(robotProto.RobotHead) ? "self" : robotProto.RobotHead;