From 0d132642b15887cba0319450cf7cf8bf9be84c34 Mon Sep 17 00:00:00 2001 From: jake Date: Mon, 23 Dec 2019 13:14:33 -0800 Subject: [PATCH] room join packets --- src/packet/ship.rs | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/src/packet/ship.rs b/src/packet/ship.rs index c5c9cfb..f89bc66 100644 --- a/src/packet/ship.rs +++ b/src/packet/ship.rs @@ -178,3 +178,73 @@ pub struct AddToLobby { pub padding: u32, pub playerinfo: PlayerInfo, } + + + +#[pso_packet(0xC1)] +pub struct CreateRoom { + unknown: [u32; 2], + name: [u16; 16], + password: [u16; 16], + difficulty: u8, + battle: u8, + challenge: u8, + episode: u8, + single_player: u8, + padding: [u8; 3], +} + + +#[pso_packet(0x01)] +pub struct SmallDialog { + msg: String, +} + +impl SmallDialog { + pub fn new(msg: String) -> SmallDialog { + SmallDialog { + msg: msg, + } + } +} + +#[pso_packet(0x64, manual_flag)] +pub struct JoinRoom { + flag: u32, // # of elements in players + maps: [u32; 0x20], + players: [PlayerHeader; 4], + client_id: u8, + leader_id: u8, + one: u8, + difficulty: u8, // TODO: enum + battle: u8, + event: u8, + section: u8, + challenge: u8, + random_seed: u32, + episode: u8, + one2: u8, + single_player: u8, + unknown: u8, +} + +impl JoinRoom { + /*fn new() -> JoinRoom { + JoinRoom { + + } + }*/ +} + +#[pso_packet(0x65, manual_flag)] +pub struct AddToRoom { + flag: u32, + pub client: u8, + pub leader: u8, + pub one: u8, + pub lobby: u8, + pub block: u16, + pub event: u16, + pub padding: u32, + pub playerinfo: PlayerInfo, +}