瀏覽代碼

竞技场每轮分数随机

zhaoyang 2 年之前
父節點
當前提交
44e0d4d230
共有 1 個文件被更改,包括 11 次插入7 次删除
  1. 11 7
      GameClient/Assets/Game/HotUpdate/ServerProxy/ArenaSproxy.cs

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

@@ -104,9 +104,9 @@ namespace GFGGame
                             await ArenaSproxy.ReqArenaFightAttr(targetData.RoleInfo.roleId, targetData.FightDatas);
                         }
                     }
-                    {
-                        ArenaDataManager.Instance.AddCheckSeasonOpenTimer();
-                    }
+
+                    ArenaDataManager.Instance.AddCheckSeasonOpenTimer();
+
                     if (ViewManager.isViewOpen(typeof(ArenaView).FullName))
                     {
                         ViewManager.Show<ArenaView>();
@@ -422,12 +422,16 @@ namespace GFGGame
                 fightData.tags = new string[1] { ArenaDataManager.Instance.Tag };
                 fightData.tagAddition = robotCfg.tagAddition;
             }
-            fightData.itemScoreList = new List<int>(robotCfg.partsScoreArr);
-
+            fightData.itemScoreList.Clear();
+            for (int i = 0; i < robotCfg.partsScoreArr.Length; i++)
+            {
+                double score = (double)robotCfg.partsScoreArr[i] * (double)robotProto.Randoms[index] / 10000;
+                fightData.itemScoreList.Add((int)Math.Ceiling(score));
+            }
             fightData.type = FightTargetType.ROBOT;
             fightData.res = robotCfg.targetRes;
-            // double cardScore = (double)robotCfg.cardScore * (double)robotProto.Random / 10000;
-            // fightData.cardScore = (int)Math.Ceiling(cardScore);
+            double cardScore = (double)robotCfg.cardScore * (double)robotProto.Randoms[index] / 10000;
+            fightData.cardScore = (int)Math.Ceiling(cardScore);
             fightData.skillLvs.Add(robotCfg.skillLvs);
             fightData.showSuitId = robotProto.SuitList.Count <= index ? 0 : robotProto.SuitList[index];//上赛季没有穿戴数据