diff --git a/src/entity/item/esweapon.rs b/src/entity/item/esweapon.rs index be38a8a..71d1e74 100644 --- a/src/entity/item/esweapon.rs +++ b/src/entity/item/esweapon.rs @@ -205,8 +205,8 @@ impl SRankWeapon { // TODO: return Result pub fn from_bytes(bytes: [u8; 16]) -> SRankWeapon { - let type = bytes[1]; - let special = bytes[2]; + let type = SrankType.from_value(bytes[1] - 0x70).unwrap(); + let special = SrankSpecial.from_value(bytes[2]).unwrap(); let grind = bytes[3]; let name = SRankWeapon::name_from_bytes(bytes[6..12]);