Browse Source

词牌升星材料跳到工作室,通关后报错

zhaoyang 3 years ago
parent
commit
2d6a31e833

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

@@ -86,11 +86,11 @@ namespace GFGGame
             if (storyLevelCfg.order > 1 && storyLevelCfg.order < storyLevelCfgs.Count)
             if (storyLevelCfg.order > 1 && storyLevelCfg.order < storyLevelCfgs.Count)
             {
             {
 
 
-                isLastPast = InstanceZonesDataManager.CheckLevelPass(storyLevelCfgs[storyLevelCfg.order].id);
+                isLastPast = InstanceZonesDataManager.CheckLevelPass(storyLevelCfgs[storyLevelCfg.order - 1].id);
 
 
             }
             }
             content = "";
             content = "";
-            if (!isRoleLv) content = string.Format("主角等级达到{0}级解锁", storyLevelCfg.order);
+            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[storyLevelCfg.order - 1].name);
             StoryLevelCfg needStoryLevelCfg = StoryLevelCfgArray.Instance.GetCfg(storyLevelCfg.needStoryLevelId);
             StoryLevelCfg needStoryLevelCfg = StoryLevelCfgArray.Instance.GetCfg(storyLevelCfg.needStoryLevelId);
             if (!isPass) content = string.Format("完成主线{0}-{1}解锁", needStoryLevelCfg.chapterId, needStoryLevelCfg.order);
             if (!isPass) content = string.Format("完成主线{0}-{1}解锁", needStoryLevelCfg.chapterId, needStoryLevelCfg.order);

+ 20 - 2
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachOfItemView.cs

@@ -181,12 +181,30 @@ namespace GFGGame
                             PromptController.Instance.ShowFloatTextPrompt("不在活动周期内");
                             PromptController.Instance.ShowFloatTextPrompt("不在活动周期内");
                             break;
                             break;
                         }
                         }
+
                         int type = studioCfg.funId == typeof(StudioPropertyView).Name ? 1 : 0;
                         int type = studioCfg.funId == typeof(StudioPropertyView).Name ? 1 : 0;
+                        StudioDataManager.Instance.TYPE_SELECT_INDEX = type;
+                        StudioDataManager.Instance.PROPERTY_SELECT_INDEX = 0;
+                        if (studioCfg.funId == typeof(StudioPropertyView).Name)
+                        {
+                            List<StudioCfg> studioCfgs = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name);
+                            for (int i = 0; i < studioCfgs.Count; i++)
+                            {
+                                if (studioCfgs[i].id == studioCfg.id)
+                                {
+                                    StudioDataManager.Instance.PROPERTY_SELECT_INDEX = i;
+                                    break;
+                                }
+                            }
+                        }
                         string viewName = "GFGGame." + studioCfg.funId;
                         string viewName = "GFGGame." + studioCfg.funId;
-                        ViewManager.Show(viewName, new object[] { type, 0 }, _fromeViewDatas);
 
 
+                        ViewManager.Show(viewName, new object[] { type, 0 }, _fromeViewDatas);
+                        StudioDataManager.Instance.VIEW_NAME = studioCfg.funId; ;
                     }
                     }
-                    StoryController.ShowLevelView(levelCfgId);
+
+                    InstanceZonesController.ShowLevelView(levelCfgId, StudioDataManager.Instance.OnFinishStoryLevel);
+                    // StoryController.ShowLevelView(levelCfgId);
                     break;
                     break;
                 case ConstFunctionId.FU_ZHUANG_HE_CHENG:
                 case ConstFunctionId.FU_ZHUANG_HE_CHENG: