From 0dceecbd538f90c9cd8a8d5a786dbcda95ba90a6 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 21 五月 2019 17:15:07 +0800
Subject: [PATCH] 3335 灵根提升优化

---
 System/Alchemy/AlchemyDrugBatchUseWin.cs |   12 ++++++++++++
 System/Role/ReikiRootModel.cs            |    7 ++++++-
 System/Alchemy/AlchemyUseDrugCell.cs     |    5 +++++
 3 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/System/Alchemy/AlchemyDrugBatchUseWin.cs b/System/Alchemy/AlchemyDrugBatchUseWin.cs
index daa9638..1a32c1d 100644
--- a/System/Alchemy/AlchemyDrugBatchUseWin.cs
+++ b/System/Alchemy/AlchemyDrugBatchUseWin.cs
@@ -108,6 +108,13 @@
         {
             var count = (int)Mathf.Ceil(m_SplitSlider.value);
 
+            var isAddReikiPoint = false;
+            var config = ItemConfig.Get(itemId);
+            if (config != null && config.Effect1 == 200)
+            {
+                isAddReikiPoint = true;
+            }
+
             var items = packModel.GetItemsById(PackType.Item, itemId);
             if (items != null)
             {
@@ -130,6 +137,11 @@
                 }
             }
 
+            if (isAddReikiPoint)
+            {
+                ModelCenter.Instance.GetModel<ReikiRootModel>().reikiPointPromoteSymbol = true;
+            }
+
             CloseImmediately();
         }
     }
diff --git a/System/Alchemy/AlchemyUseDrugCell.cs b/System/Alchemy/AlchemyUseDrugCell.cs
index 03a2c43..978d2e7 100644
--- a/System/Alchemy/AlchemyUseDrugCell.cs
+++ b/System/Alchemy/AlchemyUseDrugCell.cs
@@ -103,6 +103,11 @@
                         }
                         else if (ItemOperateUtility.Instance.CheckItemUselimit(itemId))
                         {
+                            var config = ItemConfig.Get(itemId);
+                            if (config != null && config.Effect1 == 200)
+                            {
+                                ModelCenter.Instance.GetModel<ReikiRootModel>().reikiPointPromoteSymbol = true;
+                            }
                             ItemOperateUtility.Instance.UseItem(list[0].guid);
                         }
                     }
diff --git a/System/Role/ReikiRootModel.cs b/System/Role/ReikiRootModel.cs
index 84c2b73..64fa27b 100644
--- a/System/Role/ReikiRootModel.cs
+++ b/System/Role/ReikiRootModel.cs
@@ -81,6 +81,8 @@
 
         public bool openFromTreasureSkill { get; set; }
 
+        public bool reikiPointPromoteSymbol { get; set; }
+
         public readonly Redpoint redpoint = new Redpoint(101, 10103);
 
         public event Action onCacheFreePointRefresh;
@@ -102,6 +104,7 @@
             m_ReikiRootFreePoints.Clear();
             isServerPrepare = false;
             resetReikiRootRecord = false;
+            reikiPointPromoteSymbol = false;
         }
 
         public void OnPlayerLoginOk()
@@ -531,12 +534,14 @@
                     RefreshRedpoint();
 
                     if (freePoint > lastFreePoint && isServerPrepare
-                        && WindowCenter.Instance.IsOpen<AlchemyUseDrugWin>())
+                        && WindowCenter.Instance.IsOpen<AlchemyUseDrugWin>()
+                        && reikiPointPromoteSymbol)
                     {
                         ReikiRootPointPromoteWin.point = new Int2(lastFreePoint, freePoint);
                         WindowCenter.Instance.Open<ReikiRootPointPromoteWin>();
                     }
                     lastFreePoint = freePoint;
+                    reikiPointPromoteSymbol = false;
                     break;
             }
         }

--
Gitblit v1.8.0