@@ -104,15 +104,19 @@ public static async void Load()
104
104
105
105
await Task . WhenAll ( Task . Run ( ( ) =>
106
106
{
107
- foreach ( var effect in SpellInfoStore . Where ( effect => SpellMisc . ContainsKey ( effect . Value . Spell . ID ) ) )
107
+ foreach ( var spellMisc in SpellMisc . Values . Where ( misc => SpellInfoStore . ContainsKey ( misc . SpellID ) ) )
108
108
{
109
- effect . Value . Misc = SpellMisc [ effect . Value . Spell . ID ] ;
109
+ if ( spellMisc . DifficultyID != 0 )
110
+ continue ;
111
+
112
+ var spell = SpellInfoStore [ spellMisc . SpellID ] ;
113
+ spell . Misc = spellMisc ;
110
114
111
- if ( SpellDuration . ContainsKey ( effect . Value . Misc . DurationIndex ) )
112
- effect . Value . DurationEntry = SpellDuration [ effect . Value . Misc . DurationIndex ] ;
115
+ if ( SpellDuration . ContainsKey ( spellMisc . DurationIndex ) )
116
+ spell . DurationEntry = SpellDuration [ spellMisc . DurationIndex ] ;
113
117
114
- if ( SpellRange . ContainsKey ( effect . Value . Misc . RangeIndex ) )
115
- effect . Value . Range = SpellRange [ effect . Value . Misc . RangeIndex ] ;
118
+ if ( SpellRange . ContainsKey ( spellMisc . RangeIndex ) )
119
+ spell . Range = SpellRange [ spellMisc . RangeIndex ] ;
116
120
}
117
121
} ) , Task . Run ( ( ) =>
118
122
{
@@ -139,32 +143,35 @@ await Task.WhenAll(Task.Run(() =>
139
143
}
140
144
} ) , Task . Run ( ( ) =>
141
145
{
142
- foreach ( var effect in SpellTargetRestrictions . Values )
146
+ foreach ( var spellTargetRestrictions in SpellTargetRestrictions . Values )
143
147
{
144
- if ( ! SpellInfoStore . ContainsKey ( effect . SpellID ) )
148
+ if ( spellTargetRestrictions . DifficultyID != 0 )
149
+ continue ;
150
+
151
+ if ( ! SpellInfoStore . ContainsKey ( spellTargetRestrictions . SpellID ) )
145
152
{
146
153
Console . WriteLine (
147
- $ "SpellTargetRestrictions: Unknown spell { effect . SpellID } referenced, ignoring!") ;
154
+ $ "SpellTargetRestrictions: Unknown spell { spellTargetRestrictions . SpellID } referenced, ignoring!") ;
148
155
continue ;
149
156
}
150
157
151
- SpellInfoStore [ effect . SpellID ] . TargetRestrictions . Add ( effect ) ;
158
+ SpellInfoStore [ spellTargetRestrictions . SpellID ] . TargetRestrictions . Add ( spellTargetRestrictions ) ;
152
159
}
153
160
} ) , Task . Run ( ( ) =>
154
161
{
155
- foreach ( var spellXSpellVisual in SpellXSpellVisual . Where ( effect =>
156
- effect . Value . DifficultyID == 0 && effect . Value . CasterPlayerConditionID == 0 ) )
162
+ foreach ( var spellXSpellVisual in SpellXSpellVisual . Values . Where ( effect => effect . CasterPlayerConditionID == 0 ) )
157
163
{
158
- if ( spellXSpellVisual . Value . DifficultyID != 0 ) { continue ; }
164
+ if ( spellXSpellVisual . DifficultyID != 0 )
165
+ continue ;
159
166
160
- if ( ! SpellInfoStore . ContainsKey ( spellXSpellVisual . Value . SpellID ) )
167
+ if ( ! SpellInfoStore . ContainsKey ( spellXSpellVisual . SpellID ) )
161
168
{
162
169
Console . WriteLine (
163
- $ "SpellXSpellVisual: Unknown spell { spellXSpellVisual . Value . SpellID } referenced, ignoring!") ;
170
+ $ "SpellXSpellVisual: Unknown spell { spellXSpellVisual . SpellID } referenced, ignoring!") ;
164
171
continue ;
165
172
}
166
173
167
- SpellInfoStore [ spellXSpellVisual . Value . SpellID ] . SpellXSpellVisual = spellXSpellVisual . Value ;
174
+ SpellInfoStore [ spellXSpellVisual . SpellID ] . SpellXSpellVisual = spellXSpellVisual ;
168
175
}
169
176
} ) , Task . Run ( ( ) =>
170
177
{
@@ -176,13 +183,15 @@ await Task.WhenAll(Task.Run(() =>
176
183
$ "SpellScaling: Unknown spell { spellScaling . SpellID } referenced, ignoring!") ;
177
184
continue ;
178
185
}
179
-
180
186
SpellInfoStore [ spellScaling . SpellID ] . Scaling = spellScaling ;
181
187
}
182
188
} ) , Task . Run ( ( ) =>
183
189
{
184
190
foreach ( var spellAuraOptions in SpellAuraOptions . Values )
185
191
{
192
+ if ( spellAuraOptions . DifficultyID != 0 )
193
+ continue ;
194
+
186
195
if ( ! SpellInfoStore . ContainsKey ( spellAuraOptions . SpellID ) )
187
196
{
188
197
Console . WriteLine (
@@ -198,6 +207,9 @@ await Task.WhenAll(Task.Run(() =>
198
207
{
199
208
foreach ( var spellAuraRestriction in SpellAuraRestrictions . Values )
200
209
{
210
+ if ( spellAuraRestrictions . DifficultyID != 0 )
211
+ continue ;
212
+
201
213
if ( ! SpellInfoStore . ContainsKey ( spellAuraRestriction . SpellID ) )
202
214
{
203
215
Console . WriteLine (
@@ -211,6 +223,9 @@ await Task.WhenAll(Task.Run(() =>
211
223
{
212
224
foreach ( var spellCategory in SpellCategories . Values )
213
225
{
226
+ if ( spellCategory . DifficultyID != 0 )
227
+ continue ;
228
+
214
229
if ( ! SpellInfoStore . ContainsKey ( spellCategory . SpellID ) )
215
230
{
216
231
Console . WriteLine (
@@ -250,6 +265,9 @@ await Task.WhenAll(Task.Run(() =>
250
265
{
251
266
foreach ( var spellCooldown in SpellCooldowns . Values )
252
267
{
268
+ if ( spellCooldown . DifficultyID != 0 )
269
+ continue ;
270
+
253
271
if ( ! SpellInfoStore . ContainsKey ( spellCooldown . SpellID ) )
254
272
{
255
273
Console . WriteLine (
@@ -289,6 +307,9 @@ await Task.WhenAll(Task.Run(() =>
289
307
{
290
308
foreach ( var spellLevel in SpellLevels . Values )
291
309
{
310
+ if ( spellLevel . DifficultyID != 0 )
311
+ continue ;
312
+
292
313
if ( ! SpellInfoStore . ContainsKey ( spellLevel . SpellID ) )
293
314
{
294
315
Console . WriteLine ( $ "SpellLevels: Unknown spell { spellLevel . SpellID } referenced, ignoring!") ;
@@ -299,16 +320,16 @@ await Task.WhenAll(Task.Run(() =>
299
320
}
300
321
} ) , Task . Run ( ( ) =>
301
322
{
302
- foreach ( var effect in SpellReagents )
323
+ foreach ( var spellReagents in SpellReagents )
303
324
{
304
- if ( ! SpellInfoStore . ContainsKey ( effect . Value . SpellID ) )
325
+ if ( ! SpellInfoStore . ContainsKey ( spellReagents . Value . SpellID ) )
305
326
{
306
327
Console . WriteLine (
307
- $ "SpellReagents: Unknown spell { effect . Value . SpellID } referenced, ignoring!") ;
328
+ $ "SpellReagents: Unknown spell { spellReagents . Value . SpellID } referenced, ignoring!") ;
308
329
continue ;
309
330
}
310
331
311
- SpellInfoStore [ effect . Value . SpellID ] . Reagents = effect . Value ;
332
+ SpellInfoStore [ spellReagents . Value . SpellID ] . Reagents = spellReagents . Value ;
312
333
}
313
334
} ) , Task . Run ( ( ) =>
314
335
{
0 commit comments