少年修仙传客户端代码仓库
hch
2025-06-12 204ef05a831c9484e2abc561d27ecbff7c797453
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
 
public partial class LegendPropertyValueConfig : IConfigPostProcess
{
 
    static Dictionary<int, LegendPropertyValueConfig> previewConfigs = new Dictionary<int, LegendPropertyValueConfig>();
 
    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;
    }
 
}