mirror of
https://github.com/redstrate/Kawari.git
synced 2025-04-23 07:37:46 +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
12
src/ipc.rs
12
src/ipc.rs
|
@ -13,7 +13,7 @@ pub enum IPCOpCode {
|
|||
}
|
||||
|
||||
#[binrw]
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct ServiceAccount {
|
||||
pub id: u32,
|
||||
pub unk1: u32,
|
||||
|
@ -49,7 +49,7 @@ pub enum IPCStructData {
|
|||
// Server->Client IPC
|
||||
LobbyServiceAccountList {
|
||||
sequence: u64,
|
||||
#[brw(pad_before = 4)]
|
||||
#[brw(pad_before = 1)]
|
||||
num_service_accounts: u8,
|
||||
unk1: u8,
|
||||
#[brw(pad_after = 4)]
|
||||
|
@ -77,9 +77,9 @@ impl IPCSegment {
|
|||
pub fn calc_size(&self) -> u32 {
|
||||
let header = 16;
|
||||
header
|
||||
+ match self.data {
|
||||
IPCStructData::ClientVersionInfo { .. } => todo!(),
|
||||
IPCStructData::LobbyServiceAccountList { .. } => 19,
|
||||
}
|
||||
+ match self.data {
|
||||
IPCStructData::ClientVersionInfo { .. } => todo!(),
|
||||
IPCStructData::LobbyServiceAccountList { .. } => 24 + (8 * 80),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -231,12 +231,14 @@ pub async fn parse_packet(socket: &mut WriteHalf<TcpStream>, data: &[u8], state:
|
|||
.unwrap();
|
||||
|
||||
// send the client the service account list
|
||||
let service_accounts = [ServiceAccount {
|
||||
let mut service_accounts = [ServiceAccount {
|
||||
id: 0x002E4A2B,
|
||||
unk1: 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 {
|
||||
sequence: 0,
|
||||
|
|
Loading…
Add table
Reference in a new issue