wowlab_engine_gamedata/game_data/
environment_access.rs1use wowlab_types::data::WeaponStats;
4
5use super::{ConsumableSpells, ResolvedGameData};
6
7impl ResolvedGameData {
8 #[must_use]
9 pub fn armor_constant(&self) -> f64 {
10 self.inner.environment.armor_constant
11 }
12
13 #[must_use]
14 pub fn creature_armor(&self) -> f64 {
15 self.inner.environment.creature_armor
16 }
17
18 #[must_use]
19 pub fn target_armor_mult(&self) -> f64 {
20 self.inner.environment.target_armor_mult
21 }
22
23 #[must_use]
24 pub fn armor_constant_mod(&self) -> f64 {
25 self.inner.environment.armor_constant_mod
26 }
27
28 #[must_use]
29 pub fn armor_k(&self) -> f64 {
30 self.inner.environment.armor_constant * self.inner.environment.armor_constant_mod
31 }
32
33 #[must_use]
34 pub fn main_hand(&self) -> WeaponStats {
35 self.inner.environment.main_hand
36 }
37
38 #[must_use]
39 pub fn off_hand(&self) -> Option<WeaponStats> {
40 self.inner.environment.off_hand
41 }
42
43 #[must_use]
45 pub fn consumable_spells(&self) -> &ConsumableSpells {
46 &self.inner.environment.consumables
47 }
48}