Jelajahi Sumber

查阅建档未开启前合成不能跳转

zhaoyang 2 tahun lalu
induk
melakukan
5c524985d2

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

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

+ 11 - 5
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -83,10 +83,10 @@ namespace GFGGame
         protected override void OnShown()
         protected override void OnShown()
         {
         {
             base.OnShown();
             base.OnShown();
-            if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0)
-            {
-                GRoot.inst.touchable = false;
-            }
+            // if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0)
+            // {
+            //     GRoot.inst.touchable = false;
+            // }
 
 
             int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[0];
             int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[0];
             if (this.viewData != null)
             if (this.viewData != null)
@@ -316,6 +316,12 @@ namespace GFGGame
 
 
         private void OnClickBtnBuyTen(EventContext context)
         private void OnClickBtnBuyTen(EventContext context)
         {
         {
+
+            if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0 && !ViewManager.isViewOpen(typeof(GuideView).FullName))
+            {
+                //防止点击太快,在引导开启前就被点击到,导致引导卡死
+                return;
+            }
             GObject obj = context.sender as GObject;
             GObject obj = context.sender as GObject;
             int boxId = (int)obj.data;
             int boxId = (int)obj.data;
             LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(boxId);
             LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(boxId);
@@ -377,8 +383,8 @@ namespace GFGGame
         {
         {
             if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0)
             if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0)
             {
             {
-                GRoot.inst.touchable = true;
                 UpdateToCheckGuide(null);
                 UpdateToCheckGuide(null);
+                GRoot.inst.touchable = true;
             }
             }
             else
             else
             {
             {