diff --git a/src/ipc/chat/mod.rs b/src/ipc/chat/mod.rs index f4c7369..6828e81 100644 --- a/src/ipc/chat/mod.rs +++ b/src/ipc/chat/mod.rs @@ -36,14 +36,14 @@ impl Default for ServerChatIpcSegment { } #[binrw] -#[br(import(magic: &ServerChatIpcType, _size: &u32))] +#[br(import(magic: &ServerChatIpcType, size: &u32))] #[derive(Debug, Clone)] pub enum ServerChatIpcData { /// Sent by the server to Initialize something chat-related? #[br(pre_assert(*magic == ServerChatIpcType::LoginReply))] - LoginReply { - timestamp: u32, - sid: u32, + LoginReply { timestamp: u32, sid: u32 }, + Unknown { + #[br(count = size - 32)] + unk: Vec, }, - Unknown, } diff --git a/src/ipc/lobby/mod.rs b/src/ipc/lobby/mod.rs index 0d5640d..bf16b7d 100644 --- a/src/ipc/lobby/mod.rs +++ b/src/ipc/lobby/mod.rs @@ -83,7 +83,7 @@ impl Default for ServerLobbyIpcSegment { } #[binrw] -#[br(import(magic: &ClientLobbyIpcType, _size: &u32))] +#[br(import(magic: &ClientLobbyIpcType, size: &u32))] #[derive(Debug, Clone)] pub enum ClientLobbyIpcData { /// Sent by the client when it requests the character list in the lobby. @@ -127,11 +127,14 @@ pub enum ClientLobbyIpcData { /// Sent by the client when they request something about the character (e.g. deletion.) #[br(pre_assert(*magic == ClientLobbyIpcType::CharaMake))] CharaMake(CharaMake), - Unknown, + Unknown { + #[br(count = size - 32)] + unk: Vec, + }, } #[binrw] -#[br(import(magic: &ServerLobbyIpcType, _size: &u32))] +#[br(import(magic: &ServerLobbyIpcType, size: &u32))] #[derive(Debug, Clone)] pub enum ServerLobbyIpcData { /// Sent by the server to indicate an lobby error occured. @@ -194,7 +197,10 @@ pub enum ServerLobbyIpcData { #[brw(pad_after = 202)] unk1: u8, }, - Unknown, + Unknown { + #[br(count = size - 32)] + unk: Vec, + }, } #[cfg(test)] diff --git a/src/ipc/zone/mod.rs b/src/ipc/zone/mod.rs index 114f6f6..cf3e77b 100644 --- a/src/ipc/zone/mod.rs +++ b/src/ipc/zone/mod.rs @@ -149,7 +149,7 @@ impl Default for ServerZoneIpcSegment { } #[binrw] -#[br(import(magic: &ServerZoneIpcType, _size: &u32))] +#[br(import(magic: &ServerZoneIpcType, size: &u32))] #[derive(Debug, Clone)] pub enum ServerZoneIpcData { /// Sent by the server as response to ZoneInitRequest. @@ -211,14 +211,10 @@ pub enum ServerZoneIpcData { }, /// Unknown, but seems to contain information on cross-world linkshells #[br(pre_assert(*magic == ServerZoneIpcType::LinkShellInformation))] - LinkShellInformation { - unk: [u8; 456], - }, + LinkShellInformation { unk: [u8; 456] }, /// Sent by the server when it wants the client to... prepare to zone? #[br(pre_assert(*magic == ServerZoneIpcType::PrepareZoning))] - PrepareZoning { - unk: [u32; 4], - }, + PrepareZoning { unk: [u32; 4] }, /// Sent by the server #[br(pre_assert(*magic == ServerZoneIpcType::ActorControl))] ActorControl(ActorControl), @@ -308,7 +304,10 @@ pub enum ServerZoneIpcData { #[brw(pad_after = 26)] unk2: u16, }, - Unknown, + Unknown { + #[br(count = size - 32)] + unk: Vec, + }, } #[binrw]