zhaoyang 2 vuotta sitten
vanhempi
commit
14ca13b1a6

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

@@ -70,7 +70,7 @@ namespace GFGGame
                 return false;
             }
             GuideCfg cfg = GuideCfgArray.Instance.GetCfg(guideKey);
-            if (GuideDataManager.currentGuideId != 0 && GuideDataManager.currentGuideId != cfg.id) return false;
+            if (cfg == null || GuideDataManager.currentGuideId != 0 && GuideDataManager.currentGuideId != cfg.id) return false;
             GRoot.inst.touchable = false;
             bool isStoryLevelGuide = cfg.storyLevelId > 0;
             bool isFinishCurId = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_GUIDE + cfg.id) > 0;//当前引导未完成
@@ -149,6 +149,7 @@ namespace GFGGame
         public static bool TryCompleteGuideIndex(string guideKey, int index)
         {
             GuideCfg cfg = GuideCfgArray.Instance.GetCfg(guideKey);
+            if (cfg == null) return false;
             HideGuide();
             if (GuideDataManager.TryCompleteGuideIndex(cfg.id, index))
             {
@@ -169,6 +170,7 @@ namespace GFGGame
 
             GuideCfg cfg = GuideCfgArray.Instance.GetCfg(guideKey);
             bool result = false;
+            if (cfg == null) return;
             if (!GuideDataManager.CheckAllIndexFinish(cfg.id, count)) return;
 
             result = await GuideDataManager.TryCompleteGuide(cfg.id);

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

@@ -73,9 +73,9 @@ namespace GFGGame
 
         public static int IsGuideFinish(string guideKey)
         {
-            if (GameGlobal.skipGuide) return 1;
-
             GuideCfg cfg = GuideCfgArray.Instance.GetCfg(guideKey);
+            if (GameGlobal.skipGuide || cfg == null) return 1;
+
             return StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_GUIDE + cfg.id);
 
         }