mirror of
https://github.com/redstrate/Kawari.git
synced 2025-06-30 11:47:45 +00:00
More unknown IPC handling fixes
This commit is contained in:
parent
a3d32b67aa
commit
05f909497c
4 changed files with 19 additions and 3 deletions
|
@ -174,6 +174,7 @@ async fn main() {
|
||||||
.send_enter_world(*sequence, *content_id, our_actor_id)
|
.send_enter_world(*sequence, *content_id, our_actor_id)
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
_ => {}
|
||||||
},
|
},
|
||||||
SegmentData::KeepAliveRequest { id, timestamp } => {
|
SegmentData::KeepAliveRequest { id, timestamp } => {
|
||||||
send_keep_alive::<ServerLobbyIpcSegment>(
|
send_keep_alive::<ServerLobbyIpcSegment>(
|
||||||
|
|
|
@ -923,6 +923,7 @@ async fn client_loop(
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
_ => {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SegmentData::KeepAliveRequest { id, timestamp } => {
|
SegmentData::KeepAliveRequest { id, timestamp } => {
|
||||||
|
|
|
@ -36,9 +36,14 @@ impl Default for ServerChatIpcSegment {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[binrw]
|
#[binrw]
|
||||||
#[br(import(_magic: &ServerChatIpcType))]
|
#[br(import(magic: &ServerChatIpcType))]
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub enum ServerChatIpcData {
|
pub enum ServerChatIpcData {
|
||||||
/// Sent by the server to Initialize something chat-related?
|
/// Sent by the server to Initialize something chat-related?
|
||||||
LoginReply { timestamp: u32, sid: u32 },
|
#[br(pre_assert(*magic == ServerChatIpcType::LoginReply))]
|
||||||
|
LoginReply {
|
||||||
|
timestamp: u32,
|
||||||
|
sid: u32,
|
||||||
|
},
|
||||||
|
Unknown,
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,13 +127,15 @@ pub enum ClientLobbyIpcData {
|
||||||
/// Sent by the client when they request something about the character (e.g. deletion.)
|
/// Sent by the client when they request something about the character (e.g. deletion.)
|
||||||
#[br(pre_assert(*magic == ClientLobbyIpcType::CharaMake))]
|
#[br(pre_assert(*magic == ClientLobbyIpcType::CharaMake))]
|
||||||
CharaMake(CharaMake),
|
CharaMake(CharaMake),
|
||||||
|
Unknown,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[binrw]
|
#[binrw]
|
||||||
#[br(import(_magic: &ServerLobbyIpcType))]
|
#[br(import(magic: &ServerLobbyIpcType))]
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub enum ServerLobbyIpcData {
|
pub enum ServerLobbyIpcData {
|
||||||
/// Sent by the server to indicate an lobby error occured.
|
/// Sent by the server to indicate an lobby error occured.
|
||||||
|
#[br(pre_assert(*magic == ServerLobbyIpcType::NackReply))]
|
||||||
NackReply {
|
NackReply {
|
||||||
sequence: u64,
|
sequence: u64,
|
||||||
error: u32,
|
error: u32,
|
||||||
|
@ -143,10 +145,13 @@ pub enum ServerLobbyIpcData {
|
||||||
unk1: u16,
|
unk1: u16,
|
||||||
},
|
},
|
||||||
/// Sent by the server to inform the client of their service accounts.
|
/// Sent by the server to inform the client of their service accounts.
|
||||||
|
#[br(pre_assert(*magic == ServerLobbyIpcType::LoginReply))]
|
||||||
LoginReply(LoginReply),
|
LoginReply(LoginReply),
|
||||||
/// Sent by the server to inform the client of their characters.
|
/// Sent by the server to inform the client of their characters.
|
||||||
|
#[br(pre_assert(*magic == ServerLobbyIpcType::ServiceLoginReply))]
|
||||||
ServiceLoginReply(ServiceLoginReply),
|
ServiceLoginReply(ServiceLoginReply),
|
||||||
// Assumed what this is, but probably incorrect
|
// Assumed what this is, but probably incorrect
|
||||||
|
#[br(pre_assert(*magic == ServerLobbyIpcType::CharaMakeReply))]
|
||||||
CharaMakeReply {
|
CharaMakeReply {
|
||||||
sequence: u64,
|
sequence: u64,
|
||||||
unk1: u8,
|
unk1: u8,
|
||||||
|
@ -158,6 +163,7 @@ pub enum ServerLobbyIpcData {
|
||||||
details: CharacterDetails,
|
details: CharacterDetails,
|
||||||
},
|
},
|
||||||
/// Sent by the server to tell the client how to connect to the world server.
|
/// Sent by the server to tell the client how to connect to the world server.
|
||||||
|
#[br(pre_assert(*magic == ServerLobbyIpcType::GameLoginReply))]
|
||||||
GameLoginReply {
|
GameLoginReply {
|
||||||
sequence: u64,
|
sequence: u64,
|
||||||
actor_id: u32,
|
actor_id: u32,
|
||||||
|
@ -178,14 +184,17 @@ pub enum ServerLobbyIpcData {
|
||||||
host: String,
|
host: String,
|
||||||
},
|
},
|
||||||
/// Sent by the server to inform the client of their servers.
|
/// Sent by the server to inform the client of their servers.
|
||||||
|
#[br(pre_assert(*magic == ServerLobbyIpcType::DistWorldInfo))]
|
||||||
DistWorldInfo(DistWorldInfo),
|
DistWorldInfo(DistWorldInfo),
|
||||||
/// Sent by the server to inform the client of their retainers.
|
/// Sent by the server to inform the client of their retainers.
|
||||||
|
#[br(pre_assert(*magic == ServerLobbyIpcType::DistRetainerInfo))]
|
||||||
DistRetainerInfo {
|
DistRetainerInfo {
|
||||||
// TODO: what is in here?
|
// TODO: what is in here?
|
||||||
#[brw(pad_before = 7)]
|
#[brw(pad_before = 7)]
|
||||||
#[brw(pad_after = 202)]
|
#[brw(pad_after = 202)]
|
||||||
unk1: u8,
|
unk1: u8,
|
||||||
},
|
},
|
||||||
|
Unknown,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
Loading…
Add table
Reference in a new issue