Browse Source

Merge remote-tracking branch 'remotes/origin/guodong' into zhaoyang

# Conflicts:
#	GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes
zhaoyang 3 years ago
parent
commit
1d6e464b4c
25 changed files with 420 additions and 293 deletions
  1. 9 9
      GameClient/Assets/Editor/Excel/Scanner/InstanceZonesScanner.cs
  2. 3 3
      GameClient/Assets/Editor/Excel/Scanner/ItemApproachScanner.cs
  3. 1 1
      GameClient/Assets/Game/CSShare
  4. 1 1
      GameClient/Assets/Game/HotUpdate/Data/DressUpMenuItemDataManager.cs
  5. 193 10
      GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs
  6. 6 6
      GameClient/Assets/Game/HotUpdate/Data/ScoreSystemData.cs
  7. 15 151
      GameClient/Assets/Game/HotUpdate/Data/StoryDataManager.cs
  8. 2 7
      GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjDataCache.cs
  9. 27 5
      GameClient/Assets/Game/HotUpdate/ServerProxy/RoleSproxy.cs
  10. 11 10
      GameClient/Assets/Game/HotUpdate/ServerProxy/StorySProxy.cs
  11. 3 3
      GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs
  12. 79 0
      GameClient/Assets/Game/HotUpdate/Views/MainStory/InstanceZonesController.cs
  13. 11 0
      GameClient/Assets/Game/HotUpdate/Views/MainStory/InstanceZonesController.cs.meta
  14. 1 1
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryCardChoose.cs
  15. 1 1
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterListView.cs
  16. 5 5
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterView.cs
  17. 24 58
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryController.cs
  18. 3 3
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightQuicklyView.cs
  19. 3 4
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs
  20. 4 4
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs
  21. 1 1
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetView.cs
  22. 13 6
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryLevelInfoView.cs
  23. 1 1
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StorySkillView.cs
  24. 3 3
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StroyFightResultView.cs
  25. BIN
      GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes

+ 9 - 9
GameClient/Assets/Editor/Excel/Scanner/InstanceZonesScanner.cs

@@ -22,14 +22,14 @@ namespace GFGEditor
                     levelCountDIc.TryGetValue(key, out var count);
                     count++;
                     levelCountDIc[key] = count;
-                    var names = new string[] { "_" + nameof(cfg.order), "_" + nameof(cfg.subType) };
-                    var values = new string[] { "" + count, "" + cfg.subType };
-                    SQLiteHelper.Instance.UpdateValues(nameof(StoryLevelCfgArray), names, values, "_" + nameof(cfg.id), "=", cfg.id.ToString());
+                    var names = new string[] { nameof(cfg.order) };
+                    var values = new string[] { "" + count };
+                    SQLiteHelper.Instance.UpdateValues(nameof(StoryLevelCfgArray), names, values, nameof(cfg.id), cfg.id.ToString());
                 }
             }
             catch (Exception e)
             {
-                throw (e);
+                ET.Log.Error(e.ToString());
             }
             finally
             {
@@ -52,14 +52,14 @@ namespace GFGEditor
                 {
                     var key = CalculateHelper.GenerateInstanceZonesLevelStateKey(cfg.type, cfg.subType, cfg.id);
                     levelCountDIc.TryGetValue(key, out var count);
-                    var names = new string[] { "_" + nameof(cfg.levelCount) };
+                    var names = new string[] { nameof(cfg.levelCount) };
                     var values = new string[] { "" + count };
-                    SQLiteHelper.Instance.UpdateValues(nameof(StoryChapterCfgArray), names, values, "_" + nameof(cfg.id), "=", cfg.id.ToString());
+                    SQLiteHelper.Instance.UpdateValues(nameof(StoryChapterCfgArray), names, values, nameof(cfg.id), cfg.id.ToString());
                 }
             }
             catch (Exception e)
             {
-                throw (e);
+                ET.Log.Error(e.ToString());
             }
             finally
             {
@@ -79,9 +79,9 @@ namespace GFGEditor
                 {
                     var key = CalculateHelper.GenerateInstanceZonesLevelStateKey(cfg.type, cfg.subType, cfg.id);
                     levelCountDIc.TryGetValue(key, out var count);
-                    var names = new string[] { "_" + nameof(cfg.levelCount) };
+                    var names = new string[] { nameof(cfg.levelCount) };
                     var values = new string[] { "" + count };
-                    SQLiteHelper.Instance.UpdateValues(nameof(StudioCfgArray), names, values, "_" + nameof(cfg.id), "=", cfg.id.ToString());
+                    SQLiteHelper.Instance.UpdateValues(nameof(StudioCfgArray), names, values, nameof(cfg.id), cfg.id.ToString());
                 }
             }
             catch (Exception e)

+ 3 - 3
GameClient/Assets/Editor/Excel/Scanner/ItemApproachScanner.cs

@@ -31,14 +31,14 @@ namespace GFGEditor
                 {
                     foreach (ItemCfg cfg in dataArray)
                     {
-                        var names = new string[] { "_" + nameof(cfg.subType), "_" + nameof(cfg.itemType), "_" + nameof(cfg.approach) };
+                        var names = new string[] { nameof(cfg.subType), nameof(cfg.itemType), nameof(cfg.approach) };
                         var values = new string[] { "" + cfg.subType, "" + cfg.itemType, "" + cfg.approach };
-                        SQLiteHelper.Instance.UpdateValues(nameof(ItemCfgArray), names, values, "_" + nameof(cfg.id), "=", cfg.id.ToString());
+                        SQLiteHelper.Instance.UpdateValues(nameof(ItemCfgArray), names, values, nameof(cfg.id), cfg.id.ToString());
                     }
                 }
                 catch (Exception e)
                 {
-                    throw (e);
+                    ET.Log.Error(e.ToString());
                 }
                 finally
                 {

+ 1 - 1
GameClient/Assets/Game/CSShare

@@ -1 +1 @@
-Subproject commit d2dc8bda4803ca53845d1c40f8134ad166415257
+Subproject commit 514d94a39a998f98c85f571824c5bf80f8044ef7

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

@@ -231,7 +231,7 @@ namespace GFGGame
 
         public static int GetItemScore(int itemId)
         {
-            return GetItemScore(itemId, StoryDataManager.currentScoreType);
+            return GetItemScore(itemId, InstanceZonesDataManager.currentScoreType);
         }
 
         public static int GetItemScore(int itemId, int scoreType)

+ 193 - 10
GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs

@@ -1,15 +1,149 @@
-using System.Collections.Generic;
+using ET;
+using System;
+using System.Collections.Generic;
+using static UnityEditor.ShaderData;
 
 namespace GFGGame
 {
+    //本类为通用关卡数据类,特殊副本类型数据请写到各自的管理器里
     public class InstanceZonesDataManager
     {
-        //关卡配置表的id
-        public static int currentLevelCfgId;
+        //所有副本关卡通用换装战斗是否使用推荐
+        public static bool usedRecommend;
+        //所有副本关卡通用
+        public static int currentScoreType;
+        //所有副本关卡通用
+        public static int currentCardId = 0;
+
+        private static int _currentLevelCfgId;
+        //所有副本关卡通用配置表的id
+        public static int currentLevelCfgId
+        {
+            get
+            {
+                return _currentLevelCfgId;
+            }
+            set
+            {
+                _currentLevelCfgId = value;
+                var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_currentLevelCfgId);
+                if (levelCfg.type == ConstInstanceZonesType.Story)
+                {
+                    StoryDataManager.currentLevelCfgId = _currentLevelCfgId;
+                }
+            }
+        }
+
+        //所有副本关卡通用
+        public static int currentLevelOrder
+        {
+            get
+            {
+                CalculateHelper.GetStoryChapterLevel(_currentLevelCfgId, out int chapterID, out int levelOrder);
+                return levelOrder;
+            }
+        }
+
+
+        //副本通关状态,key为CalculateHelper.GenerateInstanceZonesLevelStateKey,值为通到关卡编号
+        private static Dictionary<int, int> _passLevelDic = new Dictionary<int, int>();
+
+        //关卡最高分数记录
+        private static Dictionary<int, int> _highestScoreDic = new Dictionary<int, int>();
+        //关卡星数记录
+        private static Dictionary<int, int> _starDic = new Dictionary<int, int>();
+        public static void InitScoreList(List<int> ks, List<int> vs)
+        {
+            usedRecommend = false;
+            _highestScoreDic.Clear();
+            for (var i = 0; i < ks.Count; ++i)
+            {
+                _highestScoreDic.Add(ks[i], vs[i]);
+            }
+        }
+
+        public static void InitStarList(List<int> ks, List<int> vs)
+        {
+            _starDic.Clear();
+            for (var i = 0; i < ks.Count; ++i)
+            {
+                _starDic.Add(ks[i], vs[i]);
+            }
+        }
+
+        //检查更新最高分
+        public static void TryUpdateScore(int levelCfgId, int score)
+        {
+            _highestScoreDic.TryGetValue(levelCfgId, out var scoreHighest);
+            if (score > scoreHighest)
+            {
+                _highestScoreDic[levelCfgId] = score;
+            }
+        }
+
+        public static int GetScoreHighest(int levelID)
+        {
+            if (_highestScoreDic.ContainsKey(levelID))
+            {
+                return _highestScoreDic[levelID];
+            }
+            return 0;
+        }
+
+        //检查并更新关卡星数
+        public static void TryUpdateLevelStar(int levelCfgId, int star)
+        {
+            _starDic.TryGetValue(levelCfgId, out var OldStar);
+            if (star > OldStar)
+            {
+                _starDic[levelCfgId] = star;
+            }
+        }
+
+        public static int GetStarCountHistory(int levelCfgId)
+        {
+            _starDic.TryGetValue(levelCfgId, out var star);
+            return star;
+        }
+
+        public static int GetChapterStarCount(int chapterID)
+        {
+            var star = 0;
+            foreach (var item in _starDic)
+            {
+                CalculateHelper.GetStoryChapterLevel(item.Key, out var tempChapter, out var levelOrder);
+                if (tempChapter == chapterID)
+                {
+                    star += item.Value;
+                }
+            }
+            return star;
+        }
 
 
-        //副本通关状态,key为(副本类型+副本id*1000),值为通到第几关
-        private static Dictionary<int, int> _passLevel = new Dictionary<int, int>();
+        public static void InitLevelPass(List<int> ks, List<int> vs)
+        {
+            _passLevelDic.Clear();
+            for (var i = 0; i < ks.Count; ++i)
+            {
+                _passLevelDic[ks[i]] = vs[i];
+            }
+        }
+
+        /// <summary>
+        /// 设置某关卡通过,参数为关卡配置id
+        /// </summary>
+        /// <param name="levelCfgId"></param>
+        public static void TrySetLevelPass(int levelCfgId)
+        {
+            if (!CheckLevelPass(levelCfgId))
+            {
+                var levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
+                var key = CalculateHelper.GenerateInstanceZonesLevelStateKey(levelCfg.type, levelCfg.subType, levelCfg.chapterId);
+                _passLevelDic[key] = levelCfgId;
+            }
+        }
+
 
         /// <summary>
         /// 获取副本通关关卡
@@ -20,13 +154,19 @@ namespace GFGGame
         public static int GetPassLevelCfgId(int type, int subType, int chapterId)
         {
             var key = CalculateHelper.GenerateInstanceZonesLevelStateKey(type, subType, chapterId);
-            if (_passLevel.TryGetValue(key, out var value))
+            if (_passLevelDic.TryGetValue(key, out var value))
             {
                 return value;
             }
             return 0;
         }
-
+        /// <summary>
+        /// 获取通关关卡的编号
+        /// </summary>
+        /// <param name="type"></param>
+        /// <param name="subType"></param>
+        /// <param name="chapterId"></param>
+        /// <returns></returns>
         public static int GetPassLevelOrder(int type, int subType, int chapterId)
         {
             var levelCfgId = GetPassLevelCfgId(type, subType, chapterId);
@@ -48,7 +188,7 @@ namespace GFGGame
             var levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
             if (levelCfg != null)
             {
-                var passLevelOrder = InstanceZonesDataManager.GetPassLevelOrder(levelCfg.type, levelCfg.subType, levelCfg.chapterId);
+                var passLevelOrder = GetPassLevelOrder(levelCfg.type, levelCfg.subType, levelCfg.chapterId);
                 return levelCfg.order <= passLevelOrder;
             }
             return false;
@@ -65,15 +205,58 @@ namespace GFGGame
         public static bool CheckChapterPass(int type, int subType, int chapterId, int levelCount)
         {
             var chapterCfg = StoryChapterCfgArray.Instance.GetCfg(chapterId);
-            if(chapterCfg != null)
+            if (chapterCfg != null)
             {
                 var passLevelOrder = InstanceZonesDataManager.GetPassLevelOrder(type, subType, chapterId);
-                if(levelCount <= passLevelOrder)
+                if (levelCount <= passLevelOrder)
                 {
                     return true;
                 }
             }
             return false;
         }
+
+        public static int GetResultStarCount(int score)
+        {
+            return CalculateHelper.GetStoryChapterStar(currentLevelCfgId, score);
+        }
+
+        public static bool GetFightResult(int score, out int npcScore)
+        {
+            npcScore = 0;
+            bool equipedNeeded = EquipDataCache.cacher.CheckEquipedFightNeeded();
+            if (!equipedNeeded)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("未穿必需物品");
+                return false;//没穿必需品
+            }
+
+            int starCount = GetResultStarCount(score);
+            if (starCount <= 0)
+            {
+                return false;//低于一星
+            }
+
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(currentLevelCfgId);
+            StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
+            bool hasFightTarget = fightCfg.targetName != null && fightCfg.targetName.Length > 0;
+            if (hasFightTarget)
+            {
+                npcScore = EquipDataCache.cacher.npcTotalScore;
+                if (score < npcScore)
+                {
+                    return false;//分数低于对战对象
+                }
+            }
+
+            return true;
+        }
+
+        public static int GetCanFightTime(int levelID)
+        {
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelID);
+            int times = (int)Math.Floor((float)GameGlobal.myNumericComponent.GetAsInt(NumericType.Power) / levelCfg.power);
+            return times;
+        }
     }
 }

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

@@ -61,7 +61,7 @@ namespace GFGGame
             int[] equipDatas = EquipDataCache.cacher.equipDatas;
             int partScore = 0;
             double tagProportion = 0;
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(StoryDataManager.currentLevelCfgId);
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
 
             for (int i = 0; i < equipDatas.Length; i++)
@@ -82,7 +82,7 @@ namespace GFGGame
                 }
             }
             int roleScore = RoleLevelCfgArray.Instance.GetCfg(GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl)).baseScore;
-            int cardScore = DressUpMenuItemDataManager.GetItemScore(StoryDataManager.currentCardId);
+            int cardScore = DressUpMenuItemDataManager.GetItemScore(InstanceZonesDataManager.currentCardId);
             double tagScore = tagProportion * partScore;
 
             return (partScore + tagScore + roleScore + cardScore) * ConstScoreSystem.MAIN_SCORE;
@@ -145,7 +145,7 @@ namespace GFGGame
                     break;
             }
             int roleScore = RoleLevelCfgArray.Instance.GetCfg(GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl)).baseScore;
-            int cardScore = DressUpMenuItemDataManager.GetItemScore(StoryDataManager.currentCardId);
+            int cardScore = DressUpMenuItemDataManager.GetItemScore(InstanceZonesDataManager.currentCardId);
             double clickScore = (GetPartBaseScore(partId) + (cardScore + roleScore) * clickCoefficient) * ConstScoreSystem.CLICK_SCORE;
             return clickScore;
         }
@@ -153,18 +153,18 @@ namespace GFGGame
         {
             skillScore = 0;
             showCard = false;
-            if (StoryDataManager.currentCardId <= 0)
+            if (InstanceZonesDataManager.currentCardId <= 0)
             {
                 return;
             }
-            Dictionary<int, List<PassivitySkillCfg>> cfgs = SkillDataManager.Instance.dicPassivitySkill[StoryDataManager.currentCardId];
+            Dictionary<int, List<PassivitySkillCfg>> cfgs = SkillDataManager.Instance.dicPassivitySkill[InstanceZonesDataManager.currentCardId];
 
 
             foreach (int key in cfgs.Keys)
             {
 
                 if (cfgs.Count == 0) break;
-                SkillData skillData = SkillDataManager.Instance.GetSkillData(StoryDataManager.currentCardId, key);
+                SkillData skillData = SkillDataManager.Instance.GetSkillData(InstanceZonesDataManager.currentCardId, key);
 
                 PassivitySkillCfg cfg = cfgs[key][skillData.lv - 1];
                 if (partId == cfg.subTypes || cfg.subTypes == 0)

+ 15 - 151
GameClient/Assets/Game/HotUpdate/Data/StoryDataManager.cs

@@ -11,57 +11,40 @@ namespace GFGGame
     {
         public static string priorId = "prior";//首次登录前置剧情id
 
+        //剧情副本专用当前章节
         public static int currentChapterCfgId = 0;
-        public static int currentLevelOrder = 0;
-        //关卡配置表的id
-        public static int currentLevelCfgId;
-
-        //当前关卡序号,从1开始
+        //剧情副本专用当前关卡序号,从1开始
         public static int CurrentChapterOrder
         {
             get
             {
                 var chapterCfg = StoryChapterCfgArray.Instance.GetCfg(currentChapterCfgId);
-                if(chapterCfg != null)
+                if (chapterCfg != null)
                 {
                     return chapterCfg.order;
                 }
                 return 0;
             }
         }
-
-        public static int currentScoreType;
-        public static int currentCardId = 0;
-        public static bool usedRecommend;
-
-
-
-        //关卡最高分数记录
-        private static Dictionary<int, int> _highestScoreDic = new Dictionary<int, int>();
-        //关卡星数记录
-        private static Dictionary<int, int> _starDic = new Dictionary<int, int>();
-        //关卡宝箱状态记录
-        private static Dictionary<int, int[]> _chapterBonusDic = new Dictionary<int, int[]>();
-
-        public static void InitScoreList(List<int> ks, List<int> vs)
+        //剧情副本专用关卡编号
+        private static int _currentLevelCfgId;
+        public static int currentLevelCfgId
         {
-            usedRecommend = false;
-            _highestScoreDic.Clear();
-            for (var i = 0; i < ks.Count; ++i)
+            get
             {
-                _highestScoreDic.Add(ks[i], vs[i]);
+                return _currentLevelCfgId;
             }
-        }
-
-        public static void InitStarList(List<int> ks, List<int> vs)
-        {
-            _starDic.Clear();
-            for(var i = 0; i < ks.Count; ++i)
+            set
             {
-                _starDic.Add(ks[i], vs[i]);
+                _currentLevelCfgId = value;
+                var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_currentLevelCfgId);
+                currentChapterCfgId = levelCfg.chapterId;
             }
         }
 
+        //剧情副本专用关卡宝箱状态记录
+        private static Dictionary<int, int[]> _chapterBonusDic = new Dictionary<int, int[]>();
+
         public static void InitBoxBonusStates(List<int> ks, List<int> vs)
         {
             _chapterBonusDic.Clear();
@@ -84,26 +67,6 @@ namespace GFGGame
             CalculateHelper.GenerateChapterBoxStates(states, stateInt);
         }
 
-        //检查更新最高分
-        public static void TryUpdateScore(int levelCfgId, int score)
-        {
-            _highestScoreDic.TryGetValue(levelCfgId, out var scoreHighest);
-            if (score > scoreHighest)
-            {
-                _highestScoreDic[currentLevelCfgId] = score;
-            }
-        }
-
-        //检查并更新关卡星数
-        public static void TryUpdateLevelStar(int levelCfgId, int star)
-        {
-            _starDic.TryGetValue(levelCfgId, out var OldStar);
-            if(star > OldStar)
-            {
-                _starDic[levelCfgId] = star;
-            }
-        }
-
         //获取宝箱奖励状态
         public static int GetChapterBonusStatus(int chapterID, int index)
         {
@@ -121,27 +84,6 @@ namespace GFGGame
         public static List<ItemData> GetChapterBonus(int chapterID, int index)
         {
             List<ItemData> bonusList = StoryBonusDataCache.GetChapterBonusList(chapterID, index);
-            //foreach (ItemData itemData in bonusList)
-            //{
-            //    ItemDataManager.Add(itemData.id, itemData.num);
-            //}
-            //Dictionary<int, int> statusDic = null;
-            //if (_chapterBonusDic.ContainsKey(chapterID))
-            //{
-            //    statusDic = _chapterBonusDic[chapterID];
-            //}
-            //else
-            //{
-            //    statusDic = new Dictionary<int, int>();
-            //    _chapterBonusDic.Add(chapterID, statusDic);
-            //    statusDic[0] = ConstBonusStatus.CAN_NOT_GET;
-            //    statusDic[1] = ConstBonusStatus.CAN_NOT_GET;
-            //    statusDic[2] = ConstBonusStatus.CAN_NOT_GET;
-            //}
-            //statusDic[index] = ConstBonusStatus.GOT;
-            //string boxStatus = GetBoxStatus(currentChapter);
-            //int starCountChapter = GetChapterStarCount(currentChapter);
-            //GameProxy.ReqUpdateStoryStar(currentChapter, starCountChapter, boxStatus);
             return bonusList;
         }
 
@@ -199,89 +141,11 @@ namespace GFGGame
             return false;
         }
 
-
         public static bool CheckCurrentLevelPass()
         {
             return InstanceZonesDataManager.CheckLevelPass(currentLevelCfgId);
         }
 
-        public static int GetScoreHighest(int levelID)
-        {
-            if (_highestScoreDic.ContainsKey(levelID))
-            {
-                return _highestScoreDic[levelID];
-            }
-            return 0;
-        }
-
-        public static bool GetFightResult(int score, out int npcScore)
-        {
-            npcScore = 0;
-            bool equipedNeeded = EquipDataCache.cacher.CheckEquipedFightNeeded();
-            if (!equipedNeeded)
-            {
-                PromptController.Instance.ShowFloatTextPrompt("未穿必需物品");
-                return false;//没穿必需品
-            }
-
-            int starCount = StoryDataManager.GetResultStarCount(score);
-            if (starCount <= 0)
-            {
-                return false;//低于一星
-            }
-
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(StoryDataManager.currentLevelCfgId);
-            StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
-            bool hasFightTarget = fightCfg.targetName != null && fightCfg.targetName.Length > 0;
-            if (hasFightTarget)
-            {
-                npcScore = EquipDataCache.cacher.npcTotalScore;
-                if(score < npcScore)
-                {
-                    return false;//分数低于对战对象
-                }
-            }
-
-            return true;
-        }
-        public static int GetResultStarCount(int score)
-        {
-            return CalculateHelper.GetStoryChapterStar(currentLevelCfgId, score);
-        }
-
-        public static int GetStarCountHistory(int levelID)
-        {
-            _starDic.TryGetValue(levelID, out var star);
-            return star;
-        }
-
-        public static bool CheckCurrentScoreEnough(int score)
-        {
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(currentLevelCfgId);
-            StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
-            return (score > fightCfg.score1);
-        }
-
-        public static int GetChapterStarCount(int chapterID)
-        {
-            var star = 0;
-            foreach(var item in _starDic)
-            {
-                CalculateHelper.GetStoryChapterLevel(item.Key, out var tempChapter, out var levelOrder);
-                if(tempChapter == chapterID)
-                {
-                    star += item.Value;
-                }
-            }
-            return star;
-        }
-
-        public static int GetCanFightTime(int levelID)
-        {
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelID);
-            int times = (int)Math.Floor((float)GameGlobal.myNumericComponent.GetAsInt(NumericType.Power) / levelCfg.power);
-            return times;
-        }
 
     }
 }

+ 2 - 7
GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjDataCache.cs

@@ -510,7 +510,7 @@ namespace GFGGame
         {
             TakeOffAll(false);
             List<int> recommendList = DressUpMenuItemDataManager.GetRecommendItemList();
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(StoryDataManager.currentLevelCfgId);
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
             //推荐搭配自动穿必穿品
             if (fightCfg.needItemId > 0 && DressUpMenuItemDataManager.CheckHasItem(fightCfg.needItemId) && recommendList.IndexOf(fightCfg.needItemId) < 0)
@@ -532,14 +532,9 @@ namespace GFGGame
             UpdatePicAction();
         }
 
-        public bool CheckCurrentScoreEnough()
-        {
-            return StoryDataManager.CheckCurrentScoreEnough(score);
-        }
-
         public bool CheckEquipedFightNeeded()
         {
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(StoryDataManager.currentLevelCfgId);
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
             if (fightCfg.needItemId > 0)
             {

+ 27 - 5
GameClient/Assets/Game/HotUpdate/ServerProxy/RoleSproxy.cs

@@ -1,11 +1,33 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using ET;
+using ET;
+using GFGGame;
+
+namespace ET
+{
+    public class M2C_NoticeUnitNumericHandler : AMHandler<M2C_NoticeUnitNumeric>
+    {
+        protected override async ETTask Run(Session session, M2C_NoticeUnitNumeric message)
+        {
+            session.ZoneScene()?.CurrentScene()?.GetComponent<UnitComponent>()?
+                .Get(message.UnitId)?.GetComponent<NumericComponent>()?.Set(message.NumericType, message.NewValue);
+
+            switch (message.NumericType)
+            {
+                case NumericType.Lvl:
+                    FunctionOpenDataManager.Instance.CheckHasLvFunOpen((int)message.NewValue);//等级变化要加测是否有功能开启
+                    break;
+                case NumericType.Power:
+                    RoleDataManager.powerTimeServerLock = false;
+                    break;
+            }
+            EventAgent.DispatchEvent(ConstMessage.NUMERIC_CHANGE, message.NumericType);
+            await ETTask.CompletedTask;
+        }
+    }
+}
 
 namespace GFGGame
 {
+
     public static class RoleSproxy
     {
         public static async ETTask ResetDailyData()

+ 11 - 10
GameClient/Assets/Game/HotUpdate/ServerProxy/StorySProxy.cs

@@ -17,9 +17,10 @@ namespace GFGGame
             {
                 if(response.Error == ErrorCode.ERR_Success)
                 {
-                    StoryDataManager.InitScoreList(response.ksScore, response.vsScore);
-                    StoryDataManager.InitStarList(response.ksStar, response.vsStar);
+                    InstanceZonesDataManager.InitScoreList(response.ksScore, response.vsScore);
+                    InstanceZonesDataManager.InitStarList(response.ksStar, response.vsStar);
                     StoryDataManager.InitBoxBonusStates(response.ksBonusState, response.vsBonusState);
+                    InstanceZonesDataManager.InitLevelPass(response.ksPass, response.VsPass);
                 }
             }
         }
@@ -38,13 +39,13 @@ namespace GFGGame
                 {
                     List<ItemData> bonusList = StoryBonusDataCache.GetBonusList(response.LevelCfgId, true, true);
                     BonusController.TryShowBonusList(bonusList);
+                    InstanceZonesDataManager.TrySetLevelPass(response.LevelCfgId);
                     FunctionOpenDataManager.Instance.CheckHasChapterFunOpen(response.LevelCfgId);//首次通过要检查是否有功能开启
-                    StoryController.OnFinishStoryLevel(levelCfgId, true);
+                    InstanceZonesController.OnFinishStoryLevel(levelCfgId, true, true);
                     return;
                 }
             }
-            //异常返回到关卡列表界面
-            ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW));
+            InstanceZonesController.OnFinishStoryLevel(levelCfgId, false, false);
         }
 
         //完成剧情战斗关卡
@@ -63,8 +64,8 @@ namespace GFGGame
                 if(response.Error == ErrorCode.ERR_Success)
                 {
                     //更新数据
-                    StoryDataManager.TryUpdateScore(response.LevelCfgId, response.Score);
-                    StoryDataManager.TryUpdateLevelStar(response.LevelCfgId, response.Star);
+                    InstanceZonesDataManager.TryUpdateScore(response.LevelCfgId, response.Score);
+                    InstanceZonesDataManager.TryUpdateLevelStar(response.LevelCfgId, response.Star);
                     CalculateHelper.GetStoryChapterLevel(response.LevelCfgId, out var chapter, out var level);
                     StoryDataManager.UpdateBoxBonusStates(chapter, response.BoxStates);
                     //展示奖励
@@ -83,6 +84,7 @@ namespace GFGGame
                         //首次通过要检查是否有功能开启
                         FunctionOpenDataManager.Instance.CheckHasChapterFunOpen(response.LevelCfgId);
                     }
+                    InstanceZonesDataManager.TrySetLevelPass(response.LevelCfgId);
                     ViewManager.Show(ViewName.STORY_FIGHT_RESULT_VIEW, new StoryFightResultData
                     {
                         Result = true,
@@ -94,8 +96,7 @@ namespace GFGGame
                     return;
                 }
             }
-            //异常返回到关卡列表界面
-            ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW));
+            InstanceZonesController.OnFinishStoryLevel(levelCfgId, false, false);
         }
 
         //剧情战斗关卡失败,更新最高分
@@ -111,7 +112,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    StoryDataManager.TryUpdateScore(response.LevelCfgId, response.Score); 
+                    InstanceZonesDataManager.TryUpdateScore(response.LevelCfgId, response.Score); 
                 }
             }
         }

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

@@ -102,7 +102,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-            StoryDataManager.usedRecommend = false;
+            InstanceZonesDataManager.usedRecommend = false;
             // _ui.m_comboBox.title = "我的套装";
             _ui.m_txtRecommendCount.SetVar("v1", "" + GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount)).FlushVars();
             _ui.m_btnRecommend.enabled = GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount) > 0;
@@ -136,7 +136,7 @@ namespace GFGGame
                     _ui.m_compNeed.m_listTag.numItems = _fightCfg.needTagsArr.Length;
                 }
             }
-            StoryDataManager.currentScoreType = _fightCfg.scoreType;
+            InstanceZonesDataManager.currentScoreType = _fightCfg.scoreType;
             //一级菜单
             _ui.m_comListType1.m_listType.RemoveChildrenToPool();
             _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 1;
@@ -319,7 +319,7 @@ namespace GFGGame
 
         private void OnClickBtnRecommend()
         {
-            StoryDataManager.usedRecommend = true;
+            InstanceZonesDataManager.usedRecommend = true;
             EquipDataCache.cacher.PutOnRecommendItems();
         }
 

+ 79 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/InstanceZonesController.cs

@@ -0,0 +1,79 @@
+using ET;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GFGGame
+{
+    //所有副本关卡通用类
+    public class InstanceZonesController
+    {
+        public delegate void OnFinishStoryLevelCall(int levelCfgId, bool firstPass, bool success);
+
+        private static OnFinishStoryLevelCall _onFinishStoryLevelCall;
+
+        public static void ShowLevelView(int levelCfgId, OnFinishStoryLevelCall onFinishStoryLevelCall)
+        {
+            _onFinishStoryLevelCall = onFinishStoryLevelCall;
+            InstanceZonesDataManager.currentLevelCfgId = levelCfgId;
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
+            if (levelCfg.fightID.Length > 0)
+            {
+                ViewManager.Show(ViewName.STORY_LEVEL_INFO_VIEW, levelCfgId);
+            }
+            else if (!string.IsNullOrEmpty(levelCfg.storyStartID))
+            {
+                bool skipable = StoryDataManager.CheckCurrentLevelPass();
+                ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { levelCfg.storyStartID, skipable, new OnCompleteStoryDialogCall(OnCompleteChapterStoryDialog) }, null, true);
+            }
+        }
+
+        public static void OnFinishStoryLevel(int levelCfgId, bool firstPass, bool success)
+        {
+            _onFinishStoryLevelCall?.Invoke(levelCfgId, firstPass, success);
+
+        }
+
+
+        public static async ETTask CheckStoryFightResult()
+        {
+            var score = EquipDataCache.cacher.totalScore;
+            //客户端先做判断,成功和失败处理不同
+            var success = InstanceZonesDataManager.GetFightResult(score, out var npcScore);
+            if (success)
+            {
+                await StorySProxy.FinishStoryFightLevel(InstanceZonesDataManager.currentLevelCfgId, score, npcScore, InstanceZonesDataManager.usedRecommend);
+            }
+            else
+            {
+                ViewManager.Show(ViewName.STORY_FIGHT_RESULT_VIEW, new StoryFightResultData
+                {
+                    Result = false,
+                    Score = score,
+                    FirstPass = false,
+                    Star = 0
+                }, null, true);
+                //失败仅判断并更新最高分
+                if (score > InstanceZonesDataManager.GetScoreHighest(InstanceZonesDataManager.currentCardId))
+                {
+                    StorySProxy.StoryFightLevelFail(InstanceZonesDataManager.currentLevelCfgId, score).Coroutine();
+                }
+            }
+        }
+
+        private static void OnCompleteChapterStoryDialog(bool isSkip, object param)
+        {
+            if (!StoryDataManager.CheckCurrentLevelPass())
+            {
+                StorySProxy.FinishStoryDialogLevel(InstanceZonesDataManager.currentLevelCfgId).Coroutine();
+            }
+            else
+            {
+                OnFinishStoryLevel(InstanceZonesDataManager.currentLevelCfgId, false, false);
+            }
+        }
+
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/InstanceZonesController.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 654e0919a1862a94e8ac06098752d39b
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -73,7 +73,7 @@ namespace GFGGame
         {
             int cardId = cardList[_ui.m_listCard.selectedIndex].id;
             PassivitySkillCfg[] cfgs = PassivitySkillCfgArray.Instance.GetCfgs(cardId);
-            StoryDataManager.currentCardId = cfgs.Length > 0 ? cardId : -1;
+            InstanceZonesDataManager.currentCardId = cfgs.Length > 0 ? cardId : -1;
             this.Hide();
             EventAgent.DispatchEvent(ConstMessage.CARD_CHOOSE);
         }

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

@@ -118,7 +118,7 @@ namespace GFGGame
                 UI_ListChapterItem listItem = UI_ListChapterItem.Proxy(_ui.m_listChapter.GetChildAt(i));
                 int chapterID = (int)listItem.target.data;
                 StoryChapterCfg chapterCfg = _chapterCfgs[i];
-                int starCountChapter = StoryDataManager.GetChapterStarCount(chapterCfg.id);
+                int starCountChapter = InstanceZonesDataManager.GetChapterStarCount(chapterCfg.id);
                 listItem.m_content.m_txtProgress.text = "" + starCountChapter + "/" + chapterCfg.bonusStar3;
                 if (StoryDataManager.CheckChapterUnlock(chapterCfg.id))
                 {

+ 5 - 5
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterView.cs

@@ -95,7 +95,7 @@ namespace GFGGame
         {
             StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
             _ui.m_txtChapterName.text = StoryUtil.GetChapterOrderText(_chapterID) + "·" + chapterCfg.name;
-            int starCountChapter = StoryDataManager.GetChapterStarCount(_chapterID);
+            int starCountChapter = InstanceZonesDataManager.GetChapterStarCount(_chapterID);
             _ui.m_txtStarCount.text = "" + starCountChapter + "/" + chapterCfg.bonusStar3;
             UpdateBonusBoxName(_ui.m_bonusBox1, "" + chapterCfg.bonusStar1);
             UpdateBonusBoxName(_ui.m_bonusBox2, "" + chapterCfg.bonusStar2);
@@ -123,7 +123,7 @@ namespace GFGGame
                         if (levelCfg.fightID.Length > 0)
                         {
                             levelItem.m_bg.url = "ui://Main/zx_gka_zb_2";
-                            int score = StoryDataManager.GetScoreHighest(levelCfg.id);
+                            int score = InstanceZonesDataManager.GetScoreHighest(levelCfg.id);
                             if (score <= 0)
                             {
                                 levelItem.m_flower.target.visible = false;
@@ -131,7 +131,7 @@ namespace GFGGame
                             else
                             {
                                 levelItem.m_flower.target.visible = true;
-                                int starCount = StoryDataManager.GetStarCountHistory(levelCfg.id);
+                                int starCount = InstanceZonesDataManager.GetStarCountHistory(levelCfg.id);
                                 StoryUtil.UpdateStar(starCount, levelItem.m_flower.target);
                             }
                         }
@@ -148,8 +148,8 @@ namespace GFGGame
                         // }
                         if (levelItem.m_holder.visible)
                         {
-                            // StoryDataManager.currentChapter = _chapterID;
-                            StoryDataManager.currentLevelOrder = int.Parse(levelItem.target.name.Replace("g", ""));
+                            //设置为解锁关卡
+                            StoryDataManager.currentLevelCfgId = levelCfg.id;
 
                             _unPasslevelItem = levelItem.target;
                             _gameObject = null;

+ 24 - 58
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryController.cs

@@ -1,28 +1,16 @@
 using ET;
 using log4net.Core;
 using System.Collections.Generic;
+using static GFGGame.StoryController;
 
 namespace GFGGame
 {
+    //主线剧情专用类
     public class StoryController
     {
         public static void ShowLevelView(int levelCfgId)
-{
-            CalculateHelper.GetStoryChapterLevel(levelCfgId, out int chapterID, out int levelOrder);
-            StoryDataManager.currentChapterCfgId = chapterID;
-            StoryDataManager.currentLevelCfgId = levelCfgId;
-            InstanceZonesDataManager.currentLevelCfgId = levelCfgId;
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
-            StoryDataManager.currentLevelOrder = levelOrder;
-            if (levelCfg.fightID.Length > 0)
-            {
-                ViewManager.Show(ViewName.STORY_LEVEL_INFO_VIEW, levelCfgId);
-            }
-            else if (levelCfg.storyStartID.Length > 0)
-            {
-                bool skipable = StoryDataManager.CheckCurrentLevelPass();
-                ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { levelCfg.storyStartID, skipable, new OnCompleteStoryDialogCall(OnCompleteChapterStoryDialog) }, null, true);
-            }
+        {
+            InstanceZonesController.ShowLevelView(levelCfgId, OnFinishStoryLevel);
         }
 
         public static void ShowCardStoryDialog(CardStoryCfg cardStoryCfg, CardData cardData)
@@ -31,59 +19,32 @@ namespace GFGGame
         }
         public static void ShowPriorStoryDialog()
         {
-            StoryDataManager.currentChapterCfgId = 10001;
-            StoryDataManager.currentLevelCfgId = 100001001;
-            ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { StoryDataManager.priorId, false, new OnCompleteStoryDialogCall(OnCompleteChapterStoryDialog) }, null, true);
+            InstanceZonesDataManager.currentLevelCfgId = 100001001;
+            ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { StoryDataManager.priorId, false, new OnCompleteStoryDialogCall(OnCompletePriorStoryDialog) }, null, true);
         }
 
-        public static async ETTask CheckStoryFightResult()
+        public static void OnFinishStoryLevel(int levelCfgId, bool firstPass, bool success)
         {
-            var score = EquipDataCache.cacher.totalScore;
-            //客户端先做判断,成功和失败处理不同
-            var success = StoryDataManager.GetFightResult(score, out var npcScore);
             if(success)
             {
-                await StorySProxy.FinishStoryFightLevel(StoryDataManager.currentLevelCfgId, score, npcScore, StoryDataManager.usedRecommend);
-            }
-            else
-            {
-                ViewManager.Show(ViewName.STORY_FIGHT_RESULT_VIEW, new StoryFightResultData
+                //判断是否是首次打通最后一关
+                int nextLevelID = levelCfgId + 1;
+                StoryLevelCfg nextLevelCfg = StoryLevelCfgArray.Instance.GetCfg(nextLevelID);
+                var fistPassLastLvl = (nextLevelCfg == null) && firstPass;
+
+                if (fistPassLastLvl)
                 {
-                    Result = false,
-                    Score = score,
-                    FirstPass = false,
-                    Star = 0
-                }, null, true);
-                //失败仅判断并更新最高分
-                if(score > StoryDataManager.GetScoreHighest(StoryDataManager.currentCardId))
+                    ViewManager.Show(ViewName.STORY_CHAPTER_LIST_VIEW, null, null, true);
+                }
+                else
                 {
-                    StorySProxy.StoryFightLevelFail(StoryDataManager.currentLevelCfgId, score).Coroutine();
+                    ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
                 }
             }
-        }
-
-        public static void OnFinishStoryLevel(int levelCfgId, bool firstPass)
-        {
-            //判断是否是首次打通最后一关
-            int nextLevelID = levelCfgId + 1;
-            StoryLevelCfg nextLevelCfg = StoryLevelCfgArray.Instance.GetCfg(nextLevelID);
-            var fistPassLastLvl = (nextLevelCfg == null) && firstPass;
-
-            if (fistPassLastLvl)
-            {
-                ViewManager.Show(ViewName.STORY_CHAPTER_LIST_VIEW);
-            }
             else
             {
-                ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW));
-            }
-        }
-
-        private static void OnCompleteChapterStoryDialog(bool isSkip, object param)
-        {
-            if (!StoryDataManager.CheckCurrentLevelPass())
-            {
-                StorySProxy.FinishStoryDialogLevel(StoryDataManager.currentLevelCfgId).Coroutine();
+                //异常返回到关卡列表界面
+                ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
             }
         }
 
@@ -94,5 +55,10 @@ namespace GFGGame
             ViewManager.Show(ViewName.CARD_FOSTER_VIEW, cardData, new object[] { ViewName.CARD_DETAIL_VIEW }, true);
             ViewManager.Show(ViewName.CARD_STORY_VIEW, cardData);
         }
+
+        private static void OnCompletePriorStoryDialog(bool isSkip, object param)
+        {
+            ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
+        }
     }
 }

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightQuicklyView.cs

@@ -44,7 +44,7 @@ namespace GFGGame
         {
             base.OnShown();
             int count = (int)viewData;
-            _levelID = StoryDataManager.currentLevelCfgId;
+            _levelID = InstanceZonesDataManager.currentLevelCfgId;
 
             StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
@@ -66,7 +66,7 @@ namespace GFGGame
 
         private void StartFight(int count)
         {
-            int time = StoryDataManager.GetCanFightTime(_levelID);
+            int time = InstanceZonesDataManager.GetCanFightTime(_levelID);
 
             if (_storyType == ConstInstanceZonesSubType.Normal && time < count)
             {
@@ -141,7 +141,7 @@ namespace GFGGame
             if (_ui.m_btnExit.visible)
             {
                 StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
-                int time = StoryDataManager.GetCanFightTime(_levelID);
+                int time = InstanceZonesDataManager.GetCanFightTime(_levelID);
                 time = Math.Min(GameConst.MAX_COUNT_FIGHT_QUICKLY, time);
                 _ui.m_btnFightTimes.visible = time > 0;
                 _ui.m_txtPowerDesc.visible = _ui.m_btnFightTimes.visible;

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

@@ -51,7 +51,7 @@ namespace GFGGame
 
             ScoreSystemData.Instance.SetEquipDicWithType();
 
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(StoryDataManager.currentLevelCfgId);
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
             _ui.m_proScore.target.max = fightCfg.score3;
             _ui.m_proScore.target.value = 0;
@@ -246,14 +246,13 @@ namespace GFGGame
         private void Skip(object param = null)
         {
             Reset();
-            StoryController.CheckStoryFightResult().Coroutine();
+            InstanceZonesController.CheckStoryFightResult().Coroutine();
         }
         private void OnBtnBackClick()
         {
             Reset();
             this.Hide();
-            ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW));
-
+            InstanceZonesController.OnFinishStoryLevel(InstanceZonesDataManager.currentLevelCfgId, false, false);
         }
         private void Reset()
         {

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

@@ -109,7 +109,7 @@ namespace GFGGame
             EventAgent.AddEventListener(ConstMessage.CARD_SKILL, UpdateCircleResult);
 
             SceneController.UpdateRole(EquipDataCache.cacher.equipDatas, _sceneObject);
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(StoryDataManager.currentLevelCfgId);
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
             SceneController.UpdateFightTarget(fightCfg.targetRes, _sceneObject);
             _ui.m_selfName.m_txtName.text = RoleDataManager.roleName;
@@ -195,7 +195,7 @@ namespace GFGGame
             EquipDataCache.cacher.totalScore = (int)Math.Round(_score);
 
 
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(StoryDataManager.currentLevelCfgId);
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
             double targetScore = fightCfg.targetPartsScoreArr[_index] * ConstScoreSystem.PART_SCORE;
             Debug.Log("targetScore:" + targetScore);
@@ -448,7 +448,7 @@ namespace GFGGame
         {
             Reset();
             this.Hide();
-            ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW));
+            InstanceZonesController.OnFinishStoryLevel(InstanceZonesDataManager.currentLevelCfgId, false, false);
 
         }
         protected override void OnHide()
@@ -467,7 +467,7 @@ namespace GFGGame
         private void Skip(object param = null)
         {
             EventAgent.RemoveEventListener(ConstMessage.CARD_SKILL, UpdateCircleResult);
-            StoryController.CheckStoryFightResult().Coroutine();
+            InstanceZonesController.CheckStoryFightResult().Coroutine();
         }
         private void Reset()
         {

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

@@ -42,7 +42,7 @@ namespace GFGGame
                 _sceneObject = GameObject.Instantiate(_scenePrefab);
             }
             SceneController.UpdateRole(EquipDataCache.cacher.equipDatas, _sceneObject, true);
-            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(StoryDataManager.currentLevelCfgId);
+            StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
             SceneController.UpdateFightTarget(fightCfg.targetRes, _sceneObject);
             _ui.m_roleName.m_txtName.text = RoleDataManager.roleName;

+ 13 - 6
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryLevelInfoView.cs

@@ -64,7 +64,7 @@ namespace GFGGame
 
         private void OnClickBtnStart()
         {
-            int time = StoryDataManager.GetCanFightTime(_levelID);
+            int time = InstanceZonesDataManager.GetCanFightTime(_levelID);
             if (time > 0)
             {
                 ViewManager.Show(ViewName.DRESS_UP_FIGHT_VIEW, _levelID, null, true);
@@ -77,7 +77,7 @@ namespace GFGGame
 
         private void OnClickBtnFightOnce()
         {
-            int time = StoryDataManager.GetCanFightTime(_levelID);
+            int time = InstanceZonesDataManager.GetCanFightTime(_levelID);
             if (time > 0)
             {
                 ViewManager.Show(ViewName.STORY_FIGHT_QUICKLY_VIEW, 1);
@@ -127,7 +127,7 @@ namespace GFGGame
         {
             if (_ui.m_groupPass.visible)
             {
-                int time = StoryDataManager.GetCanFightTime(_levelID);
+                int time = InstanceZonesDataManager.GetCanFightTime(_levelID);
                 time = Math.Min(GameConst.MAX_COUNT_FIGHT_QUICKLY, time);
                 if (_storyType == ConstInstanceZonesSubType.Normal)
                 {
@@ -153,7 +153,14 @@ namespace GFGGame
         {
             StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
-            _ui.m_txtTitle.text = StoryDataManager.CurrentChapterOrder + "-" + StoryDataManager.currentLevelOrder + " " + levelCfg.name;
+            var title = levelCfg.name;
+            switch (levelCfg.type)
+            {
+                case ConstInstanceZonesType.Story:
+                    title = StoryDataManager.CurrentChapterOrder + "-" + InstanceZonesDataManager.currentLevelOrder + " " + levelCfg.name;
+                    break;
+            }
+            _ui.m_txtTitle.text = title;
             _ui.m_txtLevelDesc.text = levelCfg.desc;
             _ui.m_txtPowerDesc.SetVar("power", "" + levelCfg.power).FlushVars();
             _ui.m_scoreType.url = "ui://CommonGame/kp_sx_" + fightCfg.scoreType;
@@ -191,7 +198,7 @@ namespace GFGGame
             {
                 _ui.m_listBonus.columnGap = 60;
             }
-            int score = StoryDataManager.GetScoreHighest(_levelID);
+            int score = InstanceZonesDataManager.GetScoreHighest(_levelID);
             if (score > 0)
             {
                 string scoreStr = "" + score;
@@ -201,7 +208,7 @@ namespace GFGGame
                 }
                 _ui.m_txtHighestScore.text = scoreStr;
                 _ui.m_flower.target.visible = true;
-                int starCount = StoryDataManager.GetStarCountHistory(_levelID);
+                int starCount = InstanceZonesDataManager.GetStarCountHistory(_levelID);
                 StoryUtil.UpdateStar(starCount, _ui.m_flower.target);
             }
             else

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

@@ -20,7 +20,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-            CardData data = CardDataManager.GetCardDicByRarity(0)[StoryDataManager.currentCardId];
+            CardData data = CardDataManager.GetCardDicByRarity(0)[InstanceZonesDataManager.currentCardId];
             _ui.m_comSkillCard.m_loaCard.url = ResPathUtil.GetCardSmallPath(data.res);
             PassivitySkillCfg cfg = ScoreSystemData.Instance.GetMainSkillCfg(data.id);
             _ui.m_ComSkillName.target.GetChild("txtName").asTextField.text = cfg.name;

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StroyFightResultView.cs

@@ -91,7 +91,7 @@ namespace GFGGame
                 _ui.m_expBar.target.visible = true;
                 _ui.m_btnClose.enabled = false;
                 //过关
-                StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(StoryDataManager.currentLevelCfgId);
+                StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
                 StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
                 _ui.m_expBar.m_txtLvlAdded.text = "" + fightCfg.exp;
                 Timers.inst.Add(0.5f, 1, AddExp);
@@ -114,10 +114,10 @@ namespace GFGGame
         private void OnClickBtnClose()
         {
             this.Hide();
-            StoryController.OnFinishStoryLevel(StoryDataManager.currentLevelCfgId, _resultData.FirstPass);
+            InstanceZonesController.OnFinishStoryLevel(InstanceZonesDataManager.currentLevelCfgId, _resultData.FirstPass, true);
             //尝试显示奖励
             BonusController.TryShowBonusList(_resultData.BonusList);
-            StoryDataManager.currentCardId = -1;
+            InstanceZonesDataManager.currentCardId = -1;
         }
 
         private void AddExp(object param)

BIN
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes