Skip to main content

wowlab_engine_adapter_data/
lookup_key.rs

1//! Named identities used by resolver-local lookup tables.
2
3#[derive(Clone, Debug, Eq, Hash, PartialEq)]
4pub(crate) struct ExpansionTraitTreeKey {
5    expansion_id: i32,
6    system: String,
7}
8
9impl ExpansionTraitTreeKey {
10    pub(crate) fn new(expansion_id: i32, system: impl Into<String>) -> Self {
11        Self {
12            expansion_id,
13            system: system.into(),
14        }
15    }
16}
17
18#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
19pub(crate) struct ExpectedStatsKey {
20    expansion_id: i32,
21    level: i32,
22}
23
24impl ExpectedStatsKey {
25    pub(crate) const fn new(expansion_id: i32, level: i32) -> Self {
26        Self {
27            expansion_id,
28            level,
29        }
30    }
31}
32
33#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
34pub(crate) struct SpellEffectKey {
35    spell_id: i32,
36    one_based_index: u8,
37}
38
39impl SpellEffectKey {
40    pub(crate) const fn new(spell_id: i32, one_based_index: u8) -> Self {
41        Self {
42            spell_id,
43            one_based_index,
44        }
45    }
46}