mirror of
https://github.com/redstrate/Kawari.git
synced 2025-04-19 22:36:49 +00:00
Read voice from CharaMake, send voice id in lobby
This commit is contained in:
parent
167273d704
commit
f9aefab7b7
3 changed files with 7 additions and 7 deletions
|
@ -5,7 +5,7 @@ use crate::common::CustomizeData;
|
|||
#[derive(Debug)]
|
||||
pub struct CharaMake {
|
||||
pub customize: CustomizeData,
|
||||
pub unk1: i32,
|
||||
pub voice_id: i32,
|
||||
pub guardian: i32,
|
||||
pub birth_month: i32, // TODO: wrong?
|
||||
pub birth_day: i32,
|
||||
|
@ -20,7 +20,7 @@ impl CharaMake {
|
|||
|
||||
Self {
|
||||
customize: CustomizeData::from_json(&content[0]),
|
||||
unk1: content[1].as_str().unwrap().parse::<i32>().unwrap(),
|
||||
voice_id: content[1].as_str().unwrap().parse::<i32>().unwrap(),
|
||||
guardian: content[2].as_str().unwrap().parse::<i32>().unwrap(),
|
||||
birth_month: content[3].as_str().unwrap().parse::<i32>().unwrap(),
|
||||
birth_day: content[4].as_str().unwrap().parse::<i32>().unwrap(),
|
||||
|
@ -32,7 +32,7 @@ impl CharaMake {
|
|||
pub fn to_json(&self) -> String {
|
||||
let content = json!([
|
||||
self.customize.to_json(),
|
||||
self.unk1.to_string(),
|
||||
self.voice_id.to_string(),
|
||||
self.guardian.to_string(),
|
||||
self.birth_month.to_string(),
|
||||
self.birth_day.to_string(),
|
||||
|
|
|
@ -40,7 +40,7 @@ pub struct ClientSelectData {
|
|||
pub remake_mode: RemakeMode, // TODO: upstream a comment about this to FFXIVClientStructs
|
||||
/// If above 0, then a message warns the user that they have X minutes left to remake their character.
|
||||
pub remake_minutes_remaining: i32,
|
||||
pub unk19: i32,
|
||||
pub voice_id: i32, // presumably
|
||||
pub unk20: i32,
|
||||
pub world_name: String,
|
||||
pub unk22: i32,
|
||||
|
@ -71,7 +71,7 @@ impl ClientSelectData {
|
|||
self.unk16.to_string(),
|
||||
(self.remake_mode as i32).to_string(),
|
||||
self.remake_minutes_remaining.to_string(),
|
||||
self.unk19.to_string(),
|
||||
self.voice_id.to_string(),
|
||||
self.unk20.to_string(),
|
||||
self.world_name,
|
||||
self.unk22.to_string(),
|
||||
|
|
|
@ -117,7 +117,7 @@ impl WorldDatabase {
|
|||
|
||||
let chara_make = CharaMake {
|
||||
customize,
|
||||
unk1: 73,
|
||||
voice_id: character.voice,
|
||||
guardian: character.guardian.value,
|
||||
birth_month: character.nameday.month,
|
||||
birth_day: character.nameday.day,
|
||||
|
@ -284,7 +284,7 @@ impl WorldDatabase {
|
|||
unk16: 0,
|
||||
remake_mode: RemakeMode::None,
|
||||
remake_minutes_remaining: 0,
|
||||
unk19: 0,
|
||||
voice_id: chara_make.voice_id,
|
||||
unk20: 0,
|
||||
world_name: String::new(),
|
||||
unk22: 0,
|
||||
|
|
Loading…
Add table
Reference in a new issue