Просмотр исходного кода

升级界面开启时不引导

zhaoyang 3 лет назад
Родитель
Сommit
f38f7d81df
1 измененных файлов с 1 добавлено и 8 удалено
  1. 1 8
      GameClient/Assets/Game/HotUpdate/Controller/GuideController.cs

+ 1 - 8
GameClient/Assets/Game/HotUpdate/Controller/GuideController.cs

@@ -65,6 +65,7 @@ namespace GFGGame
 
         public static bool TryGuide(GObject target, string guideKey, int index, string guideStr = null, int listIndex = -1, bool checkPriorIndex = true, int yTxt = 0, float devWidth = 0, float devHeight = 0, bool showAni = true, bool showEffect = true, bool isOptionalGuide = false)
         {
+            if (ViewManager.isViewOpen(typeof(RoleLvUpView).Name)) return false;
             GuideCfg cfg = GuideCfgArray.Instance.GetCfg(guideKey);
             if (GuideDataManager.currentGuideId != 0 && GuideDataManager.currentGuideId != cfg.id) return false;
 
@@ -74,14 +75,6 @@ namespace GFGGame
             bool isFinishCurIndex = GuideDataManager.IsGuideIndexFinish(cfg.id, index) == true;//当前index未完成
             bool isFinishPriorIndex = !checkPriorIndex || checkPriorIndex && GuideDataManager.IsGuideIndexFinish(cfg.id, index - 1) == true;//前置index已完成
             bool isCfgChapterOpen = MainStoryDataManager.CheckLevelUnlock(cfg.storyLevelId, false);//引导配置关卡已开启
-            // if (checkChapterPass && !isCfgChapterOpen)
-            // {//cfg.storyLevelId为当前关卡,通关时 MainStoryDataManager.currentLevelCfgId为下一章的第一关,但下一章有可能因为角色等级不足未开启,会导致引导无法正常开启,所以添加是否通关检测
-            //     StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(cfg.storyLevelId);
-            //     if (levelCfg.chapterId - 1 > 0)
-            //     {
-            //         isCfgChapterOpen = MainStoryDataManager.CheckNeedChapterPass(levelCfg.chapterId - 1, out int needChapterId);
-            //     }
-            // }
             bool isCfgChapter = MainStoryDataManager.currentLevelCfgId == 0 || MainStoryDataManager.currentLevelCfgId == cfg.storyLevelId;//无选择(进入游戏时无选择)或当前所选择为配置关卡
 
             bool isRoleLvGuide = cfg.roleLv > 0;