Skip to main content

wowlab_parsers/parsers/dbc/rows/
class_spec.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 ChrSpecialization.db2: spec identity, class, role, and mastery spells.
7#[derive(Clone, Debug, Deserialize, HasId)]
8#[allow(
9    non_snake_case,
10    reason = "fields mirror upstream DBC CSV headers exactly"
11)]
12pub struct ChrSpecializationRow {
13    pub Name_lang: Option<String>,
14    pub FemaleName_lang: Option<String>,
15    pub Description_lang: Option<String>,
16    pub ID: i32,
17    pub ClassID: Option<i32>,
18    pub OrderIndex: Option<i32>,
19    pub PetTalentType: i32,
20    pub Role: i32,
21    pub Flags: i32,
22    pub SpellIconFileID: i32,
23    pub PrimaryStatPriority: i32,
24    pub AnimReplacements: i32,
25    pub MasterySpellID_0: i32,
26    pub MasterySpellID_1: i32,
27}
28
29/// DBC row from ChrRaces.db2: race identity and its bit position in race masks.
30#[derive(Clone, Debug, Deserialize, HasId)]
31#[allow(
32    non_snake_case,
33    reason = "fields mirror upstream DBC CSV headers exactly"
34)]
35pub struct ChrRacesRow {
36    pub ID: i32,
37    /// Bit index this race occupies in every `RaceMasks_*` column.
38    pub PlayableRaceBit: i32,
39}
40
41/// DBC row from ChrClasses.db2: class identity, pet info, and stat priorities.
42#[derive(Clone, Debug, Deserialize, HasId)]
43#[allow(
44    non_snake_case,
45    reason = "fields mirror upstream DBC CSV headers exactly"
46)]
47pub struct ChrClassesRow {
48    pub Name_lang: Option<String>,
49    pub Filename: Option<String>,
50    pub Name_male_lang: Option<String>,
51    pub Name_female_lang: Option<String>,
52    pub PetNameToken: Option<String>,
53    pub Description_lang: Option<String>,
54    pub RoleInfoString_lang: Option<String>,
55    pub DisabledString_lang: Option<String>,
56    pub Hyphenated_name_male_lang: Option<String>,
57    pub Hyphenated_name_female_lang: Option<String>,
58    pub CreateScreenFileDataID: i32,
59    pub SelectScreenFileDataID: i32,
60    pub IconFileDataID: i32,
61    pub LowResScreenFileDataID: i32,
62    pub Flags: i32,
63    pub StartingLevel: i32,
64    pub SpellTextureBlobFileDataID: i32,
65    pub ArmorTypeMask: i32,
66    #[serde(rename = "Field_9_0_1_34490_018")]
67    pub Field_9_0_1: i32,
68    pub MaleCharacterCreationVisualFallback: i32,
69    pub MaleCharacterCreationIdleVisualFallback: i32,
70    pub FemaleCharacterCreationVisualFallback: i32,
71    pub FemaleCharacterCreationIdleVisualFallback: i32,
72    pub CharacterCreationIdleGroundVisualFallback: i32,
73    pub CharacterCreationGroundVisualFallback: i32,
74    pub AlteredFormCharacterCreationIdleVisualFallback: i32,
75    pub CharacterCreationAnimLoopWaitTimeMsFallback: i32,
76    pub CinematicSequenceID: i32,
77    pub DefaultSpec: i32,
78    pub ID: i32,
79    pub HasStrengthAttackBonus: i32,
80    pub PrimaryStatPriority: i32,
81    pub DisplayPower: i32,
82    pub RangedAttackPowerPerAgility: i32,
83    pub AttackPowerPerAgility: i32,
84    pub AttackPowerPerStrength: i32,
85    pub SpellClassSet: i32,
86    pub ClassColorR: Option<i32>,
87    pub ClassColorG: Option<i32>,
88    pub ClassColorB: Option<i32>,
89    pub RolesMask: i32,
90    pub DamageBonusStat: i32,
91    pub HasRelicSlot: i32,
92}
93
94/// DBC row from SpecializationSpells.db2: spells granted by a specialization.
95#[derive(Clone, Debug, Deserialize, HasFk)]
96#[allow(
97    non_snake_case,
98    reason = "fields mirror upstream DBC CSV headers exactly"
99)]
100#[fk_field = "SpecID"]
101pub struct SpecializationSpellsRow {
102    pub Description_lang: Option<String>,
103    pub ID: i32,
104    pub SpecID: i32,
105    pub SpellID: i32,
106    pub OverridesSpellID: i32,
107    pub DisplayOrder: i32,
108}
109
110/// DBC row from AssistedCombat.db2: assisted combat rotation header.
111#[derive(Clone, Debug, Deserialize, HasId)]
112#[allow(
113    non_snake_case,
114    reason = "fields mirror upstream DBC CSV headers exactly"
115)]
116pub struct AssistedCombatRow {
117    pub ID: i32,
118    pub ChrSpecializationID: i32,
119}
120
121/// DBC row from AssistedCombatStep.db2: a single step in an assisted combat rotation.
122#[derive(Clone, Debug, Deserialize, HasFk)]
123#[allow(
124    non_snake_case,
125    reason = "fields mirror upstream DBC CSV headers exactly"
126)]
127#[fk_field = "AssistedCombatID"]
128pub struct AssistedCombatStepRow {
129    pub ID: i32,
130    pub SpellID: i32,
131    pub AssistedCombatID: i32,
132    pub OrderIndex: i32,
133}
134
135/// DBC row from AssistedCombatRule.db2: condition rule for an assisted combat step.
136#[derive(Clone, Debug, Deserialize, HasFk)]
137#[allow(
138    non_snake_case,
139    reason = "fields mirror upstream DBC CSV headers exactly"
140)]
141#[fk_field = "IdParent"]
142pub struct AssistedCombatRuleRow {
143    pub ID: i32,
144    pub OrderIndex: i32,
145    #[serde(rename = "Field_11_1_7_60520_002")]
146    pub Field_11_1_7_60520_002: i32,
147    pub ConditionType: i32,
148    pub ConditionValue1: i32,
149    pub ConditionValue2: i32,
150    pub ConditionValue3: i32,
151    #[serde(rename = "AssistedCombatStepID")]
152    pub IdParent: i32,
153}
154
155/// DBC row from SpecSetMember.db2: maps a specialization to a spec set.
156#[derive(Clone, Debug, Deserialize, HasFk)]
157#[allow(
158    non_snake_case,
159    reason = "fields mirror upstream DBC CSV headers exactly"
160)]
161#[fk_field = "SpecSet"]
162pub struct SpecSetMemberRow {
163    pub ID: i32,
164    pub ChrSpecializationID: i32,
165    pub SpecSet: i32,
166}
167
168/// DBC row from CooldownSet.db2: shared cooldown group for a spec.
169#[derive(Clone, Debug, Deserialize, HasId)]
170#[allow(
171    non_snake_case,
172    reason = "fields mirror upstream DBC CSV headers exactly"
173)]
174pub struct CooldownSetRow {
175    pub ID: i32,
176    pub ChrSpecialization: i32,
177    #[serde(rename = "Field_11_1_5_59571_002")]
178    pub Field: i32,
179}
180
181/// DBC row from CooldownSetSpell.db2: spell membership in a cooldown set.
182#[derive(Clone, Debug, Deserialize, HasFk)]
183#[allow(
184    non_snake_case,
185    reason = "fields mirror upstream DBC CSV headers exactly"
186)]
187#[fk_field = "CooldownSetID"]
188pub struct CooldownSetSpellRow {
189    pub ID: i32,
190    pub CooldownSetID: i32,
191    pub SpellID: i32,
192    pub Category: i32,
193    pub PlayerConditionID: i32,
194    pub OrderIndex: i32,
195    pub Flags: i32,
196}