mirror of
https://github.com/redstrate/Kawari.git
synced 2025-04-23 15:47:45 +00:00
Fix various issues with sending service account data
I did a bunch of things wrong, oops. The client somehow error corrected itself into never requesting the character list, lol
This commit is contained in:
parent
da5f5f1276
commit
00c5f4a10e
2 changed files with 11 additions and 9 deletions
|
@ -13,7 +13,7 @@ pub enum IPCOpCode {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[binrw]
|
#[binrw]
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct ServiceAccount {
|
pub struct ServiceAccount {
|
||||||
pub id: u32,
|
pub id: u32,
|
||||||
pub unk1: u32,
|
pub unk1: u32,
|
||||||
|
@ -49,7 +49,7 @@ pub enum IPCStructData {
|
||||||
// Server->Client IPC
|
// Server->Client IPC
|
||||||
LobbyServiceAccountList {
|
LobbyServiceAccountList {
|
||||||
sequence: u64,
|
sequence: u64,
|
||||||
#[brw(pad_before = 4)]
|
#[brw(pad_before = 1)]
|
||||||
num_service_accounts: u8,
|
num_service_accounts: u8,
|
||||||
unk1: u8,
|
unk1: u8,
|
||||||
#[brw(pad_after = 4)]
|
#[brw(pad_after = 4)]
|
||||||
|
@ -79,7 +79,7 @@ impl IPCSegment {
|
||||||
header
|
header
|
||||||
+ match self.data {
|
+ match self.data {
|
||||||
IPCStructData::ClientVersionInfo { .. } => todo!(),
|
IPCStructData::ClientVersionInfo { .. } => todo!(),
|
||||||
IPCStructData::LobbyServiceAccountList { .. } => 19,
|
IPCStructData::LobbyServiceAccountList { .. } => 24 + (8 * 80),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,12 +231,14 @@ pub async fn parse_packet(socket: &mut WriteHalf<TcpStream>, data: &[u8], state:
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// send the client the service account list
|
// send the client the service account list
|
||||||
let service_accounts = [ServiceAccount {
|
let mut service_accounts = [ServiceAccount {
|
||||||
id: 0x002E4A2B,
|
id: 0x002E4A2B,
|
||||||
unk1: 0,
|
unk1: 0,
|
||||||
index: 0,
|
index: 0,
|
||||||
name: "Test Service Account".to_string(),
|
name: "FINAL FANTASY XIV".to_string(),
|
||||||
}];
|
}].to_vec();
|
||||||
|
// add any empty boys
|
||||||
|
service_accounts.resize(8, ServiceAccount::default());
|
||||||
|
|
||||||
let service_account_list = IPCStructData::LobbyServiceAccountList {
|
let service_account_list = IPCStructData::LobbyServiceAccountList {
|
||||||
sequence: 0,
|
sequence: 0,
|
||||||
|
|
Loading…
Add table
Reference in a new issue