mirror of
https://github.com/redstrate/Kawari.git
synced 2025-04-20 14:47:45 +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 customize: CustomizeData,
|
||||||
pub unk1: i32,
|
pub unk1: i32,
|
||||||
pub guardian: i32,
|
pub guardian: i32,
|
||||||
pub birth_month: i32,
|
pub birth_month: i32, // TODO: wrong?
|
||||||
pub birth_day: i32,
|
pub birth_day: i32,
|
||||||
pub classjob_id: i32,
|
pub classjob_id: i32,
|
||||||
pub unk2: i32,
|
pub unk2: i32,
|
||||||
|
|
|
@ -74,9 +74,24 @@ impl WorldDatabase {
|
||||||
|
|
||||||
let mut archive = zip::ZipArchive::new(file).unwrap();
|
let mut archive = zip::ZipArchive::new(file).unwrap();
|
||||||
|
|
||||||
|
#[derive(Deserialize)]
|
||||||
|
struct GenericValue {
|
||||||
|
value: i32,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Deserialize)]
|
||||||
|
struct NamedayValue {
|
||||||
|
day: i32,
|
||||||
|
month: i32,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
struct CharacterJson {
|
struct CharacterJson {
|
||||||
name: String,
|
name: String,
|
||||||
|
city_state: GenericValue,
|
||||||
|
nameday: NamedayValue,
|
||||||
|
guardian: GenericValue,
|
||||||
|
voice: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
let character: CharacterJson;
|
let character: CharacterJson;
|
||||||
|
@ -103,19 +118,18 @@ impl WorldDatabase {
|
||||||
let chara_make = CharaMake {
|
let chara_make = CharaMake {
|
||||||
customize,
|
customize,
|
||||||
unk1: 73,
|
unk1: 73,
|
||||||
guardian: 1, // TODO: extract these as well
|
guardian: character.guardian.value,
|
||||||
birth_month: 1,
|
birth_month: character.nameday.month,
|
||||||
birth_day: 1,
|
birth_day: character.nameday.day,
|
||||||
classjob_id: 5,
|
classjob_id: 5,
|
||||||
unk2: 1,
|
unk2: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: extract city-state
|
|
||||||
// TODO: import inventory
|
// TODO: import inventory
|
||||||
self.create_player_data(
|
self.create_player_data(
|
||||||
&character.name,
|
&character.name,
|
||||||
&chara_make.to_json(),
|
&chara_make.to_json(),
|
||||||
2,
|
character.city_state.value as u8,
|
||||||
132,
|
132,
|
||||||
Inventory::default(),
|
Inventory::default(),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue