From d4f4374daef80c14795317cd31a0380e3c30c318 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 19 二月 2019 09:36:10 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/ConfigLoad'

---
 Core/GameEngine/Model/TelPartialConfig/tagChinItemConfig.cs |   61 ++++++++----------------------
 1 files changed, 17 insertions(+), 44 deletions(-)

diff --git a/Core/GameEngine/Model/TelPartialConfig/tagChinItemConfig.cs b/Core/GameEngine/Model/TelPartialConfig/tagChinItemConfig.cs
index 35acd72..efeef92 100644
--- a/Core/GameEngine/Model/TelPartialConfig/tagChinItemConfig.cs
+++ b/Core/GameEngine/Model/TelPartialConfig/tagChinItemConfig.cs
@@ -3,55 +3,31 @@
 
 public partial class ItemConfig : IConfigPostProcess
 {
-    public static Dictionary<int, ItemConfig> tag_DicID = new Dictionary<int, ItemConfig>();//鐢ㄤ簬鐏靛吔
-    public static Dictionary<int, ItemConfig> tag_ZJSH = new Dictionary<int, ItemConfig>();//鐢ㄤ簬鍧愰獞鍏介瓊
-    public static Dictionary<int, ItemConfig> tag_Type27 = new Dictionary<int, ItemConfig>();//鐏靛吔鍙g伯
-    public static Dictionary<int, ItemConfig> tag_DicIDCM = new Dictionary<int, ItemConfig>();
     public static Dictionary<int, ItemConfig> tag_Wings = new Dictionary<int, ItemConfig>();//鐢ㄦ潵瀛樺偍鎵�鏈夌繀鑶�鎵�闇�鐨凾pye
-    #region 瀹濈煶鏁版嵁
-    private static StringBuilder _textBuilder = new StringBuilder();
-    private static Dictionary<string, ItemConfig> m_GemCfgs = new Dictionary<string, ItemConfig>();
+    private static Dictionary<int, ItemConfig> m_GemCfgs = new Dictionary<int, ItemConfig>();
     private const int GEM_TYPE_VALUE = 225;
-    private const int GEM_TYPE = 25;
-    #endregion
 
     public void OnConfigParseCompleted()
     {
-        #region 瀹濈煶鏁版嵁
-        _textBuilder.Length = 0;
-        if ((Type == GEM_TYPE
-            || Type == 140) && Effect1 == GEM_TYPE_VALUE)
+        switch (Type)
         {
-            _textBuilder.Append(EffectValueB1.ToString());
-            _textBuilder.Append(EffectValueA1.ToString());
-            m_GemCfgs.Add(_textBuilder.ToString(), this);
-        }
-        #endregion
-
-        if (Type == 28)
-        {
-            tag_DicID.Add(ID, this);
-        }
-        else if (Type == 29)
-        {
-            tag_DicIDCM.Add(ID, this);
-
-        }
-        else if (Type == 22)
-        {
-            tag_ZJSH.Add(ID, this);
-        }
-        else if (Type == 27)
-        {
-            tag_Type27.Add(ID, this);
-        }
-        else if (Type == 111 || Type == 39 || Type == 52)
-        {
-            tag_Wings.Add(ID, this);
+            case 25:
+            case 140:
+                if (Effect1 == GEM_TYPE_VALUE)
+                {
+                    m_GemCfgs.Add(EffectValueB1 * 1000 + EffectValueA1, this);
+                }
+                break;
+            case 111:
+            case 39:
+            case 52:
+                tag_Wings.Add(ID, this);
+                break;
+            default:
+                break;
         }
     }
 
-    #region 瀹濈煶鏁版嵁
     /// <summary>
     /// 鏍规嵁瀹濈煶绛夌骇浠ュ強绫诲瀷鍙栧埌瀹濈煶鏁版嵁
     /// </summary>
@@ -60,13 +36,10 @@
     /// <returns></returns>
     public static ItemConfig GetGemDataByLevelAndType(int level, int type)
     {
-        _textBuilder.Length = 0;
-        _textBuilder.Append(level.ToString() + type.ToString());
         ItemConfig item = null;
-        m_GemCfgs.TryGetValue(_textBuilder.ToString(), out item);
+        m_GemCfgs.TryGetValue(level * 1000 + type, out item);
         return item;
     }
-    #endregion
 }
 
 

--
Gitblit v1.8.0