From 5a4e34c8a85737c0fa5b5775122da31155cbaef3 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 09 二月 2026 14:46:01 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/Config/PartialConfigs/PlayerPropertyConfig.cs |  149 +++++++++++++++++++++++++++++++++++--------------
 1 files changed, 107 insertions(+), 42 deletions(-)

diff --git a/Main/Config/PartialConfigs/PlayerPropertyConfig.cs b/Main/Config/PartialConfigs/PlayerPropertyConfig.cs
index 4ea1bcb..aea6967 100644
--- a/Main/Config/PartialConfigs/PlayerPropertyConfig.cs
+++ b/Main/Config/PartialConfigs/PlayerPropertyConfig.cs
@@ -5,27 +5,42 @@
 
 public partial class PlayerPropertyConfig : ConfigBase<int, PlayerPropertyConfig>
 {
-    private static Dictionary<int, List<PlayerPropertyConfig>> m_PropCfgs = new Dictionary<int, List<PlayerPropertyConfig>>();
-    private static Dictionary<int, List<int>> outputDict = new Dictionary<int, List<int>>();
+    public const int baseType = 1;  //鍩虹灞炴��
+    public const int fightType = 2; //鎴樻枟灞炴��
+    public const int fightAntiType = 3; //鎴樻枟鎶楁��
+    public const int specialType = 4; //鐗规畩灞炴��
 
-    protected override void OnConfigParseCompleted()
+    // 鎸夋樉绀虹被鍨嬪垎
+    private static Dictionary<int, List<int>> m_PlayerPropertyDict = new Dictionary<int, List<int>>();
+    public static Dictionary<int, List<int>> playerPropertyDict
     {
-        List<PlayerPropertyConfig> list = null;
-        m_PropCfgs.TryGetValue(type, out list);
-        if (list != null)
+        get
         {
-            list.Add(this);
-        }
-        else
-        {
-            list = new List<PlayerPropertyConfig>();
-            list.Add(this);
-            m_PropCfgs.Add(type, list);
+            if (m_PlayerPropertyDict.IsNullOrEmpty())
+                RefreshShowDict();
+            return m_PlayerPropertyDict;
         }
     }
-    public static Dictionary<int, List<int>> GetShowDict()
+
+    public static int[] inheritAttrs = new int[] { 13, 14, 15 };
+
+
+    //涓嶅悓鐨勫姛鑳借〃璋冪敤瀵瑰簲鑷繁鐨勫姛鑳藉惈涔夊拰浣跨敤鏂瑰紡锛屽闃靛鍏夌幆閰嶇疆灏辩敤鍦ㄥ搴旇绠楀眰
+    public static int[] basePerAttrs = new int[] { 16, 17, 18 };
+
+    public static int[] baseAttrs = new int[] { 6, 7, 8 };
+
+    // 鏄犲皠瀵瑰簲鐨勭櫨鍒嗘瘮灞炴�э紝鏂逛究浣跨敤锛屽璁$畻灞炴�ч渶瑕佹壘瀵瑰簲鐨勭櫨鍒嗘瘮鍔犳垚
+    public static Dictionary<int, int> baseAttr2perDict = new Dictionary<int, int>()
     {
-        if (outputDict.IsNullOrEmpty())
+        { 6,16 },
+        { 7,17 },
+        { 8,18 }
+    };
+
+    private static Dictionary<int, List<int>> RefreshShowDict()
+    {
+        if (m_PlayerPropertyDict.IsNullOrEmpty())
         {
             var keys = GetKeys();
             for (int i = 0; i < keys.Count; i++)
@@ -34,23 +49,21 @@
                 int showType = Get(id).showType;
                 if (showType == 0)  //涓�0鏃朵笉鏄剧ず
                     continue;
-                if (!outputDict.ContainsKey(showType))
+                if (!m_PlayerPropertyDict.ContainsKey(showType))
                 {
-                    outputDict[showType] = new List<int> { id };
+                    m_PlayerPropertyDict[showType] = new List<int> { id };
                 }
                 else
                 {
-                    outputDict[showType].Add(id);
+                    m_PlayerPropertyDict[showType].Add(id);
                 }
             }
-            var outputList = outputDict.Keys.ToList();
-            for (int i = 0; i < outputList.Count; i++)
+            foreach (var showType in m_PlayerPropertyDict.Keys)
             {
-                int showType = outputList[i];
-                outputDict[showType].Sort(cmp);
+                m_PlayerPropertyDict[showType].Sort(cmp);
             }
         }
-        return outputDict;
+        return m_PlayerPropertyDict;
     }
 
     static int cmp(int id1, int id2)
@@ -61,12 +74,6 @@
         return config1.showSequence.CompareTo(config2.showSequence);
     }
 
-    public static List<PlayerPropertyConfig> GetPropByType(int type)
-    {
-        List<PlayerPropertyConfig> list = null;
-        m_PropCfgs.TryGetValue(type, out list);
-        return list;
-    }
 
 
     public static string GetFullDescription(Int2 property)
@@ -74,7 +81,8 @@
         return GetFullDescription(property.x, property.y);
     }
 
-    public static string GetFullDescription(int id, long value)
+    // 鑾峰彇灞炴�у叏鎻忚堪锛屽寘鎷睘鎬у悕鍜屽睘鎬у�� 鍙傝�冩牸寮� string format = "{0}" + UIHelper.AppendColor(TextColType.Green, "+{1}");
+    public static string GetFullDescription(int id, long value, string format="{0}+{1}")
     {
         var config = Get(id);
         if (config == null)
@@ -82,29 +90,64 @@
             return string.Empty;
         }
 
-        if (config.Name.Contains("%s"))
+        if (config.ShowName.Contains("%s"))
         {
-            if (id == 52)
+            // if (id == 52)
+            // {
+            //     return Regex.Replace(config.ShowName, "%s", (value * 0.0001f).ToString("f2"));
+            // }
+            // else
             {
-                return Regex.Replace(config.Name, "%s", (value * 0.0001f).ToString("f2"));
-            }
-            else
-            {
-                return Regex.Replace(config.Name, "%s", value.ToString());
+                return Regex.Replace(config.ShowName, "%s", value.ToString());
             }
         }
         else
         {
-            return string.Format("{0} +{1}", config.Name, GetValueDescription(id, value));
+            return string.Format(format, config.ShowName, GetValueDescription(id, value));
         }
     }
 
-    public static string GetValueDescription(int id, long value)
+    //鍩虹灞炴�ф弿杩�
+    public static string GetBaseFullDescription(int id, long value, string format = "{0}+{1}")
     {
-        return GetValueDescription(id, value, false);
+        var config = Get(id);
+        if (config == null)
+        {
+            return string.Empty;
+        }
+        string showName = config.ShowName;
+        if (id == 6 || id == 16)
+        {
+            showName = Language.Get("herocard59");
+        }
+        else if (id == 7 || id == 17)
+        {
+            showName = Language.Get("herocard60");
+        }
+        else if (id == 8 || id == 18)
+        {
+            showName = Language.Get("herocard61");
+        }
+        return string.Format(format, showName, GetValueDescription(id, value));
     }
 
-    public static string GetValueDescription(int id, long value, bool largeValue)
+
+
+
+
+    //largeNumFormat 澶ф暟鍊兼牸寮忥細0 榛樿鍘熸暟鍊� 1 鎸変竾鎴栬��(K)鏄剧ず 2 鎸�6浣嶆暟浠ヤ笂锛堟墠杞崲澶ф暟鍊硷紝鏍规嵁鎯呭喌鍙粺涓�璋冩暣锛�3 瓒呰繃浜跨缉鍐�
+    public static string GetValueDescription(int id, long value, int largeNumFormat = 2)
+    {
+        return GetValueDescriptionEx(id, value, largeNumFormat);
+    }
+
+    //甯︽牸寮�
+    public static string GetValueDescriptionFormat(int id, long value, int largeNumFormat = 2, string format="+{0}")
+    {
+        return string.Format(format, GetValueDescriptionEx(id, value, largeNumFormat));
+    }
+
+    static string GetValueDescriptionEx(int id, long value, int largeNumFormat = 2)
     {
         var config = Get(id);
         if (config == null)
@@ -127,10 +170,32 @@
         }
 
         var label = string.Empty;
-        if (largeValue)
+        if (largeNumFormat == 1)
         {
             label = UIHelper.ReplaceLargeNum(result);
         }
+        else if (largeNumFormat == 2)
+        {
+            if (result > 999999)
+            {
+                label = UIHelper.ReplaceLargeNum(result);
+            }
+            else
+            {
+                label = result.ToString();
+            }
+        }
+        else if (largeNumFormat == 3)
+        {
+            if (result > 100000000)
+            {
+                label = UIHelper.ReplaceLargeNum(result);
+            }
+            else
+            {
+                label = result.ToString();
+            }
+        }
         else
         {
             label = result.ToString();

--
Gitblit v1.8.0