From edc1f81bb22c7b31d75e468c1190601f22bac864 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期四, 14 三月 2019 19:26:51 +0800
Subject: [PATCH] 3335 修改属性显示代码

---
 Core/GameEngine/Model/TelPartialConfig/PlayerPropertyConfig.cs |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/Core/GameEngine/Model/TelPartialConfig/PlayerPropertyConfig.cs b/Core/GameEngine/Model/TelPartialConfig/PlayerPropertyConfig.cs
index 42d1778..9687511 100644
--- a/Core/GameEngine/Model/TelPartialConfig/PlayerPropertyConfig.cs
+++ b/Core/GameEngine/Model/TelPartialConfig/PlayerPropertyConfig.cs
@@ -30,26 +30,43 @@
 
     public static string GetPropertyDescription(int propertyId, int value)
     {
+        return GetPropertyDescription(propertyId, value, 1, false);
+    }
+
+    public static string GetPropertyDescription(int propertyId, int value, int decimalCount, bool largeValue)
+    {
         var config = Get(propertyId);
         if (config == null)
         {
             return string.Empty;
         }
 
+        float _result = 0f;
+
         if (config.ISPercentage == 0)
         {
-            return value.ToString();
+            _result = value;
         }
         else if (config.ISPercentage == 1)
         {
-            return (float)Math.Round(value / 100f, 1) + "%";
+            _result = (float)Math.Round(value / 100f, decimalCount);
         }
         else if (config.ISPercentage == 2)
         {
-            return ((float)Math.Round(value / 100f, 1)).ToString();
+            _result = (float)Math.Round(value / 100f, decimalCount);
         }
 
-        return string.Empty;
+        var label = string.Empty;
+        if (largeValue)
+        {
+            label = UIHelper.ReplaceLargeNum(_result);
+        }
+        else
+        {
+            label = _result.ToString();
+        }
+
+        return config.ISPercentage == 1 ? (label + "%") : label;
     }
 
 }

--
Gitblit v1.8.0