少年修仙传客户端代码仓库
client_Zxw
2019-03-14 e4de206626656ca5b7d7994b135f5dd1afd74ae9
Core/GameEngine/Model/TelPartialConfig/tagItemPlusConfig.cs
@@ -4,16 +4,18 @@
public partial class ItemPlusConfig : IConfigPostProcess
{
    private static Dictionary<string, ItemPlusConfig> ItemPlus = new Dictionary<string, ItemPlusConfig>();
    private static Dictionary<int, ItemPlusConfig> ItemPlus = new Dictionary<int, ItemPlusConfig>();
    public void OnConfigParseCompleted()
    {
        ItemPlus.Add(StringUtility.Contact(type, level).ToString(), this);
        var key = type * 100 + level;
        ItemPlus[key] = this;
    }
    public static ItemPlusConfig GetTypeAndLevel(int type, int level)
    {
        var key = type * 100 + level;
        ItemPlusConfig itemPlus = null;
        ItemPlus.TryGetValue(StringUtility.Contact(type, level).ToString(), out itemPlus);
        ItemPlus.TryGetValue(key, out itemPlus);
        return itemPlus;
    }
}