From 0012445c0109fa67987800a1bac8f32e989b2d19 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期三, 15 八月 2018 15:16:01 +0800
Subject: [PATCH] Merge branch 'master' into leonard

---
 System/Vip/OSTimeLimitGiftModel.cs |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/System/Vip/OSTimeLimitGiftModel.cs b/System/Vip/OSTimeLimitGiftModel.cs
index a1cc74f..232d885 100644
--- a/System/Vip/OSTimeLimitGiftModel.cs
+++ b/System/Vip/OSTimeLimitGiftModel.cs
@@ -5,7 +5,7 @@
 using UnityEngine;
 namespace Snxxz.UI
 {
-    public class OSTimeLimitGiftModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize
+    public class OSTimeLimitGiftModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize, IOpenServerActivity
     {
         Dictionary<int, List<StoreConfig>> m_OSTimeLimitGifts = new Dictionary<int, List<StoreConfig>>();
 
@@ -16,11 +16,30 @@
         public Redpoint redpoint { get; private set; }
 
         StoreModel m_StoreModel;
+
+        public event Action<int> onStateUpate;
+
         StoreModel storeModel
         {
             get
             {
                 return m_StoreModel ?? (m_StoreModel = ModelCenter.Instance.GetModel<StoreModel>());
+            }
+        }
+
+        public bool IsOpen
+        {
+            get
+            {
+                return TimeUtility.CreateDays <= openDays && FuncOpen.Instance.IsFuncOpen(132);
+            }
+        }
+
+        public bool priorityOpen
+        {
+            get
+            {
+                return redpoint.state == RedPointState.Simple;
             }
         }
 
@@ -50,6 +69,7 @@
             TimeUtility.OnCreateRoleTimeRefresh += OnCreateRoleTimeRefresh;
             storeModel.RefreshBuyShopLimitEvent += UpdateRedpoint;
             FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
+            OpenServerActivityCenter.Instance.Register(3, this);
         }
 
         public override void UnInit()
@@ -85,6 +105,10 @@
             if (_id == 132)
             {
                 UpdateRedpoint();
+                if (onStateUpate != null)
+                {
+                    onStateUpate(3);
+                }
             }
         }
 

--
Gitblit v1.8.0