少年修仙传客户端代码仓库
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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
 
public partial class EquipStarConfig : IConfigPostProcess
{
 
    static Dictionary<int, List<EquipStarConfig>> equipStarConfigs = new Dictionary<int, List<EquipStarConfig>>();
 
    public void OnConfigParseCompleted()
    {
        var key = Level * 10000 + EquipPlace * 100;
 
        if (!equipStarConfigs.ContainsKey(key))
        {
            equipStarConfigs[key] = new List<EquipStarConfig>();
        }
        equipStarConfigs[key].Add(this);
    }
 
    public static EquipStarConfig Get(int level, int equipPlace, int star)
    {
        var key = level * 10000 + equipPlace * 100;
        if (equipStarConfigs.ContainsKey(key))
        {
            var configs = equipStarConfigs[key];
            foreach (var item in configs)
            {
                if (item.Star == star)
                {
                    return item;
                }
            }
 
            return null;
        }
        else
        {
            return null;
        }
    }
 
    public static List<EquipStarConfig> GetConfigs(int level, int equipPlace)
    {
        var key = level * 10000 + equipPlace * 100;
        if (equipStarConfigs.ContainsKey(key))
        {
            return equipStarConfigs[key];
        }
        else
        {
            return null;
        }
    }
 
}