@@ -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,32 @@ 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 ( ! SpellInfoStore . ContainsKey ( spellTargetRestrictions . SpellID ) )
145
149
{
146
150
Console . WriteLine (
147
- $ "SpellTargetRestrictions: Unknown spell { effect . SpellID } referenced, ignoring!") ;
151
+ $ "SpellTargetRestrictions: Unknown spell { spellTargetRestrictions . SpellID } referenced, ignoring!") ;
148
152
continue ;
149
153
}
150
154
151
- SpellInfoStore [ effect . SpellID ] . TargetRestrictions . Add ( effect ) ;
155
+ SpellInfoStore [ spellTargetRestrictions . SpellID ] . TargetRestrictions . Add ( spellTargetRestrictions ) ;
152
156
}
153
157
} ) , Task . Run ( ( ) =>
154
158
{
155
- foreach ( var spellXSpellVisual in SpellXSpellVisual . Where ( effect =>
156
- effect . Value . DifficultyID == 0 && effect . Value . CasterPlayerConditionID == 0 ) )
159
+ foreach ( var spellXSpellVisual in SpellXSpellVisual . Values . Where ( effect => effect . CasterPlayerConditionID == 0 ) )
157
160
{
158
- if ( spellXSpellVisual . Value . DifficultyID != 0 ) { continue ; }
161
+ if ( spellXSpellVisual . DifficultyID != 0 )
162
+ continue ;
159
163
160
- if ( ! SpellInfoStore . ContainsKey ( spellXSpellVisual . Value . SpellID ) )
164
+ if ( ! SpellInfoStore . ContainsKey ( spellXSpellVisual . SpellID ) )
161
165
{
162
166
Console . WriteLine (
163
- $ "SpellXSpellVisual: Unknown spell { spellXSpellVisual . Value . SpellID } referenced, ignoring!") ;
167
+ $ "SpellXSpellVisual: Unknown spell { spellXSpellVisual . SpellID } referenced, ignoring!") ;
164
168
continue ;
165
169
}
166
170
167
- SpellInfoStore [ spellXSpellVisual . Value . SpellID ] . SpellXSpellVisual = spellXSpellVisual . Value ;
171
+ SpellInfoStore [ spellXSpellVisual . SpellID ] . SpellXSpellVisual = spellXSpellVisual ;
168
172
}
169
173
} ) , Task . Run ( ( ) =>
170
174
{
@@ -176,13 +180,15 @@ await Task.WhenAll(Task.Run(() =>
176
180
$ "SpellScaling: Unknown spell { spellScaling . SpellID } referenced, ignoring!") ;
177
181
continue ;
178
182
}
179
-
180
183
SpellInfoStore [ spellScaling . SpellID ] . Scaling = spellScaling ;
181
184
}
182
185
} ) , Task . Run ( ( ) =>
183
186
{
184
187
foreach ( var spellAuraOptions in SpellAuraOptions . Values )
185
188
{
189
+ if ( spellAuraOptions . DifficultyID != 0 )
190
+ continue ;
191
+
186
192
if ( ! SpellInfoStore . ContainsKey ( spellAuraOptions . SpellID ) )
187
193
{
188
194
Console . WriteLine (
@@ -196,21 +202,27 @@ await Task.WhenAll(Task.Run(() =>
196
202
}
197
203
} ) , Task . Run ( ( ) =>
198
204
{
199
- foreach ( var spellAuraRestriction in SpellAuraRestrictions . Values )
205
+ foreach ( var spellAuraRestrictions in SpellAuraRestrictions . Values )
200
206
{
201
- if ( ! SpellInfoStore . ContainsKey ( spellAuraRestriction . SpellID ) )
207
+ if ( spellAuraRestrictions . DifficultyID != 0 )
208
+ continue ;
209
+
210
+ if ( ! SpellInfoStore . ContainsKey ( spellAuraRestrictions . SpellID ) )
202
211
{
203
212
Console . WriteLine (
204
- $ "SpellAuraRestrictions: Unknown spell { spellAuraRestriction . SpellID } referenced, ignoring!") ;
213
+ $ "SpellAuraRestrictions: Unknown spell { spellAuraRestrictions . SpellID } referenced, ignoring!") ;
205
214
continue ;
206
215
}
207
216
208
- SpellInfoStore [ spellAuraRestriction . SpellID ] . AuraRestrictions = spellAuraRestriction ;
217
+ SpellInfoStore [ spellAuraRestrictions . SpellID ] . AuraRestrictions = spellAuraRestrictions ;
209
218
}
210
219
} ) , Task . Run ( ( ) =>
211
220
{
212
221
foreach ( var spellCategory in SpellCategories . Values )
213
222
{
223
+ if ( spellCategory . DifficultyID != 0 )
224
+ continue ;
225
+
214
226
if ( ! SpellInfoStore . ContainsKey ( spellCategory . SpellID ) )
215
227
{
216
228
Console . WriteLine (
@@ -250,6 +262,9 @@ await Task.WhenAll(Task.Run(() =>
250
262
{
251
263
foreach ( var spellCooldown in SpellCooldowns . Values )
252
264
{
265
+ if ( spellCooldown . DifficultyID != 0 )
266
+ continue ;
267
+
253
268
if ( ! SpellInfoStore . ContainsKey ( spellCooldown . SpellID ) )
254
269
{
255
270
Console . WriteLine (
@@ -289,6 +304,9 @@ await Task.WhenAll(Task.Run(() =>
289
304
{
290
305
foreach ( var spellLevel in SpellLevels . Values )
291
306
{
307
+ if ( spellLevel . DifficultyID != 0 )
308
+ continue ;
309
+
292
310
if ( ! SpellInfoStore . ContainsKey ( spellLevel . SpellID ) )
293
311
{
294
312
Console . WriteLine ( $ "SpellLevels: Unknown spell { spellLevel . SpellID } referenced, ignoring!") ;
@@ -299,16 +317,16 @@ await Task.WhenAll(Task.Run(() =>
299
317
}
300
318
} ) , Task . Run ( ( ) =>
301
319
{
302
- foreach ( var effect in SpellReagents )
320
+ foreach ( var spellReagents in SpellReagents )
303
321
{
304
- if ( ! SpellInfoStore . ContainsKey ( effect . Value . SpellID ) )
322
+ if ( ! SpellInfoStore . ContainsKey ( spellReagents . Value . SpellID ) )
305
323
{
306
324
Console . WriteLine (
307
- $ "SpellReagents: Unknown spell { effect . Value . SpellID } referenced, ignoring!") ;
325
+ $ "SpellReagents: Unknown spell { spellReagents . Value . SpellID } referenced, ignoring!") ;
308
326
continue ;
309
327
}
310
328
311
- SpellInfoStore [ effect . Value . SpellID ] . Reagents = effect . Value ;
329
+ SpellInfoStore [ spellReagents . Value . SpellID ] . Reagents = spellReagents . Value ;
312
330
}
313
331
} ) , Task . Run ( ( ) =>
314
332
{
0 commit comments