- update: default skills are set by the character service, not the database service

This commit is contained in:
2025-03-09 18:39:19 -04:00
parent 14c6aa485a
commit d583ca1228
4 changed files with 33 additions and 8 deletions

View File

@@ -12,6 +12,11 @@ pub struct CharacterDbClient {
client: CharacterDbServiceClient<Channel>,
}
#[derive(Debug, Deserialize, Serialize)]
struct Skill {
id: i32,
}
#[derive(Debug, Deserialize, Serialize)]
struct Item {
item_id: i32,
@@ -155,6 +160,24 @@ impl CharacterDbClient {
},
];
let skills = vec![
Skill { id: 11 },
Skill { id: 12 },
Skill { id: 16 },
Skill { id: 19 },
Skill { id: 20 },
Skill { id: 21 },
Skill { id: 26 },
Skill { id: 41 },
Skill { id: 42 },
Skill { id: 43 },
Skill { id: 46 },
Skill { id: 47 },
Skill { id: 48 },
Skill { id: 49 },
Skill { id: 60 },
];
let stats = Stats {
job: 0,
str: 10,
@@ -197,6 +220,7 @@ impl CharacterDbClient {
user_id: user_id.parse().unwrap(),
name: name.to_string(),
inventory: serde_json::to_value(inventory)?.to_string(),
skills: serde_json::to_value(skills)?.to_string(),
stats: serde_json::to_value(stats)?.to_string(),
looks: serde_json::to_value(looks)?.to_string(),
position: serde_json::to_value(position)?.to_string(),