export-table-pulgin-csharp 1.0.28 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -7
- package/package.json +1 -1
- package/src/index.ts +21 -7
- package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/345/210/227/350/241/250.cs +70 -5
- package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/345/245/226/345/212/261.cs +28 -2
- package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/346/227/266/351/231/220.cs +14 -1
- package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/350/247/246/345/217/221/347/272/246/346/235/237/351/205/215/350/241/250.cs +126 -9
- package/test/dist/SceneConfig-Sheet2.cs +28 -2
- package/test/dist/SceneConfig.cs +28 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAA0B,MAAM,kBAAkB,CAAA;AAG1H,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAA0B,MAAM,kBAAkB,CAAA;AAG1H,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAoRpE;AAED,qBAAa,YAAa,SAAQ,UAAU;IAC3C,IAAI,SAAW;IACf,IAAI,EAAE,MAAM,EAAE,CAAS;IAEvB,WAAW,CAAC,KAAK,EAAE,iBAAiB;CAOpC;AAED,eAAO,MAAM,aAAa,gBAEzB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,9 @@ function export_stuff(paras) {
|
|
|
34
34
|
let firstLetterLower = function (str) {
|
|
35
35
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
36
36
|
};
|
|
37
|
-
let convMemberName =
|
|
37
|
+
let convMemberName = function (str) {
|
|
38
|
+
return str.split("_").map(s => firstLetterUpper(s)).join("");
|
|
39
|
+
};
|
|
38
40
|
let convVarName = firstLetterLower;
|
|
39
41
|
let RowClass = firstLetterUpper(name);
|
|
40
42
|
let initFunc = name + "Init";
|
|
@@ -198,12 +200,12 @@ ${(0, export_table_lib_1.foreach)(fields, f => {
|
|
|
198
200
|
${(0, export_table_lib_1.foreach)(fields, f => {
|
|
199
201
|
if (f.isUnique) {
|
|
200
202
|
return `
|
|
201
|
-
protected static Dictionary
|
|
202
|
-
public static ${RowClass} GetConfigBy${convMemberName(f.name)}(
|
|
203
|
+
protected static Dictionary<${getFieldType(f)}, ${RowClass}> _tempDictBy${convMemberName(f.name)};
|
|
204
|
+
public static ${RowClass} GetConfigBy${convMemberName(f.name)}(${getFieldType(f)} ${convMemberName(f.name)})
|
|
203
205
|
{
|
|
204
206
|
if (_tempDictBy${convMemberName(f.name)} == null)
|
|
205
207
|
{
|
|
206
|
-
_tempDictBy${convMemberName(f.name)} = new Dictionary
|
|
208
|
+
_tempDictBy${convMemberName(f.name)} = new Dictionary<${getFieldType(f)}, ${RowClass}>();
|
|
207
209
|
Configs.ForEach(c =>
|
|
208
210
|
{
|
|
209
211
|
_tempDictBy${convMemberName(f.name)}.Add(c.${convMemberName(f.name)}, c);
|
|
@@ -213,14 +215,27 @@ ${(0, export_table_lib_1.foreach)(fields, f => {
|
|
|
213
215
|
}
|
|
214
216
|
`;
|
|
215
217
|
}
|
|
216
|
-
else {
|
|
218
|
+
else if (f.type == "number" || f.type == "string") {
|
|
217
219
|
return `
|
|
218
|
-
|
|
220
|
+
protected static Dictionary<${getFieldType(f)}, ${RowClass}[]> _tempRecordsDictBy${convMemberName(f.name)} = new Dictionary<${getFieldType(f)}, ${RowClass}[]>();
|
|
221
|
+
public static ${RowClass}[] GetConfigsBy${convMemberName(f.name)}(${getFieldType(f)} ${convMemberName(f.name)})
|
|
219
222
|
{
|
|
220
|
-
|
|
223
|
+
if (_tempRecordsDictBy${convMemberName(f.name)}.ContainsKey(${convMemberName(f.name)}))
|
|
224
|
+
{
|
|
225
|
+
return _tempRecordsDictBy${convMemberName(f.name)}.GetValueOrDefault(${convMemberName(f.name)});
|
|
226
|
+
}
|
|
227
|
+
else
|
|
228
|
+
{
|
|
229
|
+
var records = Configs.Where(c => c.${convMemberName(f.name)} == ${convMemberName(f.name)}).ToArray();
|
|
230
|
+
_tempRecordsDictBy${convMemberName(f.name)}.Add(${convMemberName(f.name)}, records);
|
|
231
|
+
return records;
|
|
232
|
+
}
|
|
221
233
|
}
|
|
222
234
|
`;
|
|
223
235
|
}
|
|
236
|
+
else {
|
|
237
|
+
return "";
|
|
238
|
+
}
|
|
224
239
|
})}
|
|
225
240
|
|
|
226
241
|
#endregion uid map
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -20,7 +20,9 @@ export function export_stuff(paras: HandleSheetParams): string | null {
|
|
|
20
20
|
let firstLetterLower = function (str: string) {
|
|
21
21
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
22
22
|
};
|
|
23
|
-
let convMemberName =
|
|
23
|
+
let convMemberName = function (str: string) {
|
|
24
|
+
return str.split("_").map(s => firstLetterUpper(s)).join("")
|
|
25
|
+
}
|
|
24
26
|
let convVarName = firstLetterLower
|
|
25
27
|
|
|
26
28
|
let RowClass = firstLetterUpper(name)
|
|
@@ -176,12 +178,12 @@ ${foreach(fields, f => {
|
|
|
176
178
|
${foreach(fields, f => {
|
|
177
179
|
if (f.isUnique) {
|
|
178
180
|
return `
|
|
179
|
-
protected static Dictionary
|
|
180
|
-
public static ${RowClass} GetConfigBy${convMemberName(f.name)}(
|
|
181
|
+
protected static Dictionary<${getFieldType(f)}, ${RowClass}> _tempDictBy${convMemberName(f.name)};
|
|
182
|
+
public static ${RowClass} GetConfigBy${convMemberName(f.name)}(${getFieldType(f)} ${convMemberName(f.name)})
|
|
181
183
|
{
|
|
182
184
|
if (_tempDictBy${convMemberName(f.name)} == null)
|
|
183
185
|
{
|
|
184
|
-
_tempDictBy${convMemberName(f.name)} = new Dictionary
|
|
186
|
+
_tempDictBy${convMemberName(f.name)} = new Dictionary<${getFieldType(f)}, ${RowClass}>();
|
|
185
187
|
Configs.ForEach(c =>
|
|
186
188
|
{
|
|
187
189
|
_tempDictBy${convMemberName(f.name)}.Add(c.${convMemberName(f.name)}, c);
|
|
@@ -190,13 +192,25 @@ ${foreach(fields, f => {
|
|
|
190
192
|
return _tempDictBy${convMemberName(f.name)}.GetValueOrDefault(${convMemberName(f.name)});
|
|
191
193
|
}
|
|
192
194
|
`
|
|
193
|
-
} else {
|
|
195
|
+
} else if (f.type == "number" || f.type == "string") {
|
|
194
196
|
return `
|
|
195
|
-
|
|
197
|
+
protected static Dictionary<${getFieldType(f)}, ${RowClass}[]> _tempRecordsDictBy${convMemberName(f.name)} = new Dictionary<${getFieldType(f)}, ${RowClass}[]>();
|
|
198
|
+
public static ${RowClass}[] GetConfigsBy${convMemberName(f.name)}(${getFieldType(f)} ${convMemberName(f.name)})
|
|
196
199
|
{
|
|
197
|
-
|
|
200
|
+
if (_tempRecordsDictBy${convMemberName(f.name)}.ContainsKey(${convMemberName(f.name)}))
|
|
201
|
+
{
|
|
202
|
+
return _tempRecordsDictBy${convMemberName(f.name)}.GetValueOrDefault(${convMemberName(f.name)});
|
|
203
|
+
}
|
|
204
|
+
else
|
|
205
|
+
{
|
|
206
|
+
var records = Configs.Where(c => c.${convMemberName(f.name)} == ${convMemberName(f.name)}).ToArray();
|
|
207
|
+
_tempRecordsDictBy${convMemberName(f.name)}.Add(${convMemberName(f.name)}, records);
|
|
208
|
+
return records;
|
|
209
|
+
}
|
|
198
210
|
}
|
|
199
211
|
`
|
|
212
|
+
} else {
|
|
213
|
+
return ""
|
|
200
214
|
}
|
|
201
215
|
}
|
|
202
216
|
)}
|
|
@@ -111,13 +111,78 @@ public class 任务列表 {
|
|
|
111
111
|
}
|
|
112
112
|
return _tempDictById.GetValueOrDefault(Id);
|
|
113
113
|
}
|
|
114
|
+
protected static Dictionary<string, 任务列表[]> _tempRecordsDictByName = new Dictionary<string, 任务列表[]>();
|
|
115
|
+
public static 任务列表[] GetConfigsByName(string Name)
|
|
116
|
+
{
|
|
117
|
+
if (_tempRecordsDictByName.ContainsKey(Name))
|
|
118
|
+
{
|
|
119
|
+
return _tempRecordsDictByName.GetValueOrDefault(Name);
|
|
120
|
+
}
|
|
121
|
+
else
|
|
122
|
+
{
|
|
123
|
+
var records = Configs.Where(c => c.Name == Name).ToArray();
|
|
124
|
+
_tempRecordsDictByName.Add(Name, records);
|
|
125
|
+
return records;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
114
128
|
|
|
115
129
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
130
|
+
protected static Dictionary<string, 任务列表[]> _tempRecordsDictBy任务类型 = new Dictionary<string, 任务列表[]>();
|
|
131
|
+
public static 任务列表[] GetConfigsBy任务类型(string 任务类型)
|
|
132
|
+
{
|
|
133
|
+
if (_tempRecordsDictBy任务类型.ContainsKey(任务类型))
|
|
134
|
+
{
|
|
135
|
+
return _tempRecordsDictBy任务类型.GetValueOrDefault(任务类型);
|
|
136
|
+
}
|
|
137
|
+
else
|
|
138
|
+
{
|
|
139
|
+
var records = Configs.Where(c => c.任务类型 == 任务类型).ToArray();
|
|
140
|
+
_tempRecordsDictBy任务类型.Add(任务类型, records);
|
|
141
|
+
return records;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
protected static Dictionary<string, 任务列表[]> _tempRecordsDictBy任务标签 = new Dictionary<string, 任务列表[]>();
|
|
145
|
+
public static 任务列表[] GetConfigsBy任务标签(string 任务标签)
|
|
146
|
+
{
|
|
147
|
+
if (_tempRecordsDictBy任务标签.ContainsKey(任务标签))
|
|
148
|
+
{
|
|
149
|
+
return _tempRecordsDictBy任务标签.GetValueOrDefault(任务标签);
|
|
150
|
+
}
|
|
151
|
+
else
|
|
152
|
+
{
|
|
153
|
+
var records = Configs.Where(c => c.任务标签 == 任务标签).ToArray();
|
|
154
|
+
_tempRecordsDictBy任务标签.Add(任务标签, records);
|
|
155
|
+
return records;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
protected static Dictionary<string, 任务列表[]> _tempRecordsDictByStartCmds = new Dictionary<string, 任务列表[]>();
|
|
159
|
+
public static 任务列表[] GetConfigsByStartCmds(string StartCmds)
|
|
160
|
+
{
|
|
161
|
+
if (_tempRecordsDictByStartCmds.ContainsKey(StartCmds))
|
|
162
|
+
{
|
|
163
|
+
return _tempRecordsDictByStartCmds.GetValueOrDefault(StartCmds);
|
|
164
|
+
}
|
|
165
|
+
else
|
|
166
|
+
{
|
|
167
|
+
var records = Configs.Where(c => c.StartCmds == StartCmds).ToArray();
|
|
168
|
+
_tempRecordsDictByStartCmds.Add(StartCmds, records);
|
|
169
|
+
return records;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
protected static Dictionary<string, 任务列表[]> _tempRecordsDictBySucceedCmds = new Dictionary<string, 任务列表[]>();
|
|
173
|
+
public static 任务列表[] GetConfigsBySucceedCmds(string SucceedCmds)
|
|
174
|
+
{
|
|
175
|
+
if (_tempRecordsDictBySucceedCmds.ContainsKey(SucceedCmds))
|
|
176
|
+
{
|
|
177
|
+
return _tempRecordsDictBySucceedCmds.GetValueOrDefault(SucceedCmds);
|
|
178
|
+
}
|
|
179
|
+
else
|
|
180
|
+
{
|
|
181
|
+
var records = Configs.Where(c => c.SucceedCmds == SucceedCmds).ToArray();
|
|
182
|
+
_tempRecordsDictBySucceedCmds.Add(SucceedCmds, records);
|
|
183
|
+
return records;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
121
186
|
|
|
122
187
|
#endregion uid map
|
|
123
188
|
|
|
@@ -72,8 +72,34 @@ public class 任务奖励 {
|
|
|
72
72
|
}
|
|
73
73
|
return _tempDictById.GetValueOrDefault(Id);
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
protected static Dictionary<string, 任务奖励[]> _tempRecordsDictByProps1 = new Dictionary<string, 任务奖励[]>();
|
|
76
|
+
public static 任务奖励[] GetConfigsByProps1(string Props1)
|
|
77
|
+
{
|
|
78
|
+
if (_tempRecordsDictByProps1.ContainsKey(Props1))
|
|
79
|
+
{
|
|
80
|
+
return _tempRecordsDictByProps1.GetValueOrDefault(Props1);
|
|
81
|
+
}
|
|
82
|
+
else
|
|
83
|
+
{
|
|
84
|
+
var records = Configs.Where(c => c.Props1 == Props1).ToArray();
|
|
85
|
+
_tempRecordsDictByProps1.Add(Props1, records);
|
|
86
|
+
return records;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
protected static Dictionary<double, 任务奖励[]> _tempRecordsDictByCount1 = new Dictionary<double, 任务奖励[]>();
|
|
90
|
+
public static 任务奖励[] GetConfigsByCount1(double Count1)
|
|
91
|
+
{
|
|
92
|
+
if (_tempRecordsDictByCount1.ContainsKey(Count1))
|
|
93
|
+
{
|
|
94
|
+
return _tempRecordsDictByCount1.GetValueOrDefault(Count1);
|
|
95
|
+
}
|
|
96
|
+
else
|
|
97
|
+
{
|
|
98
|
+
var records = Configs.Where(c => c.Count1 == Count1).ToArray();
|
|
99
|
+
_tempRecordsDictByCount1.Add(Count1, records);
|
|
100
|
+
return records;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
77
103
|
|
|
78
104
|
#endregion uid map
|
|
79
105
|
|
|
@@ -61,7 +61,20 @@ public class 任务时限 {
|
|
|
61
61
|
}
|
|
62
62
|
return _tempDictById.GetValueOrDefault(Id);
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
protected static Dictionary<double, 任务时限[]> _tempRecordsDictByDuration = new Dictionary<double, 任务时限[]>();
|
|
65
|
+
public static 任务时限[] GetConfigsByDuration(double Duration)
|
|
66
|
+
{
|
|
67
|
+
if (_tempRecordsDictByDuration.ContainsKey(Duration))
|
|
68
|
+
{
|
|
69
|
+
return _tempRecordsDictByDuration.GetValueOrDefault(Duration);
|
|
70
|
+
}
|
|
71
|
+
else
|
|
72
|
+
{
|
|
73
|
+
var records = Configs.Where(c => c.Duration == Duration).ToArray();
|
|
74
|
+
_tempRecordsDictByDuration.Add(Duration, records);
|
|
75
|
+
return records;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
65
78
|
|
|
66
79
|
#endregion uid map
|
|
67
80
|
|
|
@@ -133,16 +133,133 @@ public class 任务触发约束配表 {
|
|
|
133
133
|
}
|
|
134
134
|
return _tempDictById.GetValueOrDefault(Id);
|
|
135
135
|
}
|
|
136
|
+
protected static Dictionary<double, 任务触发约束配表[]> _tempRecordsDictByTaskId = new Dictionary<double, 任务触发约束配表[]>();
|
|
137
|
+
public static 任务触发约束配表[] GetConfigsByTaskId(double TaskId)
|
|
138
|
+
{
|
|
139
|
+
if (_tempRecordsDictByTaskId.ContainsKey(TaskId))
|
|
140
|
+
{
|
|
141
|
+
return _tempRecordsDictByTaskId.GetValueOrDefault(TaskId);
|
|
142
|
+
}
|
|
143
|
+
else
|
|
144
|
+
{
|
|
145
|
+
var records = Configs.Where(c => c.TaskId == TaskId).ToArray();
|
|
146
|
+
_tempRecordsDictByTaskId.Add(TaskId, records);
|
|
147
|
+
return records;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
136
150
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
151
|
+
protected static Dictionary<string, 任务触发约束配表[]> _tempRecordsDictByCond1 = new Dictionary<string, 任务触发约束配表[]>();
|
|
152
|
+
public static 任务触发约束配表[] GetConfigsByCond1(string Cond1)
|
|
153
|
+
{
|
|
154
|
+
if (_tempRecordsDictByCond1.ContainsKey(Cond1))
|
|
155
|
+
{
|
|
156
|
+
return _tempRecordsDictByCond1.GetValueOrDefault(Cond1);
|
|
157
|
+
}
|
|
158
|
+
else
|
|
159
|
+
{
|
|
160
|
+
var records = Configs.Where(c => c.Cond1 == Cond1).ToArray();
|
|
161
|
+
_tempRecordsDictByCond1.Add(Cond1, records);
|
|
162
|
+
return records;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
protected static Dictionary<double, 任务触发约束配表[]> _tempRecordsDictByPara1 = new Dictionary<double, 任务触发约束配表[]>();
|
|
166
|
+
public static 任务触发约束配表[] GetConfigsByPara1(double Para1)
|
|
167
|
+
{
|
|
168
|
+
if (_tempRecordsDictByPara1.ContainsKey(Para1))
|
|
169
|
+
{
|
|
170
|
+
return _tempRecordsDictByPara1.GetValueOrDefault(Para1);
|
|
171
|
+
}
|
|
172
|
+
else
|
|
173
|
+
{
|
|
174
|
+
var records = Configs.Where(c => c.Para1 == Para1).ToArray();
|
|
175
|
+
_tempRecordsDictByPara1.Add(Para1, records);
|
|
176
|
+
return records;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
protected static Dictionary<string, 任务触发约束配表[]> _tempRecordsDictByCond2 = new Dictionary<string, 任务触发约束配表[]>();
|
|
180
|
+
public static 任务触发约束配表[] GetConfigsByCond2(string Cond2)
|
|
181
|
+
{
|
|
182
|
+
if (_tempRecordsDictByCond2.ContainsKey(Cond2))
|
|
183
|
+
{
|
|
184
|
+
return _tempRecordsDictByCond2.GetValueOrDefault(Cond2);
|
|
185
|
+
}
|
|
186
|
+
else
|
|
187
|
+
{
|
|
188
|
+
var records = Configs.Where(c => c.Cond2 == Cond2).ToArray();
|
|
189
|
+
_tempRecordsDictByCond2.Add(Cond2, records);
|
|
190
|
+
return records;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
protected static Dictionary<double, 任务触发约束配表[]> _tempRecordsDictByPara2 = new Dictionary<double, 任务触发约束配表[]>();
|
|
194
|
+
public static 任务触发约束配表[] GetConfigsByPara2(double Para2)
|
|
195
|
+
{
|
|
196
|
+
if (_tempRecordsDictByPara2.ContainsKey(Para2))
|
|
197
|
+
{
|
|
198
|
+
return _tempRecordsDictByPara2.GetValueOrDefault(Para2);
|
|
199
|
+
}
|
|
200
|
+
else
|
|
201
|
+
{
|
|
202
|
+
var records = Configs.Where(c => c.Para2 == Para2).ToArray();
|
|
203
|
+
_tempRecordsDictByPara2.Add(Para2, records);
|
|
204
|
+
return records;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
protected static Dictionary<string, 任务触发约束配表[]> _tempRecordsDictByCond3 = new Dictionary<string, 任务触发约束配表[]>();
|
|
208
|
+
public static 任务触发约束配表[] GetConfigsByCond3(string Cond3)
|
|
209
|
+
{
|
|
210
|
+
if (_tempRecordsDictByCond3.ContainsKey(Cond3))
|
|
211
|
+
{
|
|
212
|
+
return _tempRecordsDictByCond3.GetValueOrDefault(Cond3);
|
|
213
|
+
}
|
|
214
|
+
else
|
|
215
|
+
{
|
|
216
|
+
var records = Configs.Where(c => c.Cond3 == Cond3).ToArray();
|
|
217
|
+
_tempRecordsDictByCond3.Add(Cond3, records);
|
|
218
|
+
return records;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
protected static Dictionary<double, 任务触发约束配表[]> _tempRecordsDictByPara3 = new Dictionary<double, 任务触发约束配表[]>();
|
|
222
|
+
public static 任务触发约束配表[] GetConfigsByPara3(double Para3)
|
|
223
|
+
{
|
|
224
|
+
if (_tempRecordsDictByPara3.ContainsKey(Para3))
|
|
225
|
+
{
|
|
226
|
+
return _tempRecordsDictByPara3.GetValueOrDefault(Para3);
|
|
227
|
+
}
|
|
228
|
+
else
|
|
229
|
+
{
|
|
230
|
+
var records = Configs.Where(c => c.Para3 == Para3).ToArray();
|
|
231
|
+
_tempRecordsDictByPara3.Add(Para3, records);
|
|
232
|
+
return records;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
protected static Dictionary<string, 任务触发约束配表[]> _tempRecordsDictByLimit1 = new Dictionary<string, 任务触发约束配表[]>();
|
|
236
|
+
public static 任务触发约束配表[] GetConfigsByLimit1(string Limit1)
|
|
237
|
+
{
|
|
238
|
+
if (_tempRecordsDictByLimit1.ContainsKey(Limit1))
|
|
239
|
+
{
|
|
240
|
+
return _tempRecordsDictByLimit1.GetValueOrDefault(Limit1);
|
|
241
|
+
}
|
|
242
|
+
else
|
|
243
|
+
{
|
|
244
|
+
var records = Configs.Where(c => c.Limit1 == Limit1).ToArray();
|
|
245
|
+
_tempRecordsDictByLimit1.Add(Limit1, records);
|
|
246
|
+
return records;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
protected static Dictionary<double, 任务触发约束配表[]> _tempRecordsDictByLimitPara1 = new Dictionary<double, 任务触发约束配表[]>();
|
|
250
|
+
public static 任务触发约束配表[] GetConfigsByLimitPara1(double LimitPara1)
|
|
251
|
+
{
|
|
252
|
+
if (_tempRecordsDictByLimitPara1.ContainsKey(LimitPara1))
|
|
253
|
+
{
|
|
254
|
+
return _tempRecordsDictByLimitPara1.GetValueOrDefault(LimitPara1);
|
|
255
|
+
}
|
|
256
|
+
else
|
|
257
|
+
{
|
|
258
|
+
var records = Configs.Where(c => c.LimitPara1 == LimitPara1).ToArray();
|
|
259
|
+
_tempRecordsDictByLimitPara1.Add(LimitPara1, records);
|
|
260
|
+
return records;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
146
263
|
|
|
147
264
|
#endregion uid map
|
|
148
265
|
|
|
@@ -69,8 +69,34 @@ public class Sheet2 {
|
|
|
69
69
|
}
|
|
70
70
|
return _tempDictByUid.GetValueOrDefault(Uid);
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
protected static Dictionary<string, Sheet2[]> _tempRecordsDictBySceneId = new Dictionary<string, Sheet2[]>();
|
|
73
|
+
public static Sheet2[] GetConfigsBySceneId(string SceneId)
|
|
74
|
+
{
|
|
75
|
+
if (_tempRecordsDictBySceneId.ContainsKey(SceneId))
|
|
76
|
+
{
|
|
77
|
+
return _tempRecordsDictBySceneId.GetValueOrDefault(SceneId);
|
|
78
|
+
}
|
|
79
|
+
else
|
|
80
|
+
{
|
|
81
|
+
var records = Configs.Where(c => c.SceneId == SceneId).ToArray();
|
|
82
|
+
_tempRecordsDictBySceneId.Add(SceneId, records);
|
|
83
|
+
return records;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
protected static Dictionary<double, Sheet2[]> _tempRecordsDictByOutingBaseGold = new Dictionary<double, Sheet2[]>();
|
|
87
|
+
public static Sheet2[] GetConfigsByOutingBaseGold(double OutingBaseGold)
|
|
88
|
+
{
|
|
89
|
+
if (_tempRecordsDictByOutingBaseGold.ContainsKey(OutingBaseGold))
|
|
90
|
+
{
|
|
91
|
+
return _tempRecordsDictByOutingBaseGold.GetValueOrDefault(OutingBaseGold);
|
|
92
|
+
}
|
|
93
|
+
else
|
|
94
|
+
{
|
|
95
|
+
var records = Configs.Where(c => c.OutingBaseGold == OutingBaseGold).ToArray();
|
|
96
|
+
_tempRecordsDictByOutingBaseGold.Add(OutingBaseGold, records);
|
|
97
|
+
return records;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
74
100
|
|
|
75
101
|
#endregion uid map
|
|
76
102
|
|
package/test/dist/SceneConfig.cs
CHANGED
|
@@ -69,8 +69,34 @@ public class SceneConfig {
|
|
|
69
69
|
}
|
|
70
70
|
return _tempDictByUid.GetValueOrDefault(Uid);
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
protected static Dictionary<string, SceneConfig[]> _tempRecordsDictBySceneId = new Dictionary<string, SceneConfig[]>();
|
|
73
|
+
public static SceneConfig[] GetConfigsBySceneId(string SceneId)
|
|
74
|
+
{
|
|
75
|
+
if (_tempRecordsDictBySceneId.ContainsKey(SceneId))
|
|
76
|
+
{
|
|
77
|
+
return _tempRecordsDictBySceneId.GetValueOrDefault(SceneId);
|
|
78
|
+
}
|
|
79
|
+
else
|
|
80
|
+
{
|
|
81
|
+
var records = Configs.Where(c => c.SceneId == SceneId).ToArray();
|
|
82
|
+
_tempRecordsDictBySceneId.Add(SceneId, records);
|
|
83
|
+
return records;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
protected static Dictionary<double, SceneConfig[]> _tempRecordsDictByOutingBaseGold = new Dictionary<double, SceneConfig[]>();
|
|
87
|
+
public static SceneConfig[] GetConfigsByOutingBaseGold(double OutingBaseGold)
|
|
88
|
+
{
|
|
89
|
+
if (_tempRecordsDictByOutingBaseGold.ContainsKey(OutingBaseGold))
|
|
90
|
+
{
|
|
91
|
+
return _tempRecordsDictByOutingBaseGold.GetValueOrDefault(OutingBaseGold);
|
|
92
|
+
}
|
|
93
|
+
else
|
|
94
|
+
{
|
|
95
|
+
var records = Configs.Where(c => c.OutingBaseGold == OutingBaseGold).ToArray();
|
|
96
|
+
_tempRecordsDictByOutingBaseGold.Add(OutingBaseGold, records);
|
|
97
|
+
return records;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
74
100
|
|
|
75
101
|
#endregion uid map
|
|
76
102
|
|