From 4b8eb80f1f978ce55b18eda7c67760c412aa6c2c Mon Sep 17 00:00:00 2001 From: Andy Newjack Date: Wed, 18 Mar 2020 01:32:05 -0300 Subject: [PATCH] room list request and response packets --- src/packet/ship.rs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/packet/ship.rs b/src/packet/ship.rs index acd1ae5..088f30b 100644 --- a/src/packet/ship.rs +++ b/src/packet/ship.rs @@ -8,6 +8,7 @@ use crate::character::character as character; use std::io::Read; const BLOCK_MENU_ID: u32 = 1; +pub const ROOM_MENU_ID: u32 = 2; #[pso_packet(0x03)] pub struct ShipWelcome { @@ -336,3 +337,33 @@ pub struct ViewInfoboardResponse { pub struct WriteInfoboard { pub message: String, } + +#[pso_packet(0x08)] +pub struct RoomListRequest { + +} + +#[derive(PSOPacketData, Clone)] +pub struct BaseRoom { + pub menu_id: u32, + pub title_id: u32, + pub zero: u16, + pub menu_title: [u16; 17], +} + +#[derive(PSOPacketData, Clone)] +pub struct RoomList { + pub menu_id: u32, + pub item_id: u32, + pub difficulty: u8, + pub players: u8, + pub name: [u16; 16], + pub episode: u8, + pub flags: u8, +} + +#[pso_packet(0x08)] +pub struct RoomListResponse { + pub baseroom: BaseRoom, + pub rooms: Vec, +}