room list request and response packets

This commit is contained in:
Andy Newjack 2020-03-18 01:32:05 -03:00
parent 3de5ce3c8f
commit 4b8eb80f1f

View File

@ -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<RoomList>,
}