zhaoyang 2 gadi atpakaļ
vecāks
revīzija
34f443253b

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Data/ArenaDataManager.cs

@@ -21,6 +21,10 @@ namespace GFGGame
         public List<ArenaHistoryData> HistoryDatas = new List<ArenaHistoryData>();//获取竞技场历史记录
 
         /*************************************************************************************************************************************/
+        public List<int> roundTime = new List<int>();
+        public List<int> targetRoundTime = new List<int>();
+        public Dictionary<int, Dictionary<int, List<PassivitySkillLvlCfg>>> vaildSkills = new Dictionary<int, Dictionary<int, List<PassivitySkillLvlCfg>>>();
+        public Dictionary<int, Dictionary<int, List<PassivitySkillLvlCfg>>> targetVaildSkills = new Dictionary<int, Dictionary<int, List<PassivitySkillLvlCfg>>>();
         public int SelectThemeIndex = 0;//当前选中换装主题(ThemeList)的下标
         public int SelectTargetIndex = -1;//当前选中挑战对象的下标
         public int CurFightIndex = 0;//当前挑战场次下标

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

@@ -371,19 +371,25 @@ namespace GFGGame
                 targetMainScore = ScoreSystemData.Instance.GetRobotMainScore(targetRobotData);
                 targetRoundTime = ScoreSystemData.Instance.GetRoundTime(targetRobotData.cardId, targetRobotData.skillLvs);
             }
-
+            if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
+            {
+                ArenaDataManager.Instance.roundTime = roundTime;
+                ArenaDataManager.Instance.targetRoundTime = targetRoundTime;
+                ArenaDataManager.Instance.vaildSkills.Clear();
+                ArenaDataManager.Instance.targetVaildSkills.Clear();
+            }
             int partId = 0;
             int currentTime = BeginTime.PART_ALL_FIGHT_BEGIN;
-            GetSkillScore(currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
-            GetSkillScore(currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
+            GetSkillScore(FightRoleType.MINE, currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
+            GetSkillScore(FightRoleType.TAEGET, currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
 
             for (int i = 0; i < FightScoreCfgArray.Instance.dataArray.Length; i++)
             {
                 partId++;
 
                 currentTime = BeginTime.PART_FIGHT_BEGIN;
-                GetSkillScore(currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
-                GetSkillScore(currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
+                GetSkillScore(FightRoleType.MINE, currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
+                GetSkillScore(FightRoleType.TAEGET, 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)
                 {
@@ -394,11 +400,11 @@ namespace GFGGame
                     targetScore += ScoreSystemData.Instance.GetRobotPartScore(targetRobotData, partId, ClickType.PREFACT_CLICK, 0);
                 }
                 currentTime = BeginTime.PART_PREFACT_CLICK;
-                GetSkillScore(currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
-                GetSkillScore(currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
+                GetSkillScore(FightRoleType.MINE, currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
+                GetSkillScore(FightRoleType.TAEGET, currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
                 currentTime = BeginTime.PART_FIGHT_END;
-                GetSkillScore(currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
-                GetSkillScore(currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
+                GetSkillScore(FightRoleType.MINE, currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
+                GetSkillScore(FightRoleType.TAEGET, currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
             }
             score += ScoreSystemData.Instance.GetAllCircleAddScore(mainScore);
             targetScore += ScoreSystemData.Instance.GetAllCircleAddScore(targetMainScore);
@@ -406,15 +412,29 @@ namespace GFGGame
             _targetScore = Mathf.CeilToInt((float)targetScore);
         }
 
-        private void GetSkillScore(int currentTime, int partId, double mainScore, int cardId, List<int> skillLvs, List<int> roundTime, ref double score, double targetMainScore, int targetCardId, List<int> targetSkillLvs, List<int> targetRoundTime, ref double targetScore)
+        private void GetSkillScore(int roleType, int currentTime, int partId, double mainScore, int cardId, List<int> skillLvs, List<int> roundTime, ref double score, double targetMainScore, int targetCardId, List<int> targetSkillLvs, List<int> targetRoundTime, ref double targetScore)
         {
             List<PassivitySkillLvlCfg> vaildSkills = ScoreSystemData.Instance.GetValidSkills(currentTime, partId, cardId, skillLvs, targetCardId, targetSkillLvs, roundTime, targetRoundTime);
             ScoreSystemData.Instance.GetPartItemSkillScore(vaildSkills, mainScore, targetMainScore, out int skillScore, out int targetSkillScore, out Dictionary<int, int> skillScoreDic);
             score += skillScore;
             targetMainScore += targetSkillScore;
 
-        }
+            if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
+            {
+                ArenaDataManager dataManager = ArenaDataManager.Instance;
+                if (roleType == FightRoleType.MINE)
+                {
+                    if (!dataManager.vaildSkills.ContainsKey(partId)) dataManager.vaildSkills[partId] = new Dictionary<int, List<PassivitySkillLvlCfg>>();
+                    dataManager.vaildSkills[partId][currentTime] = vaildSkills;
 
+                }
+                else
+                {
+                    if (!dataManager.targetVaildSkills.ContainsKey(partId)) dataManager.targetVaildSkills[partId] = new Dictionary<int, List<PassivitySkillLvlCfg>>();
+                    dataManager.targetVaildSkills[partId][currentTime] = vaildSkills;
+                }
+            }
 
+        }
     }
 }

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

@@ -141,12 +141,19 @@ namespace GFGGame
                 _targetRoundTimes = ScoreSystemData.Instance.GetRoundTime(targetRobotData.cardId, targetRobotData.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);
 
+            if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
+            {
+                _roundTimes = ArenaDataManager.Instance.roundTime;
+                _targetRoundTimes = ArenaDataManager.Instance.targetRoundTime;
+            }
+
             _partId = 1;
             _score = 0;
             _targetScore = 0;
@@ -173,15 +180,30 @@ namespace GFGGame
                 targetCardId = targetRobotData.cardId;
                 targetSkillLvs = targetRobotData.skillLvs;
             }
+            List<PassivitySkillLvlCfg> vaildSkills;
             if (roleType == FightRoleType.MINE)
             {
-                List<PassivitySkillLvlCfg> vaildSkills = ScoreSystemData.Instance.GetValidSkills(_currentTime, _partId, roleData.cardId, roleData.skillLvs, targetCardId, targetSkillLvs, _roundTimes, _targetRoundTimes);
+                if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
+                {
+                    vaildSkills = ArenaDataManager.Instance.vaildSkills[_partId][_currentTime];
+                }
+                else
+                {
+                    vaildSkills = ScoreSystemData.Instance.GetValidSkills(_currentTime, _partId, roleData.cardId, roleData.skillLvs, targetCardId, targetSkillLvs, _roundTimes, _targetRoundTimes);
+                }
                 ScoreSystemData.Instance.GetPartItemSkillScore(vaildSkills, _mainScore, _targetMainScore, out skillScore, out targetSkillScore, out skillScoreDic);
                 showCard = ScoreSystemData.Instance.IsShowCard(roleData.cardId, vaildSkills);
             }
             else
             {
-                List<PassivitySkillLvlCfg> vaildSkills = ScoreSystemData.Instance.GetValidSkills(_currentTime, _partId, targetCardId, targetSkillLvs, roleData.cardId, roleData.skillLvs, _roundTimes, _targetRoundTimes);
+                if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
+                {
+                    vaildSkills = ArenaDataManager.Instance.targetVaildSkills[_partId][_currentTime];
+                }
+                else
+                {
+                    vaildSkills = ScoreSystemData.Instance.GetValidSkills(_currentTime, _partId, targetCardId, targetSkillLvs, roleData.cardId, roleData.skillLvs, _roundTimes, _targetRoundTimes);
+                }
                 ScoreSystemData.Instance.GetPartItemSkillScore(vaildSkills, _targetMainScore, _mainScore, out skillScore, out targetSkillScore, out skillScoreDic);
                 showCard = false;
             }

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

@@ -61,7 +61,7 @@ namespace GFGGame
 
             FightRoleData roleData = FightDataManager.Instance.roleData;
 
-            // object targetData;
+
             FightRoleData targetRoleData = null;
             FightRobotData targetRobotData = null;
             int fightType;