|
@@ -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;
|