mirror of
https://github.com/redstrate/Kawari.git
synced 2025-05-06 04:37:46 +00:00
Use more accurate names for some client lobby packet types
This commit is contained in:
parent
6971ef1fc8
commit
2ec54fa6ec
4 changed files with 15 additions and 15 deletions
|
@ -312,17 +312,17 @@
|
|||
],
|
||||
"ClientLobbyIpcType": [
|
||||
{
|
||||
"name": "RequestCharacterList",
|
||||
"name": "ServiceLogin",
|
||||
"opcode": 3,
|
||||
"size": 24
|
||||
},
|
||||
{
|
||||
"name": "RequestEnterWorld",
|
||||
"name": "GameLogin",
|
||||
"opcode": 4,
|
||||
"size": 32
|
||||
},
|
||||
{
|
||||
"name": "ClientVersionInfo",
|
||||
"name": "LoginEx",
|
||||
"opcode": 5,
|
||||
"size": 1144
|
||||
},
|
||||
|
|
|
@ -65,7 +65,7 @@ async fn main() {
|
|||
connection.initialize_encryption(phrase, key).await
|
||||
}
|
||||
SegmentType::Ipc { data } => match &data.data {
|
||||
ClientLobbyIpcData::ClientVersionInfo {
|
||||
ClientLobbyIpcData::LoginEx {
|
||||
sequence,
|
||||
session_id,
|
||||
version_info,
|
||||
|
@ -98,7 +98,7 @@ async fn main() {
|
|||
connection.send_error(*sequence, 1012, 13101).await;
|
||||
}
|
||||
}
|
||||
ClientLobbyIpcData::RequestCharacterList { sequence } => {
|
||||
ClientLobbyIpcData::ServiceLogin { sequence } => {
|
||||
// TODO: support selecting a service account
|
||||
connection.selected_service_account =
|
||||
Some(connection.service_accounts[0].id);
|
||||
|
@ -112,7 +112,7 @@ async fn main() {
|
|||
|
||||
connection.send_account_list().await;
|
||||
}
|
||||
ClientLobbyIpcData::RequestEnterWorld {
|
||||
ClientLobbyIpcData::GameLogin {
|
||||
sequence,
|
||||
content_id,
|
||||
} => {
|
||||
|
|
|
@ -35,10 +35,10 @@ impl Default for ClientLobbyIpcSegment {
|
|||
Self {
|
||||
unk1: 0x14,
|
||||
unk2: 0,
|
||||
op_code: ClientLobbyIpcType::ClientVersionInfo,
|
||||
op_code: ClientLobbyIpcType::LoginEx,
|
||||
server_id: 0,
|
||||
timestamp: 0,
|
||||
data: ClientLobbyIpcData::ClientVersionInfo {
|
||||
data: ClientLobbyIpcData::LoginEx {
|
||||
sequence: 0,
|
||||
session_id: String::new(),
|
||||
version_info: String::new(),
|
||||
|
@ -81,8 +81,8 @@ impl Default for ServerLobbyIpcSegment {
|
|||
#[derive(Debug, Clone)]
|
||||
pub enum ClientLobbyIpcData {
|
||||
/// Sent by the client after exchanging encryption information with the lobby server.
|
||||
#[br(pre_assert(*magic == ClientLobbyIpcType::ClientVersionInfo))]
|
||||
ClientVersionInfo {
|
||||
#[br(pre_assert(*magic == ClientLobbyIpcType::LoginEx))]
|
||||
LoginEx {
|
||||
sequence: u64,
|
||||
|
||||
#[brw(pad_before = 10)] // full of nonsense i don't understand yet
|
||||
|
@ -99,8 +99,8 @@ pub enum ClientLobbyIpcData {
|
|||
// unknown stuff at the end, it's not completely empty
|
||||
},
|
||||
/// Sent by the client when it requests the character list in the lobby.
|
||||
#[br(pre_assert(*magic == ClientLobbyIpcType::RequestCharacterList))]
|
||||
RequestCharacterList {
|
||||
#[br(pre_assert(*magic == ClientLobbyIpcType::ServiceLogin))]
|
||||
ServiceLogin {
|
||||
#[brw(pad_before = 16)]
|
||||
sequence: u64,
|
||||
// TODO: what is in here?
|
||||
|
@ -109,8 +109,8 @@ pub enum ClientLobbyIpcData {
|
|||
#[br(pre_assert(*magic == ClientLobbyIpcType::LobbyCharacterAction))]
|
||||
LobbyCharacterAction(LobbyCharacterAction),
|
||||
/// Sent by the client when it requests to enter a world.
|
||||
#[br(pre_assert(*magic == ClientLobbyIpcType::RequestEnterWorld))]
|
||||
RequestEnterWorld {
|
||||
#[br(pre_assert(*magic == ClientLobbyIpcType::GameLogin))]
|
||||
GameLogin {
|
||||
sequence: u64,
|
||||
content_id: u64,
|
||||
// TODO: what else is in here?
|
||||
|
|
|
@ -157,7 +157,7 @@ pub async fn send_packet<T: ReadWriteIpcSegment>(
|
|||
size: size as u32,
|
||||
connection_type,
|
||||
segment_count: segments.len() as u16,
|
||||
unk3: 0,
|
||||
version: 0,
|
||||
compression_type,
|
||||
unk4: 0,
|
||||
uncompressed_size: uncompressed_size as u32,
|
||||
|
|
Loading…
Add table
Reference in a new issue