Quellcode durchsuchen

竞技场改数据结构

zhaoyang vor 2 Jahren
Ursprung
Commit
51248b4535

+ 68 - 50
GameClient/Assets/Game/HotUpdate/Data/ArenaDataManager.cs

@@ -15,7 +15,7 @@ namespace GFGGame
         public int Rank = 10000;//本赛季段位内排名
         public int HighestGrade = 1;//本赛季最高段位
         public int HighestRank = 10000; //本赛最高季段位内排名
-        public List<FightRoleData> DressupList = new List<FightRoleData>();//我的搭配列表
+        public List<FightData> DressupList = new List<FightData>();//我的搭配列表
         public List<ArenaTargetData> Targets = new List<ArenaTargetData>();//对手
         public ArenaTargetData SelfData = new ArenaTargetData();//自己的排行榜信息
         public Dictionary<int, List<ArenaTargetData>> RankDatasDic = new Dictionary<int, List<ArenaTargetData>>();//排行榜数据
@@ -103,15 +103,20 @@ namespace GFGGame
         }
 
         //获取竞技场对手角色战斗数据
-        public FightRoleData GetArenaRoleData(int index, ArenaTargetData arenaTarget)
+        public FightData GetArenaFightData(int index, ArenaTargetData arenaTarget)
         {
-            return arenaTarget.RoleDressupList[index];
-        }
-        //获取竞技场机器人战斗数据
-        public FightRobotData GetArenaRobotData(int index, ArenaTargetData arenaTarget)
-        {
-            return arenaTarget.RobotDressupList[index];
+            return arenaTarget.FightDatas[index];
         }
+        // //获取竞技场对手角色战斗数据
+        // public FightRoleData GetArenaRoleData(int index, ArenaTargetData arenaTarget)
+        // {
+        //     return arenaTarget.RoleDressupList[index];
+        // }
+        // //获取竞技场机器人战斗数据
+        // public FightRobotData GetArenaRobotData(int index, ArenaTargetData arenaTarget)
+        // {
+        //     return arenaTarget.RobotDressupList[index];
+        // }
 
         /// <summary>
         /// 获取推荐卡牌
@@ -125,7 +130,7 @@ namespace GFGGame
                 bool isSame = false;
                 for (int k = 0; k < ArenaDataManager.Instance.ThemeList.Count; k++)
                 {
-                    FightRoleData roleData = ArenaDataManager.Instance.DressupList[k];
+                    FightData roleData = ArenaDataManager.Instance.DressupList[k];
                     if (cardDatas[j].id == roleData.cardId)
                     {
                         isSame = true;
@@ -288,10 +293,10 @@ namespace GFGGame
         /// <param name="roleDatas"></param>
         /// <param name="robotDatas"></param>
         /// <returns></returns>
-        public long GetAllFightScore(int roleType, List<FightRoleData> roleDatas, List<FightRobotData> robotDatas)
+        public long GetAllFightScore(List<FightData> roleDatas)
         {
             long fightScore = 0;
-            List<long> fightScoreDatas = GetFightScoreList(roleType, roleDatas, robotDatas);
+            List<long> fightScoreDatas = GetFightScoreList(roleDatas);
             for (int i = 0; i < fightScoreDatas.Count; i++)
             {
                 fightScore += fightScoreDatas[i];
@@ -304,10 +309,10 @@ namespace GFGGame
         /// index=2:卡牌战力/技能战力
         /// </summary>
         /// <param name="roleType"></param>
-        /// <param name="roleDatas"></param>
+        /// <param name="fightDatas"></param>
         /// <param name="robotDatas"></param>
         /// <returns></returns>
-        public List<long> GetFightScoreList(int roleType, List<FightRoleData> roleDatas, List<FightRobotData> robotDatas)
+        public List<long> GetFightScoreList(List<FightData> fightDatas)
         {
             List<long> fightScoreDatas = new List<long>();
             long itemSum = 0;
@@ -315,17 +320,17 @@ namespace GFGGame
             long skillScore = 0;
             for (int i = 0; i < ThemeList.Count; i++)
             {
-                if (roleType == ArenaFightTargetType.PLAYER)
+                if (fightDatas[i].type == ArenaFightTargetType.PLAYER)
                 {
-                    itemSum += GetItemScoreSum(roleDatas[i].itemScoreList);
-                    clickScore += GetPerfectClickScore(roleDatas[i]) / (long)ConstScoreSystem.PART_SCORE;
-                    skillScore += FightDataManager.Instance.GetSkillFightScore(itemSum, roleDatas[i].baseScore, roleDatas[i].cardId, roleDatas[i].cardScore, roleDatas[i].skillLvs);
+                    itemSum += GetItemScoreSum(fightDatas[i].itemScoreList);
+                    clickScore += GetPerfectClickScore(fightDatas[i]) / (long)ConstScoreSystem.PART_SCORE;
+                    skillScore += FightDataManager.Instance.GetSkillFightScore(itemSum, fightDatas[i].baseScore, fightDatas[i].cardId, fightDatas[i].cardScore, fightDatas[i].skillLvs);
                 }
                 else
                 {
-                    itemSum += GetItemScoreSum(robotDatas[i].itemScoreList);
-                    clickScore += GetRobotPerfectClickScore(robotDatas[i]) / (long)ConstScoreSystem.PART_SCORE;
-                    skillScore += FightDataManager.Instance.GetSkillFightScore(itemSum, robotDatas[i].baseScore, robotDatas[i].cardId, robotDatas[i].cardScore, robotDatas[i].skillLvs);
+                    itemSum += GetItemScoreSum(fightDatas[i].itemScoreList);
+                    clickScore += GetRobotPerfectClickScore(fightDatas[i]) / (long)ConstScoreSystem.PART_SCORE;
+                    skillScore += FightDataManager.Instance.GetSkillFightScore(itemSum, fightDatas[i].baseScore, fightDatas[i].cardId, fightDatas[i].cardScore, fightDatas[i].skillLvs);
                 }
             }
             fightScoreDatas.Add(itemSum);
@@ -349,7 +354,7 @@ namespace GFGGame
 
         }
         //玩家卓越点击战力
-        private long GetPerfectClickScore(FightRoleData roleData)
+        private long GetPerfectClickScore(FightData roleData)
         {
             long clickScore = 0;
             foreach (int key in roleData.pardScoreListDic.Keys)
@@ -359,7 +364,7 @@ namespace GFGGame
             return clickScore;
         }
         //机器人卓越点击战力
-        private long GetRobotPerfectClickScore(FightRobotData robotData)
+        private long GetRobotPerfectClickScore(FightData robotData)
         {
             long clickScore = 0;
             FightScoreCfg[] scoreCfg = FightScoreCfgArray.Instance.dataArray;
@@ -374,37 +379,50 @@ namespace GFGGame
         public void SetTestInfo()
         {
             Targets.Add(ArenaSproxy.GetArenaTargetData(GetArenaTargetProto()));
-            Targets[0].RoleDressupList[0].cardId = 2000009;
-            Targets[0].RoleDressupList[0].cardScore = 100;
-            Targets[0].RoleDressupList[0].skillLvs = new List<int>() { 1, 1, 1 };
-            Targets[0].RoleDressupList[0].itemScoreList = new List<int>() { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
-            Targets[0].RoleDressupList[1].cardId = 2000009;
-            Targets[0].RoleDressupList[1].cardScore = 100;
-            Targets[0].RoleDressupList[1].skillLvs = new List<int>() { 1, 1, 1 };
-            Targets[0].RoleDressupList[1].itemScoreList = new List<int>() { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }; Targets[0].RoleDressupList[2].cardId = 2000009;
-            Targets[0].RoleDressupList[2].cardScore = 100;
-            Targets[0].RoleDressupList[2].skillLvs = new List<int>() { 1, 1, 1 };
-            Targets[0].RoleDressupList[2].itemScoreList = new List<int>() { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
+            Targets[0].FightDatas[0].cardId = 2000009;
+            Targets[0].FightDatas[0].cardScore = 100;
+            Targets[0].FightDatas[0].skillLvs = new List<int>() { 1, 1, 1 };
+            Targets[0].FightDatas[0].type = ArenaFightTargetType.PLAYER;
+            Targets[0].FightDatas[0].itemScoreList = new List<int>() { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
+            Targets[0].FightDatas[1].cardId = 2000009;
+            Targets[0].FightDatas[1].cardScore = 100;
+            Targets[0].FightDatas[1].skillLvs = new List<int>() { 1, 1, 1 };
+            Targets[0].FightDatas[1].type = ArenaFightTargetType.PLAYER;
+            Targets[0].FightDatas[1].itemScoreList = new List<int>() { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
+            Targets[0].FightDatas[2].cardId = 2000009;
+            Targets[0].FightDatas[2].cardScore = 100;
+            Targets[0].FightDatas[2].skillLvs = new List<int>() { 1, 1, 1 };
+            Targets[0].FightDatas[2].type = ArenaFightTargetType.PLAYER;
+            Targets[0].FightDatas[2].itemScoreList = new List<int>() { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
             Targets.Add(ArenaSproxy.GetArenaTargetData(GetArenaTargetProto()));
-            Targets[1].RoleDressupList[0].cardId = 2000009;
-            Targets[1].RoleDressupList[0].cardScore = 100;
-            Targets[1].RoleDressupList[0].skillLvs = new List<int>() { 1, 1, 1 };
-            Targets[1].RoleDressupList[0].itemScoreList = new List<int>() { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
-            Targets[1].RoleDressupList[1].cardId = 2000009;
-            Targets[1].RoleDressupList[1].cardScore = 100;
-            Targets[1].RoleDressupList[1].skillLvs = new List<int>() { 1, 1, 1 };
-            Targets[1].RoleDressupList[1].itemScoreList = new List<int>() { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }; Targets[1].RoleDressupList[2].cardId = 2000009;
-            Targets[1].RoleDressupList[2].cardScore = 100;
-            Targets[1].RoleDressupList[2].skillLvs = new List<int>() { 1, 1, 1 };
-            Targets[1].RoleDressupList[2].itemScoreList = new List<int>() { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
+            Targets[1].FightDatas[0].cardId = 2000009;
+            Targets[1].FightDatas[0].cardScore = 100;
+            Targets[1].FightDatas[0].skillLvs = new List<int>() { 1, 1, 1 };
+            Targets[1].FightDatas[0].type = ArenaFightTargetType.PLAYER;
+            Targets[1].FightDatas[0].itemScoreList = new List<int>() { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
+            Targets[1].FightDatas[1].cardId = 2000009;
+            Targets[1].FightDatas[1].cardScore = 100;
+            Targets[1].FightDatas[1].skillLvs = new List<int>() { 1, 1, 1 };
+            Targets[1].FightDatas[1].type = ArenaFightTargetType.PLAYER;
+            Targets[1].FightDatas[1].itemScoreList = new List<int>() { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
+            Targets[1].FightDatas[2].cardId = 2000009;
+            Targets[1].FightDatas[2].cardScore = 100;
+            Targets[1].FightDatas[2].skillLvs = new List<int>() { 1, 1, 1 };
+            Targets[1].FightDatas[2].type = ArenaFightTargetType.PLAYER;
+            Targets[1].FightDatas[2].itemScoreList = new List<int>() { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
             Targets.Add(ArenaSproxy.GetArenaTargetData(GetArenaTargetProto1()));
-            Targets[2].RobotDressupList[0] = ArenaSproxy.GetFightRobotData(GetArenaTargetProto1().RobotDressupInfo, 0);
-            Targets[2].RobotDressupList[1] = ArenaSproxy.GetFightRobotData(GetArenaTargetProto1().RobotDressupInfo, 0);
-            Targets[2].RobotDressupList[2] = ArenaSproxy.GetFightRobotData(GetArenaTargetProto1().RobotDressupInfo, 0);
-            DressupList.Add(new FightRoleData());
+
+            Targets[2].FightDatas[0] = ArenaSproxy.GetFightRobotData(GetArenaTargetProto1().RobotDressupInfo, 0);
+            Targets[2].FightDatas[1] = ArenaSproxy.GetFightRobotData(GetArenaTargetProto1().RobotDressupInfo, 0);
+            Targets[2].FightDatas[2] = ArenaSproxy.GetFightRobotData(GetArenaTargetProto1().RobotDressupInfo, 0);
+
+            DressupList.Add(new FightData());
             DressupList[0].tags = new string[] { Tag };
-            DressupList.Add(new FightRoleData());
-            DressupList.Add(new FightRoleData());
+            DressupList[0].type = ArenaFightTargetType.PLAYER;
+            DressupList.Add(new FightData());
+            DressupList[1].type = ArenaFightTargetType.PLAYER;
+            DressupList.Add(new FightData());
+            DressupList[2].type = ArenaFightTargetType.PLAYER;
             // DressupList[0].skillLvs = new List<int>() { 1, 1, 1 };
             // DressupList[1].skillLvs = new List<int>() { 1, 1, 1 };
             // DressupList[2].skillLvs = new List<int>() { 1, 1, 1 };

+ 7 - 9
GameClient/Assets/Game/HotUpdate/Data/ArenaViewManager.cs

@@ -41,18 +41,16 @@ namespace GFGGame
 
             long targetScore = targetScores[index];
             // ArenaTargetData targetData = ArenaDataManager.Instance.Targets[index];
-            int targetCardId = 0;
+            int targetCardId = targetData.FightDatas[index].cardId;
             int targetHeadId = 0;
             string res = "";
             if (targetData.Type == ArenaFightTargetType.PLAYER)
             {
-                targetCardId = targetData.RoleDressupList[index].cardId;
-                targetHeadId = targetData.RoleDressupList[index].headId;
+                targetHeadId = targetData.FightDatas[index].headId;
             }
             else
             {
-                targetCardId = targetData.RobotDressupList[index].cardId;
-                res = targetData.RobotDressupList[index].res;
+                res = targetData.FightDatas[index].res;
             }
 
             UI_ListResultItem item = UI_ListResultItem.Proxy(obj);
@@ -121,12 +119,12 @@ namespace GFGGame
         /// <summary>
         /// 更新标签、战力、属性分数值
         /// </summary>
-        public void UpdateValue(GObject obj, int index, List<FightRoleData> roleDatas)
+        public void UpdateValue(GObject obj, int index, List<FightData> roleDatas)
         {
             UI_ComValueInfo com = UI_ComValueInfo.Proxy(obj);
             com.m_scoreType.url = ResPathUtil.GetScorePath(ArenaDataManager.Instance.ThemeList[index]);
             com.m_txtScore.text = FightDataManager.Instance.GetScore(roleDatas[index].itemScoreList).ToString();
-            long fightScore = ArenaDataManager.Instance.GetAllFightScore(ArenaFightTargetType.PLAYER, roleDatas, null);
+            long fightScore = ArenaDataManager.Instance.GetAllFightScore(roleDatas);
             com.m_txtFightScore.SetVar("value", fightScore.ToString()).FlushVars(); ;
             com.m_txtTagScore.text = FightDataManager.Instance.GetTagsScore(roleDatas[index].itemList, roleDatas[index].tags).ToString();
             int count = ArenaDataManager.Instance.GetTagsCount(roleDatas[index].itemList, roleDatas[index].tags);
@@ -150,9 +148,9 @@ namespace GFGGame
         /// <summary>
         /// 更新战力值
         /// </summary>
-        public void UpdateFightScore(GObject obj, List<FightRoleData> roleDatas)
+        public void UpdateFightScore(GObject obj, List<FightData> roleDatas)
         {
-            List<long> fightScore = ArenaDataManager.Instance.GetFightScoreList(ArenaFightTargetType.PLAYER, roleDatas, null);
+            List<long> fightScore = ArenaDataManager.Instance.GetFightScoreList(roleDatas);
             UI_ComFightScore com = UI_ComFightScore.Proxy(obj);
             com.m_txtSuitScore.SetVar("value", fightScore[0].ToString()).FlushVars(); ;
             com.m_txtClickScore.SetVar("value", fightScore[1].ToString()).FlushVars(); ;

+ 11 - 81
GameClient/Assets/Game/HotUpdate/Data/FightDataManager.cs

@@ -24,14 +24,7 @@ namespace GFGGame
         //         EventAgent.DispatchEvent(ConstMessage.DRESS_UP_SCORE_CHANGED, _score);
         //     }
         // }
-        private FightRoleData _roleData = new FightRoleData();
-        public FightRoleData roleData
-        {
-            get
-            {
-                return GetMyFightRoleData();
-            }
-        }
+
         public int GetScore(List<int> itemScoreList)
         {
             int score = 0;
@@ -166,50 +159,9 @@ namespace GFGGame
         }
 
 
-        //获取玩家战斗数据
-        private FightRoleData GetMyFightRoleData()
-        {
 
-            _roleData.name = RoleDataManager.roleName;
-            _roleData.headId = RoleDataManager.headId;
-            // _roleData.headBorderId = RoleDataManager.headBorderId;
-            _roleData.baseScore = RoleLevelCfgArray.Instance.GetCfg(RoleDataManager.lvl).baseScore;//角色等级分数
-            if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
-            {
-                if (ArenaDataManager.Instance.CurFightIndex == 0)
-                {
-                    _roleData.tags = new string[1] { ArenaDataManager.Instance.Tag };
-                }
-                _roleData.scoreType = ArenaDataManager.Instance.DressupList[ArenaDataManager.Instance.CurFightIndex].scoreType;
-                _roleData.cardId = ArenaDataManager.Instance.DressupList[ArenaDataManager.Instance.CurFightIndex].cardId;
-                _roleData.cardScore = ItemDataManager.GetItemAdditionScore(_roleData.cardId, _roleData.scoreType, _roleData.tags);
-                _roleData.itemList = ArenaDataManager.Instance.DressupList[ArenaDataManager.Instance.CurFightIndex].itemList;
-            }
-            else
-            {
-                StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
-                // roleData.fightScene = levelCfg.type;
-                if (!string.IsNullOrEmpty(levelCfg.fightID))
-                {
-                    StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
-                    _roleData.tags = fightCfg.needTagsArr;////本次战斗要求的标签
-                }
-                _roleData.scoreType = InstanceZonesDataManager.currentScoreType; //本次战斗的主题
-                _roleData.cardId = InstanceZonesDataManager.currentCardId; ;//卡牌id
-                _roleData.cardScore = _roleData.cardId == 0 ? 0 : CardDataManager.GetCardDataById(_roleData.cardId).scores[_roleData.scoreType];//卡牌对应主题的属性分数
-                _roleData.itemList = MyDressUpHelper.dressUpObj.itemList;
-
-            }
-            if (_roleData.cardId > 0)
-            {
-                _roleData.skillLvs = SkillDataManager.Instance.GetSkillLvs(_roleData.cardId);
-            }
-            SetItemScoreList(_roleData);
-            ScoreSystemData.Instance.SetEquipScoresWithPartId(_roleData);
-            return _roleData;
-        }
 
-        public void SetItemScoreList(FightRoleData _roleData)
+        public void SetItemScoreList(FightData _roleData)
         {
             _roleData.itemScoreList.Clear();
             for (int i = 0; i < _roleData.itemList.Count; i++)
@@ -219,26 +171,6 @@ namespace GFGGame
             }
         }
 
-        //获取副本机器人战斗数据
-        public FightRobotData GetFightRobotData()
-        {
-            FightRobotData robotData = new FightRobotData();
-
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
-            StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
-            robotData.res = fightCfg.targetRes;
-            robotData.name = fightCfg.targetName;
-            robotData.scoreType = InstanceZonesDataManager.currentScoreType; //本次战斗的主题
-            robotData.baseScore = fightCfg.targetBaseScore;
-            robotData.cardId = fightCfg.targetCardId;
-            robotData.cardScore = fightCfg.targetCardScore;
-            robotData.skillLvs = new List<int>(fightCfg.targetSkillLvsArr);
-            robotData.itemScoreList = new List<int>(fightCfg.targetPartsScoreArr);
-            return robotData;
-        }
-
-
-
         /// <summary>
         /// 0失败1优秀2完美
         /// </summary>
@@ -342,7 +274,7 @@ namespace GFGGame
         /// <param name="targetRobotData"></param>
         /// <param name="_score"></param>
         /// <param name="_targetScore"></param>
-        public void GetQuickFightResult(int roundIndex, FightRoleData myRoleData, int targetType, FightRoleData targetRoleData, FightRobotData targetRobotData, out long _score, out long _targetScore)
+        public void GetQuickFightResult(int roundIndex, FightData myRoleData, FightData targetRoleData, out long _score, out long _targetScore)
         {
             double score = 0;
             double targetScore = 0;
@@ -357,19 +289,17 @@ namespace GFGGame
             List<int> targetRoundTime;
             List<int> roundTime = ScoreSystemData.Instance.GetRoundTime(myRoleData.cardId, myRoleData.skillLvs);
 
-            if (targetType == ArenaFightTargetType.PLAYER)
+            targetCardId = targetRoleData.cardId;
+            targetSkillLvs = targetRoleData.skillLvs;
+            targetRoundTime = ScoreSystemData.Instance.GetRoundTime(targetRoleData.cardId, targetRoleData.skillLvs);
+
+            if (targetRoleData.type == ArenaFightTargetType.PLAYER)
             {
-                targetCardId = targetRoleData.cardId;
-                targetSkillLvs = targetRoleData.skillLvs;
                 targetMainScore = ScoreSystemData.Instance.GetMainScore(targetRoleData);
-                targetRoundTime = ScoreSystemData.Instance.GetRoundTime(targetRoleData.cardId, targetRoleData.skillLvs);
             }
             else
             {
-                targetCardId = targetRobotData.cardId;
-                targetSkillLvs = targetRobotData.skillLvs;
-                targetMainScore = ScoreSystemData.Instance.GetRobotMainScore(targetRobotData);
-                targetRoundTime = ScoreSystemData.Instance.GetRoundTime(targetRobotData.cardId, targetRobotData.skillLvs);
+                targetMainScore = ScoreSystemData.Instance.GetRobotMainScore(targetRoleData);
             }
             if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
             {
@@ -392,13 +322,13 @@ namespace GFGGame
                 GetSkillScore(FightRoleType.MINE, roundIndex, currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
                 GetSkillScore(FightRoleType.TAEGET, roundIndex, currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
                 score += ScoreSystemData.Instance.GetPartScore(myRoleData, partId, ClickType.PREFACT_CLICK, 0);
-                if (targetType == ArenaFightTargetType.PLAYER)
+                if (targetRoleData.type == ArenaFightTargetType.PLAYER)
                 {
                     targetScore += ScoreSystemData.Instance.GetPartScore(targetRoleData, partId, ClickType.PREFACT_CLICK, 0);
                 }
                 else
                 {
-                    targetScore += ScoreSystemData.Instance.GetRobotPartScore(targetRobotData, partId, ClickType.PREFACT_CLICK, 0);
+                    targetScore += ScoreSystemData.Instance.GetRobotPartScore(targetRoleData, partId, ClickType.PREFACT_CLICK, 0);
                 }
                 currentTime = BeginTime.PART_PREFACT_CLICK;
                 GetSkillScore(FightRoleType.MINE, roundIndex, currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);

+ 63 - 0
GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs

@@ -61,8 +61,71 @@ namespace GFGGame
                 return levelCfg.order;
             }
         }
+        private static FightData _roleData = new FightData();
+        public static FightData roleData
+        {
+            get
+            {
+                return GetMyFightRoleData();
+            }
+        }
+        private static FightData _targetData = new FightData();
+        public static FightData targetData
+        {
+            get
+            {
+                return GetFightTargetData();
+            }
+        }
+        //获取副本机器人战斗数据
+        public static FightData GetFightTargetData()
+        {
+
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
+            StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
+            _targetData.name = fightCfg.targetName;
+            _targetData.scoreType = InstanceZonesDataManager.currentScoreType; //本次战斗的主题
+            _targetData.baseScore = fightCfg.targetBaseScore;
+            _targetData.cardId = fightCfg.targetCardId;
+            _targetData.cardScore = fightCfg.targetCardScore;
+            _targetData.tags = fightCfg.needTagsArr;
+            _targetData.skillLvs = new List<int>(fightCfg.targetSkillLvsArr);
+            _targetData.itemScoreList = new List<int>(fightCfg.targetPartsScoreArr);
+            _targetData.type = ArenaFightTargetType.ROBOT;
+            _targetData.res = fightCfg.targetRes;
+            return _targetData;
+        }
+        //获取玩家战斗数据
+        private static FightData GetMyFightRoleData()
+        {
+
+            _roleData.name = RoleDataManager.roleName;
+            _roleData.scoreType = InstanceZonesDataManager.currentScoreType;
+            _roleData.baseScore = RoleLevelCfgArray.Instance.GetCfg(RoleDataManager.lvl).baseScore;
+            _roleData.cardId = InstanceZonesDataManager.currentCardId; ;//卡牌id
+            _roleData.cardScore = _roleData.cardId == 0 ? 0 : CardDataManager.GetCardDataById(_roleData.cardId).scores[_roleData.scoreType];//卡牌对应主题的属性分数
+
+
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
+            if (!string.IsNullOrEmpty(levelCfg.fightID))
+            {
+                StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
+                _roleData.tags = fightCfg.needTagsArr;////本次战斗要求的标签
+            }
+
+            if (_roleData.cardId > 0)
+            {
+                _roleData.skillLvs = SkillDataManager.Instance.GetSkillLvs(_roleData.cardId);
+            }
+            _roleData.type = ArenaFightTargetType.PLAYER;
 
+            _roleData.headId = RoleDataManager.headId;
+            _roleData.itemList = MyDressUpHelper.dressUpObj.itemList;
 
+            FightDataManager.Instance.SetItemScoreList(_roleData);
+            ScoreSystemData.Instance.SetEquipScoresWithPartId(_roleData);
+            return _roleData;
+        }
 
         //副本通关状态,key为CalculateHelper.GenerateInstanceZonesLevelStateKey,值为通到关卡编号
         private static Dictionary<int, int> _passLevelDic = new Dictionary<int, int>();

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

@@ -33,7 +33,7 @@ namespace GFGGame
         /// <summary>
         /// 将穿戴部件分组
         /// </summary>
-        public void SetEquipScoresWithPartId(FightRoleData roleData)
+        public void SetEquipScoresWithPartId(FightData roleData)
         {
             roleData.pardScoreListDic.Clear();
             roleData.pardListDic.Clear();
@@ -74,7 +74,7 @@ namespace GFGGame
         /// 返回总主属性分
         /// </summary>
         /// <returns></returns>
-        public double GetMainScore(FightRoleData roleData)
+        public double GetMainScore(FightData roleData)
         {
             //(部件属性分数+标签分数+人物基础分+卡牌属性分数)*4
 
@@ -91,7 +91,7 @@ namespace GFGGame
             return (baseScore + roleData.baseScore + roleData.cardScore) * ConstScoreSystem.MAIN_SCORE;
         }
 
-        public double GetRobotMainScore(FightRobotData robotData)
+        public double GetRobotMainScore(FightData robotData)
         {
             //(部件属性分数+标签分数+人物基础分+卡牌属性分数)*4
 
@@ -115,7 +115,7 @@ namespace GFGGame
         /// <param name="type">评分部位</param>
         /// <param name="showCard">是否展示卡牌效果</param>
         /// <returns></returns>
-        public int GetPartScore(FightRoleData roleData, int partId, int clickType, double skillScore)
+        public int GetPartScore(FightData roleData, int partId, int clickType, double skillScore)
         {
 
             //部件评分=部件基础分*部件系数
@@ -135,7 +135,7 @@ namespace GFGGame
             return Math.Max(0, score);
         }
 
-        public int GetRobotPartScore(FightRobotData robotData, int partId, int clickType, double skillScore)
+        public int GetRobotPartScore(FightData robotData, int partId, int clickType, double skillScore)
         {
             //部件评分=部件基础分*部件系数
             //点击评分=(部件基础分+(人物基础分+卡牌属性分数)*点击系数)*2.22   (新点击公式,防止点击优秀却因为未穿衣服结果是0分)
@@ -159,7 +159,7 @@ namespace GFGGame
         /// </summary>
         /// <param name="partId">评分部位</param>
         /// <returns></returns>
-        private double GetPartBaseScore(FightRoleData roleData, int partId)
+        private double GetPartBaseScore(FightData roleData, int partId)
         {
             double partScore = 0;
             double tagScore = 0;
@@ -188,7 +188,7 @@ namespace GFGGame
                 return partScore + tagScore;
             }
         }
-        private double GetRobotPartBaseScore(FightRobotData robotData, int partId)
+        private double GetRobotPartBaseScore(FightData robotData, int partId)
         {
             double partBaseScore = robotData.itemScoreList[partId - 1];
             if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)

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

@@ -8,8 +8,9 @@ namespace GFGGame
         public int RankInGrade;//本赛季段位内排名
         public int Type; //类型,由FightTargetType定义
         public OtherRoleInfoData RoleInfo = new OtherRoleInfoData(); //玩家数据
-        public List<FightRoleData> RoleDressupList = new List<FightRoleData>();//搭配列表,与RobotDressupList只能存在一个,取决于Type
-        public List<FightRobotData> RobotDressupList = new List<FightRobotData>();//机器人搭配列表,与RoleDressupList只能存在一个,取决于Type
+        public List<FightData> FightDatas = new List<FightData>();//搭配列表,与RobotDressupList只能存在一个,取决于Type
+        // public List<FightRoleData> RoleDressupList = new List<FightRoleData>();//搭配列表,与RobotDressupList只能存在一个,取决于Type
+        // public List<FightRobotData> RobotDressupList = new List<FightRobotData>();//机器人搭配列表,与RoleDressupList只能存在一个,取决于Type
 
     }
 

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

@@ -2,38 +2,62 @@ using System.Collections.Generic;
 
 namespace GFGGame
 {
-    public class FightRoleData
-    {
+    // public class FightRoleData
+    // {
+
+    //     // public int fightScene;//玩家自己才会填充数据, 战斗场景,由ConstInstanceZonesType定义
+    //     public string name;//玩家名字
+    //     public int headId;//头像id
+    //     public int scoreType;//本次战斗的主题
+    //     public int baseScore;//角色等级分数
+    //     public int cardId;//卡牌id
+    //     public int cardScore;//卡牌对应主题的属性分数
+    //     public string[] tags = { };////本次战斗要求的标签
+    //     public List<int> skillLvs = new List<int>();
+    //     public Dictionary<int, List<int>> pardListDic = new Dictionary<int, List<int>>();//战斗部位,部件列表,战斗开始时更新
+    //     public Dictionary<int, List<int>> pardScoreListDic = new Dictionary<int, List<int>>();//战斗部位,部件分数列表,战斗开始时更新
+    //     public List<int> itemScoreList = new List<int>();//对应服装当前主题的实际分数
+    //     public List<int> itemList = new List<int>();
 
-        // public int fightScene;//玩家自己才会填充数据, 战斗场景,由ConstInstanceZonesType定义
+    // }
+    // public class FightRobotData
+    // {
+    //     public string name;
+    //     // public int lv;//玩家等级
+    //     public string res;//资源名
+    //     public int scoreType;//本次战斗的主题
+    //     public int baseScore;
+    //     public int cardId;
+    //     public int cardScore;
+    //     public string[] tags = { };////本次战斗要求的标签
+    //     public int tagAddition = 0;//标签加成万分比
+    //     public List<int> skillLvs = new List<int>();
+    //     public List<int> itemScoreList = new List<int>();
+    //     public int showSuitId;//机器人服装,仅展示用
+    // }
+    public class FightData
+    {
         public string name;//玩家名字
-        public int headId;//头像id
-        // public int headBorderId;//头像框id
         public int scoreType;//本次战斗的主题
         public int baseScore;//角色等级分数
         public int cardId;//卡牌id
         public int cardScore;//卡牌对应主题的属性分数
         public string[] tags = { };////本次战斗要求的标签
         public List<int> skillLvs = new List<int>();
+        public List<int> itemScoreList = new List<int>();//对应服装当前主题的实际分数
+        public int type = 0;
+        /**********************************************玩家独立数据*****************************************/
+
+        public int headId;//头像id
         public Dictionary<int, List<int>> pardListDic = new Dictionary<int, List<int>>();//战斗部位,部件列表,战斗开始时更新
         public Dictionary<int, List<int>> pardScoreListDic = new Dictionary<int, List<int>>();//战斗部位,部件分数列表,战斗开始时更新
-        public List<int> itemScoreList = new List<int>();//对应服装当前主题的实际分数
         public List<int> itemList = new List<int>();
 
-    }
-    public class FightRobotData
-    {
-        public string name;
-        public int lv;//玩家等级
+        /**********************************************机器人独立数据*****************************************/
         public string res;//资源名
-        public int scoreType;//本次战斗的主题
-        public int baseScore;
-        public int cardId;
-        public int cardScore;
-        public string[] tags = { };////本次战斗要求的标签
-        public int tagAddition = 0;//标签加成万分比
-        public List<int> skillLvs = new List<int>();
-        public List<int> itemScoreList = new List<int>();
-        public int showSuitId;//机器人服装,仅展示用
+        public int tagAddition = 0;//标签加成万分比(竞技场独有)
+        public int showSuitId;//机器人服装,仅展示用(竞技场独有)
+
+
     }
 }

+ 44 - 62
GameClient/Assets/Game/HotUpdate/ServerProxy/ArenaSproxy.cs

@@ -36,25 +36,25 @@ namespace GFGGame
                 if (response.Error == ErrorCode.ERR_Success)
                 {
                     ArenaDataManager.Instance.ThemeList = response.ThemeList;
-                    // ArenaDataManager.Instance.Tag = response.Tag;
+                    ArenaDataManager.Instance.Tag = response.Tag;
                     ArenaDataManager.Instance.SeasonId = response.SeasonId;
                     ArenaDataManager.Instance.Grade = response.Grade;
                     ArenaDataManager.Instance.Rank = response.RankInGrade;
                     ArenaDataManager.Instance.HighestGrade = response.HighestGradeOfSeason;
                     ArenaDataManager.Instance.HighestRank = response.HighestRankInGradeOfSeason;
+                    OtherRoleInfoData roleInfo = new OtherRoleInfoData();
+
+                    roleInfo.roleName = RoleDataManager.roleName;
+                    roleInfo.roleLv = RoleDataManager.lvl;
+                    roleInfo.headId = RoleDataManager.headId;
 
                     ArenaDataManager.Instance.Clear();
                     for (int i = 0; i < response.ThemeList.Count; i++)
                     {
-                        FightRoleData roleData = new FightRoleData();
-                        // roleData.name = RoleDataManager.roleName;
-                        // roleData.headId = RoleDataManager.headId;
-                        roleData.scoreType = ArenaDataManager.Instance.ThemeList[i];
-                        roleData.cardId = response.DressupList.Count > i ? response.DressupList[i].CardId : 0;
-                        roleData.itemList = response.DressupList.Count > i ? response.DressupList[i].EquipIds : new List<int>();
+                        FightData roleData = GetFightRoleData(response.DressupList[i], roleInfo, i);
+
                         FightDataManager.Instance.SetItemScoreList(roleData);
                         ScoreSystemData.Instance.SetEquipScoresWithPartId(roleData);
-                        if (i == 0) roleData.tags = new string[] { ArenaDataManager.Instance.Tag };
                         ArenaDataManager.Instance.DressupList.Add(roleData);
                     }
 
@@ -120,29 +120,7 @@ namespace GFGGame
                 }
             }
         }
-        // //检测顽疾是否能战斗
-        // public static async ETTask<bool> ReqCheckArenaFight()
-        // {
-        //     S2C_ArenaFight response = null;
-        //     response = (S2C_ArenaFight)await MessageHelper.SendToServer(new C2S_ArenaFight() { });
-        //     if (response != null)
-        //     {
-        //         if (response.Error == ErrorCode.ERR_Success)
-        //         {
-        //             return true;
-        //         }
-        //         else
-        //         {
-        //             ArenaDataManager.Instance.Targets.Clear();
-        //             for (int i = 0; i < response.targets.Count; i++)
-        //             {
-        //                 ArenaDataManager.Instance.Targets.Add(GetArenaTargetData(response.targets[i]));
-        //             }
-        //             PromptController.Instance.ShowFloatTextPrompt("该玩家排名已经发生变化,请重新选择");
-        //         }
-        //     }
-        //     return false;
-        // }
+
 
         //挑战
         public static async ETTask<bool> ReqArenaFight(bool isWin, ArenaTargetData targetData, List<long> selfFightPower, List<long> targetFightPower, List<long> myScore, List<long> targetScore)
@@ -237,7 +215,7 @@ namespace GFGGame
         }
 
         //获取对手服装属性
-        public static async ETTask ReqArenaFightAttr(long roleId, List<FightRoleData> list)
+        public static async ETTask ReqArenaFightAttr(long roleId, List<FightData> list)
         {
             S2C_ArenaFightAttr response = null;
             response = (S2C_ArenaFightAttr)await MessageHelper.SendToServer(new C2S_ArenaFightAttr() { TargetRoleId = roleId });
@@ -289,64 +267,68 @@ namespace GFGGame
             else
             {
                 ArenaRobotCfg robotCfg = ArenaRobotCfgArray.Instance.GetCfg(arenaTargetProto.RobotDressupInfo.RobotId);
-
                 arenaTarget.RoleInfo.roleId = 0;
                 arenaTarget.RoleInfo.roleName = robotCfg.gradeName;
                 arenaTarget.RoleInfo.roleLv = robotCfg.level;
                 arenaTarget.RoleInfo.headRes = robotCfg.targetRes;
             }
-            arenaTarget.RoleDressupList.Clear();
-            arenaTarget.RobotDressupList.Clear();
 
+            arenaTarget.FightDatas.Clear();
             for (int j = 0; j < ArenaDataManager.Instance.ThemeList.Count; j++)
             {
                 if (arenaTarget.Type == ArenaFightTargetType.PLAYER)
                 {
-                    FightRoleData roleData = GetFightRoleData(arenaTargetProto.PlayerDressupList[j], arenaTarget.RoleInfo, j);
-                    arenaTarget.RoleDressupList.Add(roleData);
+                    FightData roleData = GetFightRoleData(arenaTargetProto.PlayerDressupList[j], arenaTarget.RoleInfo, j);
+                    arenaTarget.FightDatas.Add(roleData);
                 }
                 else if (arenaTarget.Type == ArenaFightTargetType.ROBOT)
                 {
-                    FightRobotData robotData = GetFightRobotData(arenaTargetProto.RobotDressupInfo, j);
-                    arenaTarget.RobotDressupList.Add(robotData);
+                    FightData robotData = GetFightRobotData(arenaTargetProto.RobotDressupInfo, j);
+                    arenaTarget.FightDatas.Add(robotData);
                 }
             }
             return arenaTarget;
         }
 
-        private static FightRoleData GetFightRoleData(ArenaDressupProto dressupProto, OtherRoleInfoData roleInfo, int index)
+        private static FightData GetFightRoleData(ArenaDressupProto dressupProto, OtherRoleInfoData roleInfo, int index)
         {
-            FightRoleData roleData = new FightRoleData();
-            roleData.name = roleInfo.roleName;
-            roleData.headId = roleInfo.headId;
+            FightData fightData = new FightData();
+            fightData.name = roleInfo.roleName;
+            fightData.scoreType = ArenaDataManager.Instance.ThemeList[index];
+            fightData.baseScore = RoleLevelCfgArray.Instance.GetCfg(roleInfo.roleLv).baseScore;
+            fightData.cardId = dressupProto.CardId;
+            if (index == 0) fightData.tags = new string[1] { ArenaDataManager.Instance.Tag };
 
-            roleData.baseScore = RoleLevelCfgArray.Instance.GetCfg(roleInfo.roleLv).baseScore;
-            roleData.cardId = dressupProto.CardId;
-            roleData.itemList = dressupProto.EquipIds;
+            fightData.type = ArenaFightTargetType.PLAYER;
+            fightData.headId = roleInfo.headId;
+            fightData.itemList = dressupProto.EquipIds;
 
-            if (index == 0) roleData.tags = new string[1] { ArenaDataManager.Instance.Tag };
 
-            return roleData;
+            return fightData;
         }
-        public static FightRobotData GetFightRobotData(ArenaRobotProto robotProto, int index)
+        public static FightData GetFightRobotData(ArenaRobotProto robotProto, int index)
         {
             ArenaRobotCfg robotCfg = ArenaRobotCfgArray.Instance.GetCfg(robotProto.RobotId);
-            FightRobotData robotData = new FightRobotData();
-            robotData.name = robotCfg.gradeName;
-            robotData.res = robotCfg.targetRes;
-            robotData.itemScoreList = new List<int>(robotCfg.partsScoreArr);
-            robotData.baseScore = robotCfg.baseScore;
-            robotData.cardId = robotProto.CardIdList[index];
-            double cardScore = (double)robotCfg.cardScore * (double)robotProto.Random / 10000 * 100;
-            robotData.cardScore = (int)Math.Ceiling(cardScore);
-            robotData.skillLvs.Add(robotCfg.skillLvs);
-            robotData.showSuitId = robotProto.SuitList[index];
+            FightData fightData = new FightData();
+            fightData.name = robotCfg.gradeName;
+            fightData.scoreType = ArenaDataManager.Instance.ThemeList[index];
+            fightData.baseScore = robotCfg.baseScore;
+            fightData.cardId = robotProto.CardIdList[index];
             if (index == 0)//只有第一个主题才计算标签
             {
-                robotData.tags = new string[1] { ArenaDataManager.Instance.Tag };
-                robotData.tagAddition = robotCfg.tagAddition;
+                fightData.tags = new string[1] { ArenaDataManager.Instance.Tag };
+                fightData.tagAddition = robotCfg.tagAddition;
             }
-            return robotData;
+            fightData.itemScoreList = new List<int>(robotCfg.partsScoreArr);
+
+            fightData.type = ArenaFightTargetType.ROBOT;
+            fightData.res = robotCfg.targetRes;
+            double cardScore = (double)robotCfg.cardScore * (double)robotProto.Random / 10000 * 100;
+            fightData.cardScore = (int)Math.Ceiling(cardScore);
+            fightData.skillLvs.Add(robotCfg.skillLvs);
+            fightData.showSuitId = robotProto.SuitList[index];
+
+            return fightData;
         }
     }
 }

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaDressInfoView.cs

@@ -15,7 +15,7 @@ namespace GFGGame
         private GameObject _sceneObject;
         private DressUpObj _dressUpObj;
         private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
-        private List<FightRoleData> _roleDatas;//可能是自己的搭配,也可能是对方玩家的搭配
+        private List<FightData> _roleDatas;//可能是自己的搭配,也可能是对方玩家的搭配
         // private List<FightRobotData> _robotDatas;//对方机器人搭配
         private int _themeIndex = 0;
         private List<int> _itemList;
@@ -71,7 +71,7 @@ namespace GFGGame
             base.OnShown();
             _roleType = (int)(this.viewData as object[])[0];
             _themeIndex = (int)(this.viewData as object[])[1];
-            _roleDatas = (this.viewData as object[])[2] as List<FightRoleData>;
+            _roleDatas = (this.viewData as object[])[2] as List<FightData>;
             // _robotDatas = (this.viewData as object[])[3] as List<FightRobotData>;
 
             _ui.m_c1.selectedIndex = _roleType;
@@ -125,7 +125,7 @@ namespace GFGGame
             for (int i = 0; i < ArenaDataManager.Instance.ThemeList.Count; i++)
             {
                 int scoreType = ArenaDataManager.Instance.ThemeList[i];
-                FightRoleData roleData = ArenaDataManager.Instance.DressupList[i];
+                FightData roleData = ArenaDataManager.Instance.DressupList[i];
                 roleData.scoreType = scoreType;
                 roleData.itemList = ArenaDataManager.Instance.GetRecommentItemList(scoreType, roleData.tags);
                 roleData.cardId = ArenaDataManager.Instance.GetRecommentCardId(scoreType, roleData.itemList);

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaFightRecordView.cs

@@ -62,7 +62,7 @@ namespace GFGGame
             item.m_ctrResult.selectedIndex = historyData.isWin ? 1 : 0;
             item.m_ctrDan.selectedIndex = historyData.GradeChangeType;
             item.m_txtRank.text = historyData.targetData.RankInGrade.ToString();
-            item.m_txtTargetFightScore.text = string.Format("竞技场战力:{0}", ArenaDataManager.Instance.GetAllFightScore(historyData.targetData.Type, historyData.targetData.RoleDressupList, historyData.targetData.RobotDressupList));
+            item.m_txtTargetFightScore.text = string.Format("竞技场战力:{0}", ArenaDataManager.Instance.GetAllFightScore(historyData.targetData.FightDatas));
             ArenaViewManager.Instance.UpdateDanIcon(item.m_loaDanIcon, historyData.targetData.Grade);
             TimeUtil.FormattingTime(historyData.FightTime, TimeHelper.ServerNow(), out int num, out string str);
             str = num < 60 ? "刚刚" : str + "前";
@@ -98,7 +98,7 @@ namespace GFGGame
                 PromptController.Instance.ShowFloatTextPrompt("玩家不在线");
                 return;
             }
-            ViewManager.Show<ArenaDressInfoView>(new object[] { targetData.Type, 0, targetData.RoleDressupList, targetData.RobotDressupList }, new object[] { typeof(ArenaFightRecordView).FullName, null }, true);
+            ViewManager.Show<ArenaDressInfoView>(new object[] { FightRoleType.TAEGET, 0, targetData.FightDatas }, new object[] { typeof(ArenaFightRecordView).FullName, null }, true);
 
         }
     }

+ 5 - 4
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaRankView.cs

@@ -104,6 +104,7 @@ namespace GFGGame
             if (result)
             {
                 _ui.m_listRank.RefreshVirtualList();
+                _ui.m_comMyRank.m_btnLook.visible = false;
                 UpdateOtherItem(ArenaDataManager.Instance.SelfData, _ui.m_comMyRank.target, true);
             }
         }
@@ -175,7 +176,7 @@ namespace GFGGame
             else
             {
                 item.m_txtName.text = arenaData.RoleInfo.roleName;
-                long fightScore = ArenaDataManager.Instance.GetAllFightScore(arenaData.Type, arenaData.RoleDressupList, arenaData.RobotDressupList);
+                long fightScore = ArenaDataManager.Instance.GetAllFightScore(arenaData.FightDatas);
                 item.m_txtFightScore.text = string.Format("竞技场战力:{0}", fightScore);
                 item.m_txtDanRank.text = string.Format("段位排行:{0}", arenaData.Grade);
                 ArenaViewManager.Instance.UpdateDanIcon(item.m_loaDanIcon, arenaData.Grade);
@@ -218,7 +219,7 @@ namespace GFGGame
             {
                 item.m_txtRank.text = arenaData.RankInGrade.ToString();
                 item.m_txtName.text = arenaData.RoleInfo.roleName;
-                long fightScore = ArenaDataManager.Instance.GetAllFightScore(arenaData.Type, arenaData.RoleDressupList, arenaData.RobotDressupList);
+                long fightScore = ArenaDataManager.Instance.GetAllFightScore(arenaData.FightDatas);
                 item.m_txtFightScore.text = string.Format("竞技场战力:{0}", fightScore);
                 item.m_txtDanRank.text = arenaData.Grade.ToString();
                 ArenaViewManager.Instance.UpdateDanIcon(item.m_loaDanIcon, arenaData.Grade);
@@ -245,12 +246,12 @@ namespace GFGGame
         private void OnBtnLookClick(EventContext context)
         {
             ArenaTargetData targetData = (context.sender as GObject).data as ArenaTargetData;
-            if (targetData.Type == ArenaFightTargetType.ROBOT)
+            if (targetData == null || targetData.Type == ArenaFightTargetType.ROBOT)
             {
                 PromptController.Instance.ShowFloatTextPrompt("玩家不在线");
                 return;
             }
-            ViewManager.Show<ArenaDressInfoView>(new object[] { targetData.Type, 0, targetData.RoleDressupList, targetData.RobotDressupList }, new object[] { typeof(ArenaView).FullName, null }, true);
+            ViewManager.Show<ArenaDressInfoView>(new object[] { FightRoleType.TAEGET, 0, targetData.FightDatas }, new object[] { typeof(ArenaView).FullName, null }, true);
         }
     }
 }

+ 2 - 8
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaRoundResultView.cs

@@ -88,14 +88,8 @@ namespace GFGGame
         private void StartNextRound(object param)
         {
             ArenaTargetData targetData = _dataManager.Targets[_dataManager.SelectTargetIndex];
-            if (targetData.Type == ArenaFightTargetType.PLAYER)
-            {
-                ViewManager.Show<StoryFightTargetScoreView>(new object[] { targetData.Type, _dataManager.DressupList[_dataManager.CurFightIndex], targetData.RoleDressupList[_dataManager.CurFightIndex], null }, null, true);
-            }
-            else
-            {
-                ViewManager.Show<StoryFightTargetScoreView>(new object[] { targetData.Type, _dataManager.DressupList[_dataManager.CurFightIndex], null, targetData.RobotDressupList[_dataManager.CurFightIndex] }, null, true);
-            }
+
+            ViewManager.Show<StoryFightTargetScoreView>(new object[] { _dataManager.DressupList[_dataManager.CurFightIndex], targetData.FightDatas[_dataManager.CurFightIndex] }, null, true);
         }
         private void FinishFight()
         {

+ 20 - 20
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaView.cs

@@ -111,7 +111,7 @@ namespace GFGGame
             UpdateNormal();
             UpdateValue();
             UpdateRole();
-            // GetFightResult();
+            GetFightResult();
         }
 
         protected override void OnHide()
@@ -195,7 +195,7 @@ namespace GFGGame
                 PromptController.Instance.ShowFloatTextPrompt("结算中......");
                 return;
             }
-            ViewManager.Show<ArenaDressInfoView>(new object[] { FightRoleType.MINE, 0, _dataManager.DressupList, null }, new object[] { typeof(ArenaView).FullName, _targetData }, true);
+            ViewManager.Show<ArenaDressInfoView>(new object[] { FightRoleType.MINE, 0, _dataManager.DressupList }, new object[] { typeof(ArenaView).FullName, _targetData }, true);
         }
 
         private void OnBtnQuickFightClick()
@@ -210,7 +210,7 @@ namespace GFGGame
             targetSceneObj.SetActive(false);
         }
 
-        private async void OnBtnFightClick()
+        private void OnBtnFightClick()
         {
             for (int i = 0; i < _dataManager.DressupList.Count; i++)
             {
@@ -221,7 +221,7 @@ namespace GFGGame
                 }
             }
 
-            GetFightResult();
+            // GetFightResult();
             if (_ui.m_btnQuickFight.selected)
             {
                 ViewManager.Show<ArenaResultQuickView>();
@@ -245,21 +245,21 @@ namespace GFGGame
                 long score = 0;
                 long targetScore = 0;
 
-                if (_targetData.Type == ArenaFightTargetType.PLAYER)
-                {
-                    FightDataManager.Instance.GetQuickFightResult(i, ArenaDataManager.Instance.DressupList[i], _targetData.Type, _targetData.RoleDressupList[i], null, out score, out targetScore);
-                }
-                else
-                {
-                    FightDataManager.Instance.GetQuickFightResult(i, ArenaDataManager.Instance.DressupList[i], _targetData.Type, null, _targetData.RobotDressupList[i], out score, out targetScore);
-                }
+                // if (_targetData.Type == ArenaFightTargetType.PLAYER)
+                // {
+                FightDataManager.Instance.GetQuickFightResult(i, ArenaDataManager.Instance.DressupList[i], _targetData.FightDatas[i], out score, out targetScore);
+                // }
+                // else
+                // {
+                //     FightDataManager.Instance.GetQuickFightResult(i, ArenaDataManager.Instance.DressupList[i], _targetData.Type, null, _targetData.RobotDressupList[i], out score, out targetScore);
+                // }
                 _dataManager.myScore.Add(score);
                 _dataManager.targetScore.Add(targetScore);
                 if (score > targetScore) winCount++;
             }
 
-            _dataManager.myFightScore = _dataManager.GetFightScoreList(ArenaFightTargetType.PLAYER, _dataManager.DressupList, null); ;
-            _dataManager.targetFightScore = _dataManager.GetFightScoreList(_targetData.Type, _targetData.RoleDressupList, _targetData.RobotDressupList); ;
+            _dataManager.myFightScore = _dataManager.GetFightScoreList(_dataManager.DressupList);
+            _dataManager.targetFightScore = _dataManager.GetFightScoreList(_targetData.FightDatas);
         }
         private void UpdateView()
         {
@@ -276,11 +276,11 @@ namespace GFGGame
             _ui.m_loaScore2.url = ResPathUtil.GetScorePath(_dataManager.ThemeList[2]);
             string openTime = TimeUtil.FormattingTime3(TimeUtil.DateTimeToTimestamp(_arenaCfg.openTime));
             string endTime = TimeUtil.FormattingTime3(TimeUtil.DateTimeToTimestamp(_arenaCfg.endTime));
-            _ui.m_txtTime.text = string.Format("赛季时间:{0}/{1}", openTime, endTime);
+            _ui.m_txtTime.text = string.Format("赛季时间:{0}-{1}", openTime, endTime);
             _ui.m_txtName.text = RoleDataManager.roleName;
             _ui.m_txtRank.text = string.Format("段位排名:{0}", _dataManager.Rank);
             _ui.m_txtDanTitle.text = ArenaRankCfgArray.Instance.GetCfg(_dataManager.Grade).gradeName;
-            long fightScore = _dataManager.GetAllFightScore(ArenaFightTargetType.PLAYER, _dataManager.DressupList, null);
+            long fightScore = _dataManager.GetAllFightScore(_dataManager.DressupList);
             _ui.m_txtFightScore.text = string.Format("竞技场战力:{0}", fightScore);
             _ui.m_btnQuickFight.selected = _dataManager.QuickFight;
             ArenaViewManager.Instance.UpdateFightScore(_ui.m_comFightScore.target, _dataManager.DressupList);
@@ -326,11 +326,11 @@ namespace GFGGame
                 targetSceneObj.SetActive(true);
                 if (_targetData.Type == ArenaFightTargetType.PLAYER)
                 {
-                    _targetDressUpObj.PutOnItemList(_targetData.RoleDressupList[0].itemList);
+                    _targetDressUpObj.PutOnItemList(_targetData.FightDatas[0].itemList);
                 }
                 else
                 {
-                    _targetDressUpObj.PutOnSuitCfg(_targetData.RobotDressupList[0].showSuitId, false);
+                    _targetDressUpObj.PutOnSuitCfg(_targetData.FightDatas[0].showSuitId, false);
                 }
             }
         }
@@ -360,7 +360,7 @@ namespace GFGGame
             item.m_txtDanTitle.text = rankCfg.gradeName;
             item.m_comLv.GetChild("txtLvl").asTextField.text = targetData.RoleInfo.roleLv.ToString();
 
-            long fightScore = _dataManager.GetAllFightScore(targetData.Type, targetData.RoleDressupList, targetData.RobotDressupList);
+            long fightScore = _dataManager.GetAllFightScore(targetData.FightDatas);
             item.m_txtFightScore.text = string.Format("竞技场战力:{0}", fightScore);
             item.m_txtRank.text = string.Format("段位排名:{0}", targetData.RankInGrade);
 
@@ -397,7 +397,7 @@ namespace GFGGame
                 PromptController.Instance.ShowFloatTextPrompt("玩家不在线");
                 return;
             }
-            ViewManager.Show<ArenaDressInfoView>(new object[] { targetData.Type, 0, targetData.RoleDressupList, targetData.RobotDressupList }, new object[] { typeof(ArenaView).FullName, _targetData }, true);
+            ViewManager.Show<ArenaDressInfoView>(new object[] { FightRoleType.TAEGET, 0, targetData.FightDatas }, new object[] { typeof(ArenaView).FullName, _targetData }, true);
         }
     }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/DressUp/ArenaDressUpFightView.cs

@@ -16,7 +16,7 @@ namespace GFGGame
         private UI_ArenaDressUpFightUI _ui;
         private DressUpObj _dressUpData = new DressUpObj();
         private ArenaDataManager _dataManager;
-        public FightRoleData _roleData;
+        public FightData _roleData;
         // private int _fightID;
         // private int _levelID;
         private float listType1X = 0;

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -965,7 +965,7 @@ namespace GFGGame
 
         private void UpdateScore()
         {
-            _ui.m_txtScore.text = "" + FightDataManager.Instance.GetScore(FightDataManager.Instance.roleData.itemScoreList).ToString();
+            _ui.m_txtScore.text = "" + FightDataManager.Instance.GetScore(InstanceZonesDataManager.roleData.itemScoreList).ToString();
             // GuideController.TryGuideDressUpFightViewBtnNext(_ui.m_btnNext);
         }
 

+ 0 - 6
GameClient/Assets/Game/HotUpdate/Views/MainStory/ArenaFightResultView.cs

@@ -12,12 +12,6 @@ namespace GFGGame
     {
         private UI_ArenaFightResultUI _ui;
 
-        // private StoryLevelCfg _levelCfg;
-        // private StoryFightResultData _resultData;
-        private List<FightRoleData> roleDatas;
-        private List<ArenaTargetData> targetDatas;
-
-
         public override void Dispose()
         {
 

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs

@@ -10,7 +10,7 @@ namespace GFGGame
     public class StoryFightSingleScoreView : BaseView
     {
         private UI_StoryFightSingleScoreUI _ui;
-        private FightRoleData roleData;
+        private FightData roleData;
         private int _partId;//当前评分part
         private int _score;//当前总分数
         private int _skillScore = 0;//当前卡牌技能分
@@ -102,7 +102,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-            roleData = FightDataManager.Instance.roleData;
+            roleData = InstanceZonesDataManager.roleData;
             // ScoreSystemData.Instance.SetEquipScoresWithPartId(roleData);
 
             _nTexture = new NTexture(FightDataManager.Instance.RoleTextuex);

+ 33 - 41
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -12,10 +12,11 @@ namespace GFGGame
     {
         private UI_StoryFightTargetScoreUI _ui;
 
-        private int targetType = ArenaFightTargetType.ROBOT;
-        private FightRoleData roleData;
-        private FightRoleData targetRoleData;
-        private FightRobotData targetRobotData;
+        // private int targetType = ArenaFightTargetType.ROBOT;
+        private FightData roleData;
+        private FightData targetData;
+        // private FightRoleData targetRoleData;
+        // private FightRobotData targetRobotData;
 
 
         private GameObject _gameObject2;
@@ -104,10 +105,10 @@ namespace GFGGame
         {
             base.OnShown();
 
-            targetType = (int)(this.viewData as object[])[0];
-            roleData = (this.viewData as object[])[1] as FightRoleData;
-            targetRoleData = (this.viewData as object[])[2] as FightRoleData;
-            targetRobotData = (this.viewData as object[])[3] as FightRobotData;
+            // targetType = (int)(this.viewData as object[])[0];
+            roleData = (this.viewData as object[])[0] as FightData;
+            targetData = (this.viewData as object[])[1] as FightData;
+            // targetRobotData = (this.viewData as object[])[3] as FightRobotData;
             if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
             {
                 _nTexture = new NTexture(ArenaDataManager.Instance.TextureDic[ArenaDataManager.Instance.CurFightIndex]);
@@ -133,26 +134,23 @@ namespace GFGGame
             _ui.m_proScore.m_comBar.target.width = 0;
 
 
-            if (targetType == ArenaFightTargetType.PLAYER)
+            if (targetData.type == ArenaFightTargetType.PLAYER)
             {
-                RoleInfoManager.Instance.UpdateHead(_ui.m_targetHead, targetRoleData.headId, 0);
-                _ui.m_proScore.m_txtNpcScore.text = targetRoleData.name + " 0";
-                // ScoreSystemData.Instance.SetEquipScoresWithPartId(targetRoleData);
-                _targetMainScore = ScoreSystemData.Instance.GetMainScore(targetRoleData);
-                _targetRoundTimes = ScoreSystemData.Instance.GetRoundTime(targetRoleData.cardId, targetRoleData.skillLvs);
+                RoleInfoManager.Instance.UpdateHead(_ui.m_targetHead, targetData.headId, 0);
+                _targetMainScore = ScoreSystemData.Instance.GetMainScore(targetData);
             }
-            else if (targetType == ArenaFightTargetType.ROBOT)
+            else if (targetData.type == ArenaFightTargetType.ROBOT)
             {
-                RoleInfoManager.Instance.UpdateNpcHead(_ui.m_targetHead, targetRobotData.res);
-                _ui.m_proScore.m_txtNpcScore.text = targetRobotData.name + " 0";
-                _targetMainScore = ScoreSystemData.Instance.GetRobotMainScore(targetRobotData);
-                _targetRoundTimes = ScoreSystemData.Instance.GetRoundTime(targetRobotData.cardId, targetRobotData.skillLvs);
+                RoleInfoManager.Instance.UpdateNpcHead(_ui.m_targetHead, targetData.res);
+                _targetMainScore = ScoreSystemData.Instance.GetRobotMainScore(targetData);
             }
 
+            _ui.m_proScore.m_txtNpcScore.text = targetData.name + " 0";
+            _targetRoundTimes = ScoreSystemData.Instance.GetRoundTime(targetData.cardId, targetData.skillLvs);
+
 
             RoleInfoManager.Instance.UpdateHead(_ui.m_myHead, roleData.headId, 0);
             _ui.m_proScore.m_txtMineScore.text = RoleDataManager.roleName + " 0";
-            // ScoreSystemData.Instance.SetEquipScoresWithPartId(roleData);
             _mainScore = ScoreSystemData.Instance.GetMainScore(roleData);
             _roundTimes = ScoreSystemData.Instance.GetRoundTime(roleData.cardId, roleData.skillLvs);
 
@@ -178,16 +176,10 @@ namespace GFGGame
         {
             int targetCardId;
             List<int> targetSkillLvs;
-            if (targetType == ArenaFightTargetType.PLAYER)
-            {
-                targetCardId = targetRoleData.cardId;
-                targetSkillLvs = targetRoleData.skillLvs;
-            }
-            else
-            {
-                targetCardId = targetRobotData.cardId;
-                targetSkillLvs = targetRobotData.skillLvs;
-            }
+
+            targetCardId = targetData.cardId;
+            targetSkillLvs = targetData.skillLvs;
+
             List<PassivitySkillLvlCfg> vaildSkills;
             if (roleType == FightRoleType.MINE)
             {
@@ -410,13 +402,13 @@ namespace GFGGame
 
             int _partScore = ScoreSystemData.Instance.GetPartScore(roleData, _partId, clickType, _skillScore);
             int _targetPartScore;
-            if (targetType == ArenaFightTargetType.PLAYER)
+            if (targetData.type == ArenaFightTargetType.PLAYER)
             {
-                _targetPartScore = ScoreSystemData.Instance.GetPartScore(targetRoleData, _partId, ClickType.PREFACT_CLICK, _targetSkillScore);
+                _targetPartScore = ScoreSystemData.Instance.GetPartScore(targetData, _partId, ClickType.PREFACT_CLICK, _targetSkillScore);
             }
             else
             {
-                _targetPartScore = ScoreSystemData.Instance.GetRobotPartScore(targetRobotData, _partId, ClickType.PREFACT_CLICK, _targetSkillScore);
+                _targetPartScore = ScoreSystemData.Instance.GetRobotPartScore(targetData, _partId, ClickType.PREFACT_CLICK, _targetSkillScore);
             }
             // Debug.Log("partId:" + _partId + "    skillScore:" + _partScore);
             // Debug.Log("partId:" + _partId + "   targetSkillScore: " + _targetPartScore);
@@ -455,15 +447,15 @@ namespace GFGGame
         private void UpdateProgress(Action onFinish)
         {
             _ui.m_proScore.m_txtMineScore.text = RoleDataManager.roleName + _score;
-            if (targetType == ArenaFightTargetType.PLAYER)
-            {
+            // if (targetData.type == ArenaFightTargetType.PLAYER)
+            // {
 
-                _ui.m_proScore.m_txtNpcScore.text = targetRoleData.name + _targetScore;
-            }
-            else
-            {
-                _ui.m_proScore.m_txtNpcScore.text = targetRobotData.name + _targetScore;
-            }
+            _ui.m_proScore.m_txtNpcScore.text = targetData.name + _targetScore;
+            // }
+            // else
+            // {
+            //     _ui.m_proScore.m_txtNpcScore.text = targetRobotData.name + _targetScore;
+            // }
             double proportion = _score + _targetScore == 0 ? 0 : _score / (_score + _targetScore);
             float width = (float)(proportion * _ui.m_proScore.target.width);
             width = width > _ui.m_proScore.m_comBar.target.initWidth ? _ui.m_proScore.m_comBar.target.initWidth : width;

+ 20 - 30
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetView.cs

@@ -71,72 +71,62 @@ namespace GFGGame
             MyDressUpHelper.dressUpObj.setSceneObj(_sceneObject, true);
 
 
-            FightRoleData roleData = FightDataManager.Instance.roleData;
+            FightData roleFightData = null;
+            FightData targetFightData = null;
 
-
-            FightRoleData targetRoleData = null;
-            FightRobotData targetRobotData = null;
-            int fightType;
             if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
             {
-                roleData = ArenaDataManager.Instance.DressupList[ArenaDataManager.Instance.CurFightIndex];
+                roleFightData = ArenaDataManager.Instance.DressupList[ArenaDataManager.Instance.CurFightIndex];
                 MyDressUpHelper.dressUpObj.PutOnItemList(ArenaDataManager.Instance.DressupList[ArenaDataManager.Instance.CurFightIndex].itemList);
-                ArenaTargetData arenaTarget = ArenaDataManager.Instance.Targets[ArenaDataManager.Instance.SelectTargetIndex];
-                if (arenaTarget.Type == ArenaFightTargetType.ROBOT)
+
+                targetFightData = ArenaDataManager.Instance.Targets[ArenaDataManager.Instance.SelectTargetIndex].FightDatas[0];
+                _ui.m_targetName.m_txtName.text = targetFightData.name;
+
+                if (targetFightData.type == ArenaFightTargetType.ROBOT)
                 {
                     _sceneTargetObj.SetActive(false);
                     _sceneNpcObj.SetActive(true);
-                    fightType = ArenaFightTargetType.ROBOT;
-                    targetRobotData = ArenaDataManager.Instance.GetArenaRobotData(0, arenaTarget);
-                    _ui.m_targetName.m_txtName.text = targetRobotData.name;
-
-                    SceneController.UpdateFightTarget(targetRobotData.res, _sceneObject);
+                    SceneController.UpdateFightTarget(targetFightData.res, _sceneObject);
                 }
                 else
                 {
                     _sceneTargetObj.SetActive(true);
                     _sceneNpcObj.SetActive(false);
-
-                    fightType = ArenaFightTargetType.PLAYER;
-                    targetRoleData = ArenaDataManager.Instance.GetArenaRoleData(0, arenaTarget);
                     _targetDressUpObj.setSceneObj(_sceneTargetObj, true, false);
-                    _targetDressUpObj.PutOnItemList(arenaTarget.RoleDressupList[ArenaDataManager.Instance.CurFightIndex].itemList);
+                    _targetDressUpObj.PutOnItemList(targetFightData.itemList);
 
-                    _ui.m_targetName.m_txtName.text = targetRoleData.name;
 
                 }
-                string musicName = "fight";
-                if (!string.IsNullOrEmpty(musicName))
-                {
-                    MusicManager.Instance.Play(ResPathUtil.GetMusicPath(musicName, "mp3"));
-                }
+
+                MusicManager.Instance.Play(ResPathUtil.GetMusicPath("fight", "mp3"));
+
             }
             else
             {
+                roleFightData = InstanceZonesDataManager.roleData;
                 MyDressUpHelper.dressUpObj.UpdateRoleView();
 
                 _sceneTargetObj.SetActive(false);
                 _sceneNpcObj.SetActive(true);
 
-                fightType = ArenaFightTargetType.ROBOT;
-                targetRobotData = FightDataManager.Instance.GetFightRobotData();
+                targetFightData = InstanceZonesDataManager.GetFightTargetData();
+                _ui.m_targetName.m_txtName.text = targetFightData.name;
+                SceneController.UpdateFightTarget(targetFightData.res, _sceneObject);
+
                 StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
                 StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
                 if (!string.IsNullOrEmpty(fightCfg.music))
                 {
                     MusicManager.Instance.Play(ResPathUtil.GetMusicPath(fightCfg.music, "mp3"));
                 }
-
-                SceneController.UpdateFightTarget(targetRobotData.res, _sceneObject);
-                _ui.m_targetName.m_txtName.text = targetRobotData.name;
             }
 
-            _ui.m_roleName.m_txtName.text = RoleDataManager.roleName;
+            _ui.m_roleName.m_txtName.text = roleFightData.name;
 
             Timers.inst.Add(1.1f, 1, (object param) =>
             {
                 this.Hide();
-                ViewManager.Show<StoryFightTargetScoreView>(new object[] { fightType, roleData, targetRoleData, targetRobotData });
+                ViewManager.Show<StoryFightTargetScoreView>(new object[] { roleFightData, targetFightData });
             });
         }