From e53af2bb643ac8f24ced6ca8449347c1f0cc028f Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期六, 02 三月 2019 17:50:46 +0800
Subject: [PATCH] 3555 新版装备功能开发

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

diff --git a/Core/GameEngine/Model/TelPartialConfig/PlayerPropertyConfig.cs b/Core/GameEngine/Model/TelPartialConfig/PlayerPropertyConfig.cs
index 68b39cd..42d1778 100644
--- a/Core/GameEngine/Model/TelPartialConfig/PlayerPropertyConfig.cs
+++ b/Core/GameEngine/Model/TelPartialConfig/PlayerPropertyConfig.cs
@@ -27,4 +27,29 @@
         m_PropCfgs.TryGetValue(type, out list);
         return list;
     }
+
+    public static string GetPropertyDescription(int propertyId, int value)
+    {
+        var config = Get(propertyId);
+        if (config == null)
+        {
+            return string.Empty;
+        }
+
+        if (config.ISPercentage == 0)
+        {
+            return value.ToString();
+        }
+        else if (config.ISPercentage == 1)
+        {
+            return (float)Math.Round(value / 100f, 1) + "%";
+        }
+        else if (config.ISPercentage == 2)
+        {
+            return ((float)Math.Round(value / 100f, 1)).ToString();
+        }
+
+        return string.Empty;
+    }
+
 }

--
Gitblit v1.8.0