From 303e53ca9f7c8b74d05070ccb5f796207a68bf14 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 9 Jan 2020 23:21:15 -0400 Subject: [PATCH] initial lobby chair packets and structs --- src/packet/messages.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/packet/messages.rs b/src/packet/messages.rs index 579e833..59c31c1 100644 --- a/src/packet/messages.rs +++ b/src/packet/messages.rs @@ -88,6 +88,21 @@ pub struct UnknownAE { unknown3: u32, } +#[pso_message(0xAB)] +pub struct PhotonChairSit { + unknown1: u32, +} + +#[pso_message(0xAF)] +pub struct PhotonChairTurn { + unknown1: u32, +} + +#[pso_message(0xB0)] +pub struct PhotonChairMove { + unknown1: u32, +} + #[derive(Debug, Clone, PartialEq)] @@ -103,6 +118,9 @@ pub enum GameMessage { LobbyEmote(LobbyEmote), TalkToNpc(TalkToNpc), UnknownAE(UnknownAE), + PhotonChairSit(PhotonChairSit), + PhotonChairTurn(PhotonChairTurn), + PhotonChairMove(PhotonChairMove), } impl PSOPacketData for GameMessage { @@ -124,6 +142,9 @@ impl PSOPacketData for GameMessage { LobbyEmote::CMD => Ok(GameMessage::LobbyEmote(LobbyEmote::from_bytes(&mut cur)?)), TalkToNpc::CMD => Ok(GameMessage::TalkToNpc(TalkToNpc::from_bytes(&mut cur)?)), UnknownAE::CMD => Ok(GameMessage::UnknownAE(UnknownAE::from_bytes(&mut cur)?)), + PhotonChairSit::CMD => Ok(GameMessage::PhotonChairSit(PhotonChairSit::from_bytes(&mut cur)?)), + PhotonChairTurn::CMD => Ok(GameMessage::PhotonChairTurn(PhotonChairTurn::from_bytes(&mut cur)?)), + PhotonChairMove::CMD => Ok(GameMessage::PhotonChairMove(PhotonChairMove::from_bytes(&mut cur)?)), _ => Err(PacketParseError::UnknownMessage(byte[0], { let mut b = vec![0; len[0] as usize * 4]; @@ -146,6 +167,9 @@ impl PSOPacketData for GameMessage { GameMessage::LobbyEmote(data) => data.as_bytes(), GameMessage::TalkToNpc(data) => data.as_bytes(), GameMessage::UnknownAE(data) => data.as_bytes(), + GameMessage::PhotonChairSit(data) => data.as_bytes(), + GameMessage::PhotonChairTurn(data) => data.as_bytes(), + GameMessage::PhotonChairMove(data) => data.as_bytes(), } } }