mirror of
https://github.com/redstrate/Kawari.git
synced 2025-04-24 08:07:45 +00:00
Add relevant remake fields to ClientSelectData
This documents a few fields interesting to Fantasia, such as the flag needed to enable the "Re-edit Character" menu item.
This commit is contained in:
parent
7495f88dd5
commit
3bd0d64aa7
3 changed files with 34 additions and 21 deletions
|
@ -2,6 +2,18 @@ use serde_json::json;
|
||||||
|
|
||||||
use crate::common::CustomizeData;
|
use crate::common::CustomizeData;
|
||||||
|
|
||||||
|
// TODO: this isn't really an enum in the game, nor is it a flag either. it's weird!
|
||||||
|
#[derive(Clone, Copy)]
|
||||||
|
#[repr(i32)]
|
||||||
|
pub enum RemakeMode {
|
||||||
|
/// No remake options are available.
|
||||||
|
None,
|
||||||
|
/// "You are granted one opportunity to edit your character's race, tribe, gender, appearance, and name."
|
||||||
|
EditAppearanceName = 1,
|
||||||
|
/// "If you wish, you can edit your character's race, sex, and appearance."
|
||||||
|
EditAppearance = 4,
|
||||||
|
}
|
||||||
|
|
||||||
/// See https://github.com/aers/FFXIVClientStructs/blob/main/FFXIVClientStructs/FFXIV/Application/Network/WorkDefinitions/ClientSelectData.cs
|
/// See https://github.com/aers/FFXIVClientStructs/blob/main/FFXIVClientStructs/FFXIV/Application/Network/WorkDefinitions/ClientSelectData.cs
|
||||||
pub struct ClientSelectData {
|
pub struct ClientSelectData {
|
||||||
pub game_name_unk: String,
|
pub game_name_unk: String,
|
||||||
|
@ -16,16 +28,18 @@ pub struct ClientSelectData {
|
||||||
pub unk8: i32,
|
pub unk8: i32,
|
||||||
pub unk9: i32,
|
pub unk9: i32,
|
||||||
pub zone_id: i32,
|
pub zone_id: i32,
|
||||||
pub unk11: i32,
|
/// Index into the ContentFinderCondition Excel sheet (presumably). But if != 0, then it does special things to the Lobby screen.
|
||||||
|
/// The most notable is if your character can be remade, it says "Your character is currently bound by duty..."
|
||||||
|
pub content_finder_condition: i32,
|
||||||
pub customize: CustomizeData,
|
pub customize: CustomizeData,
|
||||||
pub model_main_weapon: i32,
|
pub model_main_weapon: i32,
|
||||||
pub model_sub_weapon: i32,
|
pub model_sub_weapon: i32,
|
||||||
pub unk14: [i32; 10], // probably model ids
|
pub unk14: [i32; 10], // probably model ids
|
||||||
pub unk15: i32,
|
pub unk15: i32,
|
||||||
pub unk16: i32,
|
pub unk16: i32,
|
||||||
/// If set to 1, the user is granted one opportunity to edit their character and are prompted to re-choose their class.
|
pub remake_mode: RemakeMode, // TODO: upstream a comment about this to FFXIVClientStructs
|
||||||
pub legacy_character: i32,
|
/// If above 0, then a message warns the user that they have X minutes left to remake their character.
|
||||||
pub unk18: i32,
|
pub remake_minutes_remaining: i32,
|
||||||
pub unk19: i32,
|
pub unk19: i32,
|
||||||
pub unk20: i32,
|
pub unk20: i32,
|
||||||
pub world_name: String,
|
pub world_name: String,
|
||||||
|
@ -48,15 +62,15 @@ impl ClientSelectData {
|
||||||
self.unk8.to_string(),
|
self.unk8.to_string(),
|
||||||
self.unk9.to_string(),
|
self.unk9.to_string(),
|
||||||
self.zone_id.to_string(),
|
self.zone_id.to_string(),
|
||||||
self.unk11.to_string(),
|
self.content_finder_condition.to_string(),
|
||||||
self.customize.to_json(),
|
self.customize.to_json(),
|
||||||
self.model_main_weapon.to_string(),
|
self.model_main_weapon.to_string(),
|
||||||
self.model_sub_weapon.to_string(),
|
self.model_sub_weapon.to_string(),
|
||||||
self.unk14.map(|x| x.to_string()),
|
self.unk14.map(|x| x.to_string()),
|
||||||
self.unk15.to_string(),
|
self.unk15.to_string(),
|
||||||
self.unk16.to_string(),
|
self.unk16.to_string(),
|
||||||
self.legacy_character.to_string(),
|
(self.remake_mode as i32).to_string(),
|
||||||
self.unk18.to_string(),
|
self.remake_minutes_remaining.to_string(),
|
||||||
self.unk19.to_string(),
|
self.unk19.to_string(),
|
||||||
self.unk20.to_string(),
|
self.unk20.to_string(),
|
||||||
self.world_name,
|
self.world_name,
|
||||||
|
|
|
@ -2,7 +2,7 @@ mod chara_make;
|
||||||
pub use chara_make::CharaMake;
|
pub use chara_make::CharaMake;
|
||||||
|
|
||||||
mod client_select_data;
|
mod client_select_data;
|
||||||
pub use client_select_data::ClientSelectData;
|
pub use client_select_data::{ClientSelectData, RemakeMode};
|
||||||
|
|
||||||
mod connection;
|
mod connection;
|
||||||
pub use connection::{LobbyConnection, send_custom_world_packet};
|
pub use connection::{LobbyConnection, send_custom_world_packet};
|
||||||
|
|
|
@ -5,8 +5,7 @@ use rusqlite::Connection;
|
||||||
use crate::{
|
use crate::{
|
||||||
common::Position,
|
common::Position,
|
||||||
lobby::{
|
lobby::{
|
||||||
CharaMake, ClientSelectData,
|
ipc::{CharacterDetails, CharacterFlag}, CharaMake, ClientSelectData, RemakeMode
|
||||||
ipc::{CharacterDetails, CharacterFlag},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -173,23 +172,23 @@ impl WorldDatabase {
|
||||||
birth_month: chara_make.birth_month,
|
birth_month: chara_make.birth_month,
|
||||||
birth_day: chara_make.birth_day,
|
birth_day: chara_make.birth_day,
|
||||||
guardian: chara_make.guardian,
|
guardian: chara_make.guardian,
|
||||||
unk8: 255,
|
unk8: 0,
|
||||||
unk9: 255,
|
unk9: 0,
|
||||||
zone_id: zone_id as i32,
|
zone_id: zone_id as i32,
|
||||||
unk11: 255,
|
content_finder_condition: 0,
|
||||||
customize: chara_make.customize,
|
customize: chara_make.customize,
|
||||||
model_main_weapon: 0,
|
model_main_weapon: 0,
|
||||||
model_sub_weapon: 0,
|
model_sub_weapon: 0,
|
||||||
unk14: [0; 10],
|
unk14: [0; 10],
|
||||||
unk15: 255,
|
unk15: 0,
|
||||||
unk16: 2,
|
unk16: 0,
|
||||||
legacy_character: 2,
|
remake_mode: RemakeMode::None,
|
||||||
unk18: 255,
|
remake_minutes_remaining: 0,
|
||||||
unk19: 255,
|
unk19: 0,
|
||||||
unk20: 255,
|
unk20: 0,
|
||||||
world_name: String::new(),
|
world_name: String::new(),
|
||||||
unk22: 255,
|
unk22: 0,
|
||||||
unk23: 255,
|
unk23: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
characters.push(CharacterDetails {
|
characters.push(CharacterDetails {
|
||||||
|
|
Loading…
Add table
Reference in a new issue