hch
2026-01-26 aa84cb62bebb9c8a4e586bcc1ec28eb7a16a8860
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           Tuesday, December 30, 2025
//--------------------------------------------------------
 
using System.Collections.Generic;
using System;
using UnityEngine;
using LitJson;
 
public partial class HeroFatesConfig : ConfigBase<int, HeroFatesConfig>
{
    static HeroFatesConfig()
    {
        // 访问过静态构造函数
        visit = true; 
    }
 
    public int FatesID;
    public string FatesName;
    public int FatesQuality;
    public int BGQuality;
    public int[] HeroIDList;
    public int[][] AwardItemList;
    public int[] AttrIDList;
    public int[] LVAttrValueList;
 
    public override int LoadKey(string _key)
    {
        int key = GetKey(_key);
        return key;
    }
 
    public override void LoadConfig(string input)
    {
        try {
        string[] tables = input.Split('\t');
        int.TryParse(tables[0],out FatesID); 
 
            FatesName = tables[1];
 
            int.TryParse(tables[2],out FatesQuality); 
 
            int.TryParse(tables[3],out BGQuality); 
 
            if (tables[4].Contains("["))
            {
                HeroIDList = JsonMapper.ToObject<int[]>(tables[4]);
            }
            else
            {
                string[] HeroIDListStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                HeroIDList = new int[HeroIDListStringArray.Length];
                for (int i=0;i<HeroIDListStringArray.Length;i++)
                {
                     int.TryParse(HeroIDListStringArray[i],out HeroIDList[i]);
                }
            }
 
            AwardItemList = JsonMapper.ToObject<int[][]>(tables[5].Replace("(", "[").Replace(")", "]")); 
 
            if (tables[6].Contains("["))
            {
                AttrIDList = JsonMapper.ToObject<int[]>(tables[6]);
            }
            else
            {
                string[] AttrIDListStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                AttrIDList = new int[AttrIDListStringArray.Length];
                for (int i=0;i<AttrIDListStringArray.Length;i++)
                {
                     int.TryParse(AttrIDListStringArray[i],out AttrIDList[i]);
                }
            }
 
            if (tables[7].Contains("["))
            {
                LVAttrValueList = JsonMapper.ToObject<int[]>(tables[7]);
            }
            else
            {
                string[] LVAttrValueListStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                LVAttrValueList = new int[LVAttrValueListStringArray.Length];
                for (int i=0;i<LVAttrValueListStringArray.Length;i++)
                {
                     int.TryParse(LVAttrValueListStringArray[i],out LVAttrValueList[i]);
                }
            }
        }
        catch (Exception exception)
        {
            Debug.LogError(exception);
        }
    }
}