hch
2025-12-09 c3bbfe2736a773f9f03fa25c0575608e9ee6c13c
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年12月1日
//--------------------------------------------------------
 
using System.Collections.Generic;
using System;
using UnityEngine;
using LitJson;
 
public partial class ChatBubbleBoxConfig : ConfigBase<int, ChatBubbleBoxConfig>
{
    static ChatBubbleBoxConfig()
    {
        // 访问过静态构造函数
        visit = true; 
    }
 
    public int ID;
    public string Name;
    public int ResourceType;
    public string ResourceValue;
    public int ExpireMinutes;
    public int UnlockWay;
    public int UnlockValue;
    public int UnlockNeedCnt;
    public int UpNeedCnt;
    public int StarMax;
    public int[] AttrIDList;
    public int[] InitAttrValueList;
    public int[] AttrPerStarAddList;
    public string GetWayString;
    public int[] LeftOffset;
    public int[] RightOffset;
    public int Top;
    public int[] MyColor;
    public int[] OtherColor;
 
    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 ID); 
 
            Name = tables[1];
 
            int.TryParse(tables[2],out ResourceType); 
 
            ResourceValue = tables[3];
 
            int.TryParse(tables[4],out ExpireMinutes); 
 
            int.TryParse(tables[5],out UnlockWay); 
 
            int.TryParse(tables[6],out UnlockValue); 
 
            int.TryParse(tables[7],out UnlockNeedCnt); 
 
            int.TryParse(tables[8],out UpNeedCnt); 
 
            int.TryParse(tables[9],out StarMax); 
 
            if (tables[10].Contains("["))
            {
                AttrIDList = JsonMapper.ToObject<int[]>(tables[10]);
            }
            else
            {
                string[] AttrIDListStringArray = tables[10].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[11].Contains("["))
            {
                InitAttrValueList = JsonMapper.ToObject<int[]>(tables[11]);
            }
            else
            {
                string[] InitAttrValueListStringArray = tables[11].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                InitAttrValueList = new int[InitAttrValueListStringArray.Length];
                for (int i=0;i<InitAttrValueListStringArray.Length;i++)
                {
                     int.TryParse(InitAttrValueListStringArray[i],out InitAttrValueList[i]);
                }
            }
 
            if (tables[12].Contains("["))
            {
                AttrPerStarAddList = JsonMapper.ToObject<int[]>(tables[12]);
            }
            else
            {
                string[] AttrPerStarAddListStringArray = tables[12].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                AttrPerStarAddList = new int[AttrPerStarAddListStringArray.Length];
                for (int i=0;i<AttrPerStarAddListStringArray.Length;i++)
                {
                     int.TryParse(AttrPerStarAddListStringArray[i],out AttrPerStarAddList[i]);
                }
            }
 
            GetWayString = tables[13];
 
            if (tables[14].Contains("["))
            {
                LeftOffset = JsonMapper.ToObject<int[]>(tables[14]);
            }
            else
            {
                string[] LeftOffsetStringArray = tables[14].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                LeftOffset = new int[LeftOffsetStringArray.Length];
                for (int i=0;i<LeftOffsetStringArray.Length;i++)
                {
                     int.TryParse(LeftOffsetStringArray[i],out LeftOffset[i]);
                }
            }
 
            if (tables[15].Contains("["))
            {
                RightOffset = JsonMapper.ToObject<int[]>(tables[15]);
            }
            else
            {
                string[] RightOffsetStringArray = tables[15].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                RightOffset = new int[RightOffsetStringArray.Length];
                for (int i=0;i<RightOffsetStringArray.Length;i++)
                {
                     int.TryParse(RightOffsetStringArray[i],out RightOffset[i]);
                }
            }
 
            int.TryParse(tables[16],out Top); 
 
            if (tables[17].Contains("["))
            {
                MyColor = JsonMapper.ToObject<int[]>(tables[17]);
            }
            else
            {
                string[] MyColorStringArray = tables[17].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                MyColor = new int[MyColorStringArray.Length];
                for (int i=0;i<MyColorStringArray.Length;i++)
                {
                     int.TryParse(MyColorStringArray[i],out MyColor[i]);
                }
            }
 
            if (tables[18].Contains("["))
            {
                OtherColor = JsonMapper.ToObject<int[]>(tables[18]);
            }
            else
            {
                string[] OtherColorStringArray = tables[18].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                OtherColor = new int[OtherColorStringArray.Length];
                for (int i=0;i<OtherColorStringArray.Length;i++)
                {
                     int.TryParse(OtherColorStringArray[i],out OtherColor[i]);
                }
            }
        }
        catch (Exception exception)
        {
            Debug.LogError(exception);
        }
    }
}