Browse Source

set tech level correctly when reading from postgres

pull/127/head
jake 2 years ago
parent
commit
8157db4c69
  1. 2
      src/entity/gateway/postgres/models.rs

2
src/entity/gateway/postgres/models.rs

@ -244,7 +244,7 @@ impl From<PgCharacter> for CharacterEntity {
prop_y: other.prop_y, prop_y: other.prop_y,
}, },
techs: CharacterTechniques { 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 { config: CharacterConfig {
raw_data: vec_to_array(other.config) raw_data: vec_to_array(other.config)

Loading…
Cancel
Save