From 1b5827f6250cdde26a88a6a096505a8dee606b35 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期五, 17 五月 2019 11:21:38 +0800
Subject: [PATCH] Merge branch 'master' into ClientPreciousDungeon

---
 System/Message/RichNormalEvent.cs |   61 ++++++++++++++++++++++++++++--
 1 files changed, 56 insertions(+), 5 deletions(-)

diff --git a/System/Message/RichNormalEvent.cs b/System/Message/RichNormalEvent.cs
index 696ee18..80fef41 100644
--- a/System/Message/RichNormalEvent.cs
+++ b/System/Message/RichNormalEvent.cs
@@ -178,7 +178,26 @@
                         colorType = RichTextMgr.Inst.presentRichText.colorType == RichText.ColorType.Dark ? 0 : 1;
                     }
                     var fightPoint = PlayerDatas.Instance.baseData.FightPoint;
-                    var targetValue = int.Parse(dic["myfightpoint"]);
+                    var targetValue = 0;
+                    var infoArray = dic["myfightpoint"].Split('_');
+                    if (infoArray.Length > 1)
+                    {
+                        switch (infoArray[0])
+                        {
+                            case "skytower":
+                                var config = SkyTowerConfig.Get(infoArray[1]);
+                                if (config != null)
+                                {
+                                    targetValue = config.fightPower;
+                                }
+                                break;
+                        }
+                    }
+                    else
+                    {
+                        int.TryParse(dic["myfightpoint"], out targetValue);
+                    }
+
                     if (fightPoint < targetValue)
                     {
                         var label = dic.ContainsKey("replacelabel1") ? dic["replacelabel1"] : string.Empty;
@@ -197,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