From 8157db4c69682f08d1c692a1c5c15f2f3a2460ae Mon Sep 17 00:00:00 2001 From: jake Date: Sun, 29 Jan 2023 23:56:28 -0700 Subject: [PATCH] set tech level correctly when reading from postgres --- src/entity/gateway/postgres/models.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entity/gateway/postgres/models.rs b/src/entity/gateway/postgres/models.rs index fd4980b..c310dda 100644 --- a/src/entity/gateway/postgres/models.rs +++ b/src/entity/gateway/postgres/models.rs @@ -244,7 +244,7 @@ impl From for CharacterEntity { prop_y: other.prop_y, }, techs: CharacterTechniques { - techs: other.techs.iter().enumerate().take(19).filter(|(_, t)| **t != 0xFF).map(|(i, t)| (tech::Technique::from_value(i as u8), TechLevel(*t)) ).collect() + techs: other.techs.iter().enumerate().take(19).filter(|(_, t)| **t != 0xFF).map(|(i, t)| (tech::Technique::from_value(i as u8), TechLevel(*t + 1)) ).collect() }, config: CharacterConfig { raw_data: vec_to_array(other.config)