Browse Source

room list request and response packets

pull/3/head
Andy Newjack 5 years ago
parent
commit
4b8eb80f1f
  1. 31
      src/packet/ship.rs

31
src/packet/ship.rs

@ -8,6 +8,7 @@ use crate::character::character as character;
use std::io::Read; use std::io::Read;
const BLOCK_MENU_ID: u32 = 1; const BLOCK_MENU_ID: u32 = 1;
pub const ROOM_MENU_ID: u32 = 2;
#[pso_packet(0x03)] #[pso_packet(0x03)]
pub struct ShipWelcome { pub struct ShipWelcome {
@ -336,3 +337,33 @@ pub struct ViewInfoboardResponse {
pub struct WriteInfoboard { pub struct WriteInfoboard {
pub message: String, 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>,
}
Loading…
Cancel
Save