From 2b5e0a7a48cc485ad5a11ddc3b4eaf2b85d1a234 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Tue, 11 Mar 2025 21:31:52 -0400 Subject: [PATCH] Add more fields & actions for LobbyCharacterAction Thanks to TemporalStasis, again. --- src/bin/kawari-lobby.rs | 19 +++---------------- src/ipc.rs | 21 +++++++++++++++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/bin/kawari-lobby.rs b/src/bin/kawari-lobby.rs index 684c7a5..b87c516 100644 --- a/src/bin/kawari-lobby.rs +++ b/src/bin/kawari-lobby.rs @@ -62,22 +62,9 @@ async fn main() { send_lobby_info(&mut write, &mut state, *sequence).await; } - IPCStructData::LobbyCharacterAction { - sequence, - action, - name, - } => match &action { - kawari::ipc::LobbyCharacterAction::Delete => { - tracing::info!( - "Client is requesting character named {name} to be deleted. Ignoring since it's not implemented yet." - ); - } - kawari::ipc::LobbyCharacterAction::Request => { - tracing::info!( - "Client is requesting character data! Ignoring since it's not implemented yet." - ); - } - }, + IPCStructData::LobbyCharacterAction { .. } => tracing::info!( + "Client is doing a character-related action in the lobby, but we don't support any yet! Ignoring..." + ), IPCStructData::RequestEnterWorld { sequence, lookup_id, diff --git a/src/ipc.rs b/src/ipc.rs index aded2d2..b39fc02 100644 --- a/src/ipc.rs +++ b/src/ipc.rs @@ -112,7 +112,17 @@ pub struct CharacterDetails { #[brw(repr = u8)] #[derive(Clone, PartialEq, Debug)] pub enum LobbyCharacterAction { + ReserveName = 0x1, + Create = 0x2, + Rename = 0x3, Delete = 0x4, + Move = 0x5, + RemakeRetainer = 0x6, + RemakeChara = 0x7, + SettingsUploadBegin = 0x8, + SettingsUpload = 0xC, + WorldVisit = 0xE, + DataCenterToken = 0xF, Request = 0x15, } @@ -159,17 +169,20 @@ pub enum IPCStructData { }, #[br(pre_assert(*magic == IPCOpCode::LobbyCharacterAction))] LobbyCharacterAction { - #[brw(pad_before = 16)] - sequence: u64, - #[brw(pad_before = 1)] + request_number: u32, + unk1: u32, + character_id: u64, + #[br(pad_before = 8)] + character_index: u8, action: LobbyCharacterAction, - #[brw(pad_before = 2)] + world_id: u16, #[bw(pad_size_to = 32)] #[br(count = 32)] #[br(map = read_string)] #[bw(map = write_string)] name: String, // TODO: what else is in here? + // according to TemporalStatis, chara make data? (probably op specific) }, #[br(pre_assert(*magic == IPCOpCode::RequestEnterWorld))] RequestEnterWorld {