using System.Collections; using System.Collections.Generic; using UnityEngine; public partial class LegendPropertyValueConfig : IConfigPostProcess { static Dictionary previewConfigs = new Dictionary(); public void OnConfigParseCompleted() { var key = ItemType * 1000000 + ItemClassLV * 10000 + ItemColor * 100 + IsSuit * 10 + ItemStarLevel; previewConfigs[key] = this; } public static LegendPropertyValueConfig Get(int itemType, int level, int quality, bool suit, int starLevel) { var key = itemType * 1000000 + level * 10000 + quality * 100 + (suit ? 10 : 0) + starLevel; return previewConfigs.ContainsKey(key) ? previewConfigs[key] : null; } }