From 40e4b97b2c193cd4e49e4d2cb7b8d59534ada5c1 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期五, 11 一月 2019 14:26:36 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/OpenServerActivity/WishingPoolModel.cs |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/System/OpenServerActivity/WishingPoolModel.cs b/System/OpenServerActivity/WishingPoolModel.cs
index d405b69..e789c64 100644
--- a/System/OpenServerActivity/WishingPoolModel.cs
+++ b/System/OpenServerActivity/WishingPoolModel.cs
@@ -36,8 +36,8 @@
         public void OnPlayerLoginOk()
         {
             GlobalTimeEvent.Instance.secondEvent += UpdateSecond;
-            UpdateFreeWishRedpoint();
             UpdateRedpoint();
+            UpdateFreeWishRedpoint();
         }
 
         public override void UnInit()
@@ -73,8 +73,8 @@
         {
             if (type == Operation.WishingWellInfo && state == 0)
             {
-                UpdateFreeWishRedpoint();
                 UpdateRedpoint();
+                UpdateFreeWishRedpoint();
                 if (onStateUpate != null)
                 {
                     onStateUpate((int)OpenServerActivityCenter.OSActivityType.WishingPool);
@@ -97,8 +97,9 @@
         {
             if (type == Operation.WishingWellInfo && state == 0)
             {
-                UpdateFreeWishRedpoint();
+              
                 UpdateRedpoint();
+                UpdateFreeWishRedpoint();
                 if (onStateUpate != null)
                 {
                     onStateUpate((int)OpenServerActivityCenter.OSActivityType.WishingPool);
@@ -181,7 +182,6 @@
             if(!isCool)
             {
                 UpdateFreeWishRedpoint();
-                UpdateRedpoint();
             }
         }
 
@@ -241,9 +241,9 @@
                     SetWishingAwardData(i, wellItem);
                 }
             }
-            UpdateFreeWishRedpoint();
             UpdateRedpoint();
-            if(UpdateWishAwardEvent != null)
+            UpdateFreeWishRedpoint();
+            if (UpdateWishAwardEvent != null)
             {
                 UpdateWishAwardEvent();
             }
@@ -273,6 +273,7 @@
                 }
             }
             UpdateRedpoint();
+            UpdateFreeWishRedpoint();
         }
 
         public void SetWishingPoolData(int index, WishingWellItem wellItem)
@@ -412,6 +413,14 @@
         {
             freeWishRedpoint.state = RedPointState.None;
             if (!IsOpen) return;
+            for (int i = 0; i < wishPointlist.Count; i++)
+            {
+                var wishPoint = wishPointlist[i];
+                if(wishPoint.state != RedPointState.None)
+                {
+                    return;
+                }
+            }
 
             int second = 0;
             bool isCool = TryGetFreeWishCoolTime(out second);
@@ -429,7 +438,7 @@
                 wishPoint.state = RedPointState.None;
             }
 
-            if (!IsOpen || freeWishRedpoint.state != RedPointState.None) return;
+            if (!IsOpen) return;
 
             for (int i = 0; i < wishPointlist.Count; i++)
             {

--
Gitblit v1.8.0