From 73f0108d683948bbbf5c3fec293bc46f6e2fff80 Mon Sep 17 00:00:00 2001 From: andy Date: Sat, 14 Nov 2020 21:22:44 -0400 Subject: [PATCH] save options to db --- src/entity/gateway/postgres/postgres.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/entity/gateway/postgres/postgres.rs b/src/entity/gateway/postgres/postgres.rs index 0add18b..9b41d15 100644 --- a/src/entity/gateway/postgres/postgres.rs +++ b/src/entity/gateway/postgres/postgres.rs @@ -225,8 +225,8 @@ impl EntityGateway for PostgresGateway { let q = r#"update player_character set user_account=$1, slot=$2, name=$3, exp=$4, class=$5, section_id=$6, costume=$7, skin=$8, face=$9, head=$10, hair=$11, hair_r=$12, hair_g=$13, hair_b=$14, prop_x=$15, prop_y=$16, techs=$17, config=$18, infoboard=$19, guildcard=$20, power=$21, mind=$22, def=$23, - evade=$24, luck=$25, hp=$26, tp=$27, tech_menu=$28, meseta=$29, bank_meseta=$30 - where id=$31;"#; + evade=$24, luck=$25, hp=$26, tp=$27, tech_menu=$28, meseta=$29, bank_meseta=$30, option_flags=$31 + where id=$32;"#; sqlx::query(q) .bind(char.user_id.0) .bind(char.slot as i16) @@ -258,6 +258,7 @@ impl EntityGateway for PostgresGateway { .bind(char.tech_menu.tech_menu.to_vec()) .bind(char.meseta as i32) .bind(char.bank_meseta as i32) + .bind(char.option_flags as i32) .bind(char.id.0 as i32) .execute(&self.pool).await?; Ok(())