From 895891fabc3b58fb366a2628fc4042ca6ca3ae1c Mon Sep 17 00:00:00 2001 From: Andy Newjack Date: Wed, 8 Apr 2020 20:02:06 -0300 Subject: [PATCH] oops forgot to handle missing specials --- src/entity/item/weapon.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entity/item/weapon.rs b/src/entity/item/weapon.rs index 10c698b..0309cb8 100644 --- a/src/entity/item/weapon.rs +++ b/src/entity/item/weapon.rs @@ -893,7 +893,7 @@ impl Weapon { let mut result = [0u8; 16]; result[0..3].copy_from_slice(&self.weapon.value()); result[3] = self.grind; - result[4] = self.special.unwrap().value(); + result[4] = self.special.unwrap_or(WeaponSpecial::None).value(); if self.tekked == false { result[4] += 0x80