Browse Source

工作室关卡开启检查

zhaoyang 2 years ago
parent
commit
0422623ffa
1 changed files with 4 additions and 4 deletions
  1. 4 4
      GameClient/Assets/Game/HotUpdate/Data/StudioDataManager.cs

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Data/StudioDataManager.cs

@@ -83,15 +83,15 @@ namespace GFGGame
             bool isLastPast = true;
 
             List<StoryLevelCfg> storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(storyLevelCfg.type, storyLevelCfg.subType, storyLevelCfg.chapterId);
-            if (storyLevelCfg.order > 1 && storyLevelCfg.order <= storyLevelCfgs.Count)
+            int index = storyLevelCfgs.IndexOf(storyLevelCfg);
+            if (index > 0 && index < storyLevelCfgs.Count)
             {
-
-                isLastPast = InstanceZonesDataManager.CheckLevelPass(storyLevelCfgs[storyLevelCfg.order - 1].id);
+                isLastPast = InstanceZonesDataManager.CheckLevelPass(storyLevelCfgs[index - 1].id);
 
             }
             content = "";
             if (!isRoleLv) content = string.Format("主角等级达到{0}级解锁", storyLevelCfg.needRoleLv);
-            if (!isLastPast) content = string.Format("需通关{0}", storyLevelCfgs[storyLevelCfg.order - 1].name);
+            if (!isLastPast) content = string.Format("需通关{0}", storyLevelCfgs[index].name);
             StoryLevelCfg needStoryLevelCfg = StoryLevelCfgArray.Instance.GetCfg(storyLevelCfg.needStoryLevelId);
             if (!isPass) content = string.Format("完成主线{0}-{1}解锁", needStoryLevelCfg.chapterId, needStoryLevelCfg.order);
             canFight = isPass && isRoleLv && isLastPast;