|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
using System;
|
|
|
using UnityEngine;
|
|
|
using ET;
|
|
|
+using ProtoBuf.Meta;
|
|
|
|
|
|
namespace GFGGame
|
|
|
{
|
|
@@ -146,14 +147,19 @@ namespace GFGGame
|
|
|
|
|
|
public static bool CheckOpenMainUI()
|
|
|
{
|
|
|
- return CheckLevelPass(1, 4) && GuideDataManager.GetGuideCountCopy(ConstGuideId.SINGLE_FIGHT) > 0;
|
|
|
+ return InstanceZonesDataManager.CheckLevelPass(10004) && GuideDataManager.GetGuideCountCopy(ConstGuideId.SINGLE_FIGHT) > 0;
|
|
|
}
|
|
|
|
|
|
//检查指定章节对应的普通章节是否通关
|
|
|
- public static bool CheckNormalChapterPass(int chapterId)
|
|
|
+ public static bool CheckNeedChapterPass(int chapterId)
|
|
|
{
|
|
|
- int normalChapterId = StoryUtil.GetChapterOrder(chapterId);
|
|
|
- return normalChapterId <= GameGlobal.myNumericComponent.GetAsInt(NumericType.Chapter);
|
|
|
+ var chapterCfg = StoryChapterCfgArray.Instance.GetCfg(chapterId);
|
|
|
+ if (chapterCfg != null)
|
|
|
+{
|
|
|
+ var passLevelOrder = InstanceZonesDataManager.GetPassLevelOrder(chapterCfg.type, chapterCfg.subType, chapterCfg.id);
|
|
|
+ return chapterCfg.levelCount <= passLevelOrder;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
public static bool CheckChapterUnlock(int chapterId)
|
|
@@ -166,7 +172,7 @@ namespace GFGGame
|
|
|
if (CalculateHelper.CheckChapterIsHard(chapterId))
|
|
|
{
|
|
|
//对应普通剧情的章需要开启
|
|
|
- if (!CheckNormalChapterPass(chapterId))
|
|
|
+ if (!CheckNeedChapterPass(chapterId))
|
|
|
{
|
|
|
return false;
|
|
|
}
|