From 6ef78b4ed6d3bc38c99ccaf4fd398dee2b088b0b Mon Sep 17 00:00:00 2001 From: Andy Newjack Date: Sun, 3 May 2020 14:26:40 -0300 Subject: [PATCH 1/2] drop armour with stats --- src/entity/item/armor.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/entity/item/armor.rs b/src/entity/item/armor.rs index d37bce0..62ae2df 100644 --- a/src/entity/item/armor.rs +++ b/src/entity/item/armor.rs @@ -200,8 +200,9 @@ impl Armor { pub fn as_bytes(&self) -> [u8; 16] { let mut result = [0; 16]; result[0..3].copy_from_slice(&self.armor.value()); - // TODO: other attrs - + result[5] = self.slots; + result[6] = self.dfp; + result[8] = self.evp; result } } From 9c173777227e88b15ba74fcdf8aadb96472839d9 Mon Sep 17 00:00:00 2001 From: Andy Newjack Date: Mon, 4 May 2020 19:50:47 -0300 Subject: [PATCH 2/2] drop shields with non-0 stats --- src/entity/item/shield.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entity/item/shield.rs b/src/entity/item/shield.rs index 3eb5e30..d2a34fb 100644 --- a/src/entity/item/shield.rs +++ b/src/entity/item/shield.rs @@ -353,8 +353,8 @@ impl Shield { pub fn as_bytes(&self) -> [u8; 16] { let mut result = [0; 16]; result[0..3].copy_from_slice(&self.shield.value()); - // TODO: other attrs - + result[6] = self.dfp; + result[8] = self.evp; result } }