From 6ce4ae16561fd205c8bb3f530d5a20033f207f4f Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期五, 24 八月 2018 18:19:12 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into Skill_Polymorph_BeatBackPlayer

---
 System/OpenServerActivity/OSGiftModel.cs |   33 +++++++++++++++++++++------------
 1 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/System/OpenServerActivity/OSGiftModel.cs b/System/OpenServerActivity/OSGiftModel.cs
index 8b748c1..f9921d5 100644
--- a/System/OpenServerActivity/OSGiftModel.cs
+++ b/System/OpenServerActivity/OSGiftModel.cs
@@ -27,22 +27,12 @@
             {
                 onStateUpate(6);
             }
+            UpdateRedpoint();
         }
 
         public event Action<int> onStateUpate;
 
         public bool activate { get; private set; }
-
-        private bool m_GiftGetNotify = false;
-        public bool giftGetNotify
-        {
-            get { return m_GiftGetNotify; }
-            set
-            {
-                m_GiftGetNotify = value;
-                OSGiftRedpoint.state = value ? RedPointState.Simple : RedPointState.None;
-            }
-        }
 
         StoreModel storeModel
         {
@@ -80,6 +70,7 @@
                 {
                     onStateUpate(6);
                 }
+                UpdateRedpoint();
             }
         }
 
@@ -94,6 +85,7 @@
                     onStateUpate(6);
                 }
             }
+            UpdateRedpoint();
         }
 
         public bool CheckActivate()
@@ -131,7 +123,24 @@
 
         public void OnBeforePlayerDataInitialize()
         {
-            giftGetNotify = false;
+        }
+        
+        public void SetDayRemind()
+        {
+            if (OSGiftRedpoint.state == RedPointState.Simple)
+            {
+                DayRemind.Instance.SetDayRemind(DayRemind.OSGIFT_REDPOINT, true);
+                UpdateRedpoint();
+            }
+        }
+
+        void UpdateRedpoint()
+        {
+            OSGiftRedpoint.state = RedPointState.None;
+            if (CheckActivate() && !DayRemind.Instance.GetDayRemind(DayRemind.OSGIFT_REDPOINT))
+            {
+                OSGiftRedpoint.state = RedPointState.Simple;
+            }
         }
 
         public Redpoint OSGiftRedpoint = new Redpoint(MainRedDot.REDPOINT_OPENSERVER, 20906);

--
Gitblit v1.8.0