mirror of
https://github.com/redstrate/Kawari.git
synced 2025-05-03 03:27:45 +00:00
Roll delete into a more general lobby action
This commit is contained in:
parent
c35a5448d1
commit
7613723151
2 changed files with 34 additions and 11 deletions
|
@ -51,11 +51,22 @@ async fn main() {
|
||||||
|
|
||||||
send_lobby_info(&mut write, &state, *sequence).await;
|
send_lobby_info(&mut write, &state, *sequence).await;
|
||||||
}
|
}
|
||||||
IPCStructData::RequestCharacterDelete { name } => {
|
IPCStructData::LobbyCharacterAction {
|
||||||
tracing::info!(
|
sequence,
|
||||||
"Client is requesting character named {name} to be deleted. Ignoring since it's not implemented yet."
|
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."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
_ => {
|
_ => {
|
||||||
panic!("The server is recieving a IPC response packet!")
|
panic!("The server is recieving a IPC response packet!")
|
||||||
}
|
}
|
||||||
|
|
24
src/ipc.rs
24
src/ipc.rs
|
@ -10,8 +10,8 @@ pub enum IPCOpCode {
|
||||||
RequestCharacterList = 0x3,
|
RequestCharacterList = 0x3,
|
||||||
/// Sent by the client after exchanging encryption information with the lobby server.
|
/// Sent by the client after exchanging encryption information with the lobby server.
|
||||||
ClientVersionInfo = 0x5,
|
ClientVersionInfo = 0x5,
|
||||||
/// Sent by the client when they request a character to be deleted.
|
/// Sent by the client when they request something about the character (e.g. deletion.)
|
||||||
RequestCharacterDelete = 0xB,
|
LobbyCharacterAction = 0xB,
|
||||||
/// Sent by the server to inform the client of their service accounts.
|
/// Sent by the server to inform the client of their service accounts.
|
||||||
LobbyServiceAccountList = 0xC,
|
LobbyServiceAccountList = 0xC,
|
||||||
/// Sent by the server to inform the client of their characters.
|
/// Sent by the server to inform the client of their characters.
|
||||||
|
@ -86,6 +86,14 @@ pub struct CharacterDetails {
|
||||||
pub unk2: [u8; 20],
|
pub unk2: [u8; 20],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[binrw]
|
||||||
|
#[brw(repr = u8)]
|
||||||
|
#[derive(Clone, PartialEq, Debug)]
|
||||||
|
pub enum LobbyCharacterAction {
|
||||||
|
Delete = 0x4,
|
||||||
|
Request = 0x15,
|
||||||
|
}
|
||||||
|
|
||||||
#[binrw]
|
#[binrw]
|
||||||
#[br(import(magic: &IPCOpCode))]
|
#[br(import(magic: &IPCOpCode))]
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
@ -112,9 +120,13 @@ pub enum IPCStructData {
|
||||||
sequence: u64,
|
sequence: u64,
|
||||||
// TODO: what is in here?
|
// TODO: what is in here?
|
||||||
},
|
},
|
||||||
#[br(pre_assert(*magic == IPCOpCode::RequestCharacterDelete))]
|
#[br(pre_assert(*magic == IPCOpCode::LobbyCharacterAction))]
|
||||||
RequestCharacterDelete {
|
LobbyCharacterAction {
|
||||||
#[brw(pad_before = 28)]
|
#[brw(pad_before = 16)]
|
||||||
|
sequence: u64,
|
||||||
|
#[brw(pad_before = 1)]
|
||||||
|
action: LobbyCharacterAction,
|
||||||
|
#[brw(pad_before = 2)]
|
||||||
#[bw(pad_size_to = 32)]
|
#[bw(pad_size_to = 32)]
|
||||||
#[br(count = 32)]
|
#[br(count = 32)]
|
||||||
#[br(map = read_string)]
|
#[br(map = read_string)]
|
||||||
|
@ -200,7 +212,7 @@ impl IPCSegment {
|
||||||
IPCStructData::LobbyServerList { .. } => 24 + (6 * 84),
|
IPCStructData::LobbyServerList { .. } => 24 + (6 * 84),
|
||||||
IPCStructData::LobbyRetainerList { .. } => 210,
|
IPCStructData::LobbyRetainerList { .. } => 210,
|
||||||
IPCStructData::LobbyCharacterList { .. } => 80 + (2 * 1184),
|
IPCStructData::LobbyCharacterList { .. } => 80 + (2 * 1184),
|
||||||
IPCStructData::RequestCharacterDelete { .. } => todo!(),
|
IPCStructData::LobbyCharacterAction { .. } => todo!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue