Skip to main content

wowlab_parsers/parsers/dbc/rows/
scaling.rs

1// #t(file: rust_duplicate_strings) DBC field attributes repeat an upstream-schema ownership reason that Rust requires as a literal.
2
3use serde::Deserialize;
4use wowlab_engine_macros::{HasFk, HasId};
5
6/// DBC row from Curve.db2: curve definition with type and flags.
7#[derive(Clone, Debug, Deserialize, HasId)]
8#[allow(
9    non_snake_case,
10    reason = "fields mirror upstream DBC CSV headers exactly"
11)]
12pub struct CurveRow {
13    pub ID: i32,
14    pub Type: i32,
15    pub Flags: i32,
16}
17
18/// DBC row from ItemScalingConfig.db2: Midnight item-level scaling config.
19#[derive(Clone, Debug, Deserialize, HasId)]
20#[allow(
21    non_snake_case,
22    reason = "fields mirror upstream DBC CSV headers exactly"
23)]
24pub struct ItemScalingConfigRow {
25    pub ID: i32,
26    pub ItemOffsetCurveID: i32,
27    pub ItemLevel: i32,
28    pub RequiredLevel: i32,
29    pub ItemSquishEraID: i32,
30    pub Flags: i32,
31}
32
33/// DBC row from ItemOffsetCurve.db2: per-config curve + flat offset.
34#[derive(Clone, Debug, Deserialize, HasId)]
35#[allow(
36    non_snake_case,
37    reason = "fields mirror upstream DBC CSV headers exactly"
38)]
39pub struct ItemOffsetCurveRow {
40    pub ID: i32,
41    pub CurveID: i32,
42    pub Offset: i32,
43}
44
45/// DBC row from ItemSquishEra.db2: per-expansion item-squish curve.
46#[derive(Clone, Debug, Deserialize, HasId)]
47#[allow(
48    non_snake_case,
49    reason = "fields mirror upstream DBC CSV headers exactly"
50)]
51pub struct ItemSquishEraRow {
52    pub ID: i32,
53    pub Patch: i32,
54    pub CurveID: i32,
55    pub Flags: i32,
56}
57
58/// DBC row from CurvePoint.db2: a single point on a scaling curve.
59#[derive(Clone, Debug, Deserialize, HasFk)]
60#[allow(
61    non_snake_case,
62    reason = "fields mirror upstream DBC CSV headers exactly"
63)]
64#[fk_field = "CurveID"]
65pub struct CurvePointRow {
66    pub Pos_0: f64,
67    pub Pos_1: f64,
68    pub PosPreSquish_0: f64,
69    pub PosPreSquish_1: f64,
70    pub ID: i32,
71    pub CurveID: i32,
72    pub OrderIndex: i32,
73}
74
75/// DBC row from SpellScaling.db2: spell scaling level range.
76#[derive(Clone, Debug, Deserialize, HasFk)]
77#[allow(
78    non_snake_case,
79    reason = "fields mirror upstream DBC CSV headers exactly"
80)]
81#[fk_field = "SpellID"]
82pub struct SpellScalingRow {
83    pub ID: i32,
84    pub SpellID: i32,
85    pub MinScalingLevel: i32,
86    pub MaxScalingLevel: i32,
87}
88
89/// DBC row from SpellItemEnchantment.db2: enchantment effect and scaling data.
90#[derive(Clone, Debug, Deserialize, HasId)]
91#[allow(
92    non_snake_case,
93    reason = "fields mirror upstream DBC CSV headers exactly"
94)]
95pub struct SpellItemEnchantmentRow {
96    pub ID: i32,
97    pub Name_lang: Option<String>,
98    pub HordeName_lang: Option<String>,
99    pub Duration: i32,
100    pub EffectArg_0: i32,
101    pub EffectArg_1: i32,
102    pub EffectArg_2: i32,
103    pub Flags: i32,
104    pub EffectScalingPoints_0: f32,
105    pub EffectScalingPoints_1: f32,
106    pub EffectScalingPoints_2: f32,
107    pub IconFileDataID: i32,
108    pub ItemLevelMin: i32,
109    pub ItemLevelMax: i32,
110    pub TransmogUseConditionID: i32,
111    pub TransmogCost: i32,
112    pub EffectPointsMin_0: f32,
113    pub EffectPointsMin_1: f32,
114    pub EffectPointsMin_2: f32,
115    pub ItemVisual: i32,
116    pub RequiredSkillID: i32,
117    pub RequiredSkillRank: i32,
118    pub ItemLevel: i32,
119    pub Charges: i32,
120    pub Effect_0: i32,
121    pub Effect_1: i32,
122    pub Effect_2: i32,
123    pub ScalingClass: i32,
124    pub ScalingClassRestricted: i32,
125    pub Condition_ID: i32,
126    pub MinLevel: i32,
127    pub MaxLevel: i32,
128}
129
130/// DBC row from ItemDamageOneHand.db2: one-hand weapon DPS by quality and item level.
131#[derive(Clone, Debug, Deserialize, HasId)]
132#[allow(
133    non_snake_case,
134    reason = "fields mirror upstream DBC CSV headers exactly"
135)]
136pub struct ItemDamageOneHandRow {
137    pub ID: i32,
138    pub ItemLevel: i32,
139    pub Quality_0: f32,
140    pub Quality_1: f32,
141    pub Quality_2: f32,
142    pub Quality_3: f32,
143    pub Quality_4: f32,
144    pub Quality_5: f32,
145    pub Quality_6: f32,
146}
147
148/// DBC row from ItemDamageTwoHand.db2: two-hand weapon DPS by quality and item level.
149#[derive(Clone, Debug, Deserialize, HasId)]
150#[allow(
151    non_snake_case,
152    reason = "fields mirror upstream DBC CSV headers exactly"
153)]
154// #t(rust_similar_structs) distinct ItemDamageTwoHand source-table schema must retain its own row type
155pub struct ItemDamageTwoHandRow {
156    pub ID: i32,
157    pub ItemLevel: i32,
158    pub Quality_0: f32,
159    pub Quality_1: f32,
160    pub Quality_2: f32,
161    pub Quality_3: f32,
162    pub Quality_4: f32,
163    pub Quality_5: f32,
164    pub Quality_6: f32,
165}
166
167/// DBC row from ItemDamageAmmo.db2: ranged/ammo weapon DPS by quality and item level.
168#[derive(Clone, Debug, Deserialize, HasId)]
169#[allow(
170    non_snake_case,
171    reason = "fields mirror upstream DBC CSV headers exactly"
172)]
173// #t(rust_similar_structs) distinct ItemDamageAmmo source-table schema must retain its own row type
174pub struct ItemDamageAmmoRow {
175    pub ID: i32,
176    pub ItemLevel: i32,
177    pub Quality_0: f32,
178    pub Quality_1: f32,
179    pub Quality_2: f32,
180    pub Quality_3: f32,
181    pub Quality_4: f32,
182    pub Quality_5: f32,
183    pub Quality_6: f32,
184}
185
186/// DBC row from ExpectedStat.db2: expected stat budgets at a given level and expansion.
187#[derive(Clone, Debug, Deserialize, HasId)]
188#[allow(
189    non_snake_case,
190    reason = "fields mirror upstream DBC CSV headers exactly"
191)]
192pub struct ExpectedStatRow {
193    pub ID: i32,
194    pub ExpansionID: i32,
195    pub CreatureHealth: f32,
196    pub PlayerHealth: f32,
197    pub CreatureAutoAttackDps: f32,
198    pub CreatureArmor: f32,
199    pub PlayerMana: f32,
200    pub PlayerPrimaryStat: f32,
201    pub PlayerSecondaryStat: f32,
202    pub ArmorConstant: f32,
203    pub CreatureSpellDamage: f32,
204    pub ContentSetID: i32,
205    pub Lvl: i32,
206}
207
208/// DBC row from ExpectedStatMod.db2: multiplier overrides for expected stat budgets.
209#[derive(Clone, Debug, Deserialize, HasId)]
210#[allow(
211    non_snake_case,
212    reason = "fields mirror upstream DBC CSV headers exactly"
213)]
214pub struct ExpectedStatModRow {
215    pub ID: i32,
216    pub CreatureHealthMod: f32,
217    pub PlayerHealthMod: f32,
218    pub CreatureAutoAttackDPSMod: f32,
219    pub CreatureArmorMod: f32,
220    pub PlayerManaMod: f32,
221    pub PlayerPrimaryStatMod: f32,
222    pub PlayerSecondaryStatMod: f32,
223    pub ArmorConstantMod: f32,
224    pub CreatureSpellDamageMod: f32,
225}
226
227/// DBC row from PowerType.db2: resource type definition (mana, rage, energy, etc.).
228#[derive(Clone, Debug, Deserialize, HasId)]
229#[allow(
230    non_snake_case,
231    reason = "fields mirror upstream DBC CSV headers exactly"
232)]
233pub struct PowerTypeRow {
234    pub NameGlobalStringTag: Option<String>,
235    pub CostGlobalStringTag: Option<String>,
236    pub ID: i32,
237    pub PowerTypeEnum: i32,
238    pub MinPower: i32,
239    pub MaxBasePower: i32,
240    pub CenterPower: i32,
241    pub DefaultPower: i32,
242    pub DisplayModifier: f32,
243    pub RegenInterruptTimeMS: i32,
244    pub RegenPeace: f32,
245    pub RegenCombat: f32,
246    pub Flags: i32,
247}
248
249/// DBC row from ItemArmorQuality.db2: armor quality multipliers by item level.
250#[derive(Clone, Debug, Deserialize, HasId)]
251#[allow(
252    non_snake_case,
253    reason = "fields mirror upstream DBC CSV headers exactly"
254)]
255pub struct ItemArmorQualityRow {
256    pub ID: i32,
257    pub Qualitymod_0: f32,
258    pub Qualitymod_1: f32,
259    pub Qualitymod_2: f32,
260    pub Qualitymod_3: f32,
261    pub Qualitymod_4: f32,
262    pub Qualitymod_5: f32,
263    pub Qualitymod_6: f32,
264}
265
266/// DBC row from ItemArmorShield.db2: shield armor values by quality and item level.
267#[derive(Clone, Debug, Deserialize, HasId)]
268#[allow(
269    non_snake_case,
270    reason = "fields mirror upstream DBC CSV headers exactly"
271)]
272// #t(rust_similar_structs) distinct ItemArmorShield source-table schema must retain its own row type
273pub struct ItemArmorShieldRow {
274    pub ID: i32,
275    pub Quality_0: f32,
276    pub Quality_1: f32,
277    pub Quality_2: f32,
278    pub Quality_3: f32,
279    pub Quality_4: f32,
280    pub Quality_5: f32,
281    pub Quality_6: f32,
282    pub ItemLevel: i32,
283}
284
285/// DBC row from ItemArmorTotal.db2: total armor by armor class and item level.
286#[derive(Clone, Debug, Deserialize, HasId)]
287#[allow(
288    non_snake_case,
289    reason = "fields mirror upstream DBC CSV headers exactly"
290)]
291pub struct ItemArmorTotalRow {
292    pub ID: i32,
293    pub ItemLevel: i32,
294    pub Cloth: f32,
295    pub Leather: f32,
296    pub Mail: f32,
297    pub Plate: f32,
298}
299
300/// DBC row from ArmorLocation.db2: armor slot multipliers by armor class.
301#[derive(Clone, Debug, Deserialize, HasId)]
302#[allow(
303    non_snake_case,
304    reason = "fields mirror upstream DBC CSV headers exactly"
305)]
306pub struct ArmorLocationRow {
307    pub ID: i32,
308    pub Clothmodifier: f32,
309    pub Leathermodifier: f32,
310    pub Chainmodifier: f32,
311    pub Platemodifier: f32,
312    pub Modifier: f32,
313}
314
315/// DBC row from ItemDamageOneHandCaster.db2: one-hand caster weapon DPS by quality.
316#[derive(Clone, Debug, Deserialize, HasId)]
317#[allow(
318    non_snake_case,
319    reason = "fields mirror upstream DBC CSV headers exactly"
320)]
321// #t(rust_similar_structs) distinct ItemDamageOneHandCaster source-table schema must retain its own row type
322pub struct ItemDamageOneHandCasterRow {
323    pub ID: i32,
324    pub ItemLevel: i32,
325    pub Quality_0: f32,
326    pub Quality_1: f32,
327    pub Quality_2: f32,
328    pub Quality_3: f32,
329    pub Quality_4: f32,
330    pub Quality_5: f32,
331    pub Quality_6: f32,
332}
333
334/// DBC row from ItemDamageTwoHandCaster.db2: two-hand caster weapon DPS by quality.
335#[derive(Clone, Debug, Deserialize, HasId)]
336#[allow(
337    non_snake_case,
338    reason = "fields mirror upstream DBC CSV headers exactly"
339)]
340// #t(rust_similar_structs) distinct ItemDamageTwoHandCaster source-table schema must retain its own row type
341pub struct ItemDamageTwoHandCasterRow {
342    pub ID: i32,
343    pub ItemLevel: i32,
344    pub Quality_0: f32,
345    pub Quality_1: f32,
346    pub Quality_2: f32,
347    pub Quality_3: f32,
348    pub Quality_4: f32,
349    pub Quality_5: f32,
350    pub Quality_6: f32,
351}
352
353/// DBC row from RandPropPoints.db2: stat budget allocation points by item level.
354#[derive(Clone, Debug, Deserialize, HasId)]
355#[allow(
356    non_snake_case,
357    reason = "fields mirror upstream DBC CSV headers exactly"
358)]
359pub struct RandPropPointsRow {
360    pub ID: i32,
361    pub DamageReplaceStatF: f64,
362    pub DamageSecondaryF: f64,
363    pub DamageReplaceStat: i32,
364    pub DamageSecondary: i32,
365    pub EpicF_0: f64,
366    pub EpicF_1: f64,
367    pub EpicF_2: f64,
368    pub EpicF_3: f64,
369    pub EpicF_4: f64,
370    pub SuperiorF_0: f64,
371    pub SuperiorF_1: f64,
372    pub SuperiorF_2: f64,
373    pub SuperiorF_3: f64,
374    pub SuperiorF_4: f64,
375    pub GoodF_0: f64,
376    pub GoodF_1: f64,
377    pub GoodF_2: f64,
378    pub GoodF_3: f64,
379    pub GoodF_4: f64,
380    pub Epic_0: i32,
381    pub Epic_1: i32,
382    pub Epic_2: i32,
383    pub Epic_3: i32,
384    pub Epic_4: i32,
385    pub Superior_0: i32,
386    pub Superior_1: i32,
387    pub Superior_2: i32,
388    pub Superior_3: i32,
389    pub Superior_4: i32,
390    pub Good_0: i32,
391    pub Good_1: i32,
392    pub Good_2: i32,
393    pub Good_3: i32,
394    pub Good_4: i32,
395}