From fda6d8f39f1adb652b29372606a7c981fe5175e2 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期五, 17 五月 2019 10:42:44 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/Message/RichNormalEvent.cs |   40 ++++++++++++++++++++++++++++++++++++----
 1 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/System/Message/RichNormalEvent.cs b/System/Message/RichNormalEvent.cs
index c4a4c58..80fef41 100644
--- a/System/Message/RichNormalEvent.cs
+++ b/System/Message/RichNormalEvent.cs
@@ -216,18 +216,50 @@
                     {
                         colorType = RichTextMgr.Inst.presentRichText.colorType == RichText.ColorType.Dark ? 0 : 1;
                     }
+
                     var reikiRootModel = ModelCenter.Instance.GetModel<ReikiRootModel>();
-                    var point = reikiRootModel.GetReikiRootTotalPoint();
-                    var targetValue = int.Parse(dic["myreikiroot"]);
-                    if (point < targetValue)
+
+                    var satisfy = false;
+                    var targetValue = 0;
+                    var point = 0;
+                    var property = 0;
+
+                    if (int.TryParse(dic["myreikiroot"], out targetValue))
+                    {
+                        point = reikiRootModel.GetReikiRootTotalPoint();
+                        satisfy = point >= targetValue;
+                    }
+                    else
+                    {
+                        var jsonArray = LitJson.JsonMapper.ToObject<int[][]>(dic["myreikiroot"]);
+                        var job = PlayerDatas.Instance.baseData.Job;
+                        for (int i = 0; i < jsonArray.Length; i++)
+                        {
+                            if (i == job - 1)
+                            {
+                                property = jsonArray[i][0];
+                                point = reikiRootModel.GetReikiRootPoint(jsonArray[i][0]);
+                                targetValue = jsonArray[i][1];
+                                satisfy = point >= targetValue;
+                                break;
+                            }
+                        }
+                    }
+
+                    if (!satisfy)
                     {
                         var label = dic.ContainsKey("replacelabel1") ? dic["replacelabel1"] : string.Empty;
+                        if (property != 0)
+                        {
+                            var propertyConfig = PlayerPropertyConfig.Get(property);
+                            label = StringUtility.Contact(propertyConfig.Name, "锛�");
+                        }
                         return UIHelper.AppendColor(TextColType.Red, StringUtility.Contact(label, point, "/", targetValue), colorType == 1);
                     }
                     else
                     {
                         var label = dic.ContainsKey("replacelabel2") ? dic["replacelabel2"] : string.Empty;
-                        return UIHelper.AppendColor(TextColType.Green, label, colorType == 1);
+                        return label;
                     }
                 }
         }

--
Gitblit v1.8.0