From 3bd8d2d6eaa12152310338596baeefadee797617 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期五, 14 九月 2018 10:27:19 +0800
Subject: [PATCH] 3488 【前端】【1.0.15】【1.1.0】功能预告优化

---
 System/MainInterfacePanel/FeatureNoticeModel.cs |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/System/MainInterfacePanel/FeatureNoticeModel.cs b/System/MainInterfacePanel/FeatureNoticeModel.cs
index acd196f..19865b7 100644
--- a/System/MainInterfacePanel/FeatureNoticeModel.cs
+++ b/System/MainInterfacePanel/FeatureNoticeModel.cs
@@ -223,15 +223,18 @@
         }
     }
 
-    public void WhetherToPlayTheBox()
+    public IEnumerator WhetherToPlayTheBox()
     {
+        yield return new WaitForSeconds(0.7f);
         var inDungeon = IsDungeon();
         var IsOpenMaininterface = WindowCenter.Instance.CheckOpen<MainInterfaceWin>();
+        var IsOpenOffLineOnHook = WindowCenter.Instance.CheckOpen<OffLineOnHookWin>();
         var treasureModel = ModelCenter.Instance.GetModel<TreasureModel>();
         if (NewBieCenter.Instance.inGuiding || treasureModel.newGotShowing || inDungeon || !IsOpenMaininterface
-            || treasureModel.treasureStageUpShow || WindowCenter.Instance.ExitAnyFullScreenOrMaskWin())
+            || treasureModel.treasureStageUpShow || WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() ||
+            IsOpenOffLineOnHook)
         {
-            return;
+            yield break;
         }
         for (int i = 0; i < FunctionList.Count; i++)
         {
@@ -240,15 +243,19 @@
                 var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(FunctionList[i].FuncId);
                 if (functionForecastConfig.FrameLevel <= 0)
                 {
-                    return;
+                    yield break;
                 }
-                string strKey = "FeatureNotice" + functionForecastConfig.FrameLevel+PlayerDatas.Instance.baseData.PlayerID;
+                string strKey = "FeatureNotice" + functionForecastConfig.FrameLevel + PlayerDatas.Instance.baseData.PlayerID;
                 int type = LocalSave.GetInt(strKey);
                 bool IsOpenMain = WindowCenter.Instance.CheckOpen<MainInterfaceWin>();
                 if (PlayerDatas.Instance.baseData.LV >= functionForecastConfig.FrameLevel && type == 0)
                 {
                     LocalSave.SetInt(strKey, functionForecastConfig.FrameLevel);
-                    WindowCenter.Instance.Open<FeatureNoticeWin>();
+                   var IsOpenFeatureNotice = WindowCenter.Instance.CheckOpen<FeatureNoticeWin>();
+                    if (!IsOpenFeatureNotice)
+                    {
+                        WindowCenter.Instance.Open<FeatureNoticeWin>();
+                    }              
                 }
             }
         }

--
Gitblit v1.8.0