wowlab_engine_content/hooks/frost_death_knight/
config.rs1use wowlab_engine_ports::HandlerParams;
2use wowlab_types::sim::SpellIdx;
3
4use crate::generated::specs::frost_death_knight::{SET_BONUS, TALENT};
5
6#[derive(Clone, Copy, Debug, Default)]
7pub(super) struct FrostDkConfig {
8 pub(super) brittle_proc_chance: f64,
9 pub(super) mid2_2pc: bool,
10}
11
12pub(super) fn frost_dk_config(params: &HandlerParams<'_>) -> FrostDkConfig {
13 FrostDkConfig {
14 brittle_proc_chance: if params.talent_picked(TALENT::BRITTLE) {
15 params
16 .game_data
17 .proc_chance(SpellIdx::from_raw(TALENT::BRITTLE))
18 .unwrap_or_default()
19 } else {
20 0.0
21 },
22 mid2_2pc: params
23 .set_bonus_auras
24 .contains(&SET_BONUS::MID2_FROST_2PC),
25 }
26}