From c54639f53d29db5b2a7908fd0e97fafc874569f8 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 5 May 2024 17:00:57 +0200 Subject: [PATCH] fix: ECM drones do not have DPS --- src/calculate/pass_4/drone.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calculate/pass_4/drone.rs b/src/calculate/pass_4/drone.rs index 15e0651..e588ca8 100644 --- a/src/calculate/pass_4/drone.rs +++ b/src/calculate/pass_4/drone.rs @@ -73,7 +73,7 @@ pub fn attribute_drone_damage(ship: &mut Ship) { let attr_damage_without_reload_dps = AttributeId::damageWithoutReloadDps as i32; for item in &mut ship.items { - if item.flag == 87 && item.state == EffectCategory::Active { + if item.flag == 87 && item.state == EffectCategory::Active && item.attributes.contains_key(&attr_damage_alpha_hp) { let damage_alpha_hp = item.attributes.get(&attr_damage_alpha_hp).unwrap(); total_base_alpha_hp += damage_alpha_hp.base_value; total_alpha_hp += damage_alpha_hp.value.unwrap();