From 2a6c9ee76ce4a8b7e647e1bd954bdb69d3fe4eec Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Tue, 22 Apr 2025 18:15:13 -0400 Subject: [PATCH] Add support for Shanda (Chinese) logins to the lobby server This only means logging into the lobby server works, trying to login to a World doesn't work as even the current version is too old. It probably won't work without modifications anyway. --- resources/opcodes.json | 5 +++++ src/bin/kawari-lobby.rs | 5 +++++ src/lobby/ipc/mod.rs | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/resources/opcodes.json b/resources/opcodes.json index 720cd27..8df8354 100644 --- a/resources/opcodes.json +++ b/resources/opcodes.json @@ -330,6 +330,11 @@ "name": "LobbyCharacterAction", "opcode": 11, "size": 496 + }, + { + "name": "ShandaLogin", + "opcode": 6, + "size": 1456 } ] } diff --git a/src/bin/kawari-lobby.rs b/src/bin/kawari-lobby.rs index f7f9d1b..bb80c6c 100644 --- a/src/bin/kawari-lobby.rs +++ b/src/bin/kawari-lobby.rs @@ -107,6 +107,11 @@ async fn main() { ClientLobbyIpcData::LobbyCharacterAction(character_action) => { connection.handle_character_action(character_action).await } + ClientLobbyIpcData::ShandaLogin { unk } => { + dbg!(unk); + + connection.send_account_list().await; + } ClientLobbyIpcData::RequestEnterWorld { sequence, content_id, diff --git a/src/lobby/ipc/mod.rs b/src/lobby/ipc/mod.rs index 98dd2cf..8284581 100644 --- a/src/lobby/ipc/mod.rs +++ b/src/lobby/ipc/mod.rs @@ -115,6 +115,12 @@ pub enum ClientLobbyIpcData { content_id: u64, // TODO: what else is in here? }, + #[br(pre_assert(*magic == ClientLobbyIpcType::ShandaLogin))] + ShandaLogin { + #[bw(pad_size_to = 1456)] + #[br(count = 1456)] + unk: Vec, + }, } #[binrw]