少年修仙传客户端代码仓库
client_linchunjie
2019-03-14 c9add585a6990f1beecb94a946eaa3f5d27dcbd1
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;
    }
}