Skip to main content

wowlab_types/types/data/
weapon.rs

1use serde::{Deserialize, Serialize};
2
3/// Per-weapon-slot stats; zeroed means no weapon, so callers must guard against `speed_ms == 0`.
4#[derive(Clone, Copy, Debug, Default, Deserialize, Serialize)]
5#[cfg_attr(feature = "wasm", derive(tsify::Tsify))]
6#[cfg_attr(feature = "wasm", tsify(into_wasm_abi, from_wasm_abi))]
7pub struct WeaponStats {
8    pub min_damage: f64,
9    pub max_damage: f64,
10    pub speed_ms: u32,
11    pub normalized_speed_s: f64,
12    pub item_class: i32,
13    pub subclass: i32,
14    pub inventory_type: i32,
15}