mirror of
https://github.com/redstrate/Kawari.git
synced 2025-04-19 22:36:49 +00:00
Extract new data from Auracite
Now your character's nameday, city-state, guardian and voice is transferred over. There seems to be a problem with the nameday month, not sure who is wrong yet.
This commit is contained in:
parent
df1d0b2629
commit
19b84f4164
2 changed files with 20 additions and 6 deletions
|
@ -7,7 +7,7 @@ pub struct CharaMake {
|
|||
pub customize: CustomizeData,
|
||||
pub unk1: i32,
|
||||
pub guardian: i32,
|
||||
pub birth_month: i32,
|
||||
pub birth_month: i32, // TODO: wrong?
|
||||
pub birth_day: i32,
|
||||
pub classjob_id: i32,
|
||||
pub unk2: i32,
|
||||
|
|
|
@ -74,9 +74,24 @@ impl WorldDatabase {
|
|||
|
||||
let mut archive = zip::ZipArchive::new(file).unwrap();
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct GenericValue {
|
||||
value: i32,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct NamedayValue {
|
||||
day: i32,
|
||||
month: i32,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct CharacterJson {
|
||||
name: String,
|
||||
city_state: GenericValue,
|
||||
nameday: NamedayValue,
|
||||
guardian: GenericValue,
|
||||
voice: i32,
|
||||
}
|
||||
|
||||
let character: CharacterJson;
|
||||
|
@ -103,19 +118,18 @@ impl WorldDatabase {
|
|||
let chara_make = CharaMake {
|
||||
customize,
|
||||
unk1: 73,
|
||||
guardian: 1, // TODO: extract these as well
|
||||
birth_month: 1,
|
||||
birth_day: 1,
|
||||
guardian: character.guardian.value,
|
||||
birth_month: character.nameday.month,
|
||||
birth_day: character.nameday.day,
|
||||
classjob_id: 5,
|
||||
unk2: 1,
|
||||
};
|
||||
|
||||
// TODO: extract city-state
|
||||
// TODO: import inventory
|
||||
self.create_player_data(
|
||||
&character.name,
|
||||
&chara_make.to_json(),
|
||||
2,
|
||||
character.city_state.value as u8,
|
||||
132,
|
||||
Inventory::default(),
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue