Browse Source

Merge branch 'subcmd_3b' of jake/libpso into master

pull/3/head
jake 5 years ago
committed by Gogs
parent
commit
477db05b24
  1. 7
      src/packet/messages.rs

7
src/packet/messages.rs

@ -103,6 +103,10 @@ pub struct PhotonChairMove {
unknown1: u32,
}
#[pso_message(0x3B)]
pub struct Unknown3B {
}
#[derive(Debug, Clone, PartialEq)]
@ -121,6 +125,7 @@ pub enum GameMessage {
PhotonChairSit(PhotonChairSit),
PhotonChairTurn(PhotonChairTurn),
PhotonChairMove(PhotonChairMove),
Unknown3B(Unknown3B),
}
impl PSOPacketData for GameMessage {
@ -145,6 +150,7 @@ impl PSOPacketData for GameMessage {
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)?)),
Unknown3B::CMD => Ok(GameMessage::Unknown3B(Unknown3B::from_bytes(&mut cur)?)),
_ => Err(PacketParseError::UnknownMessage(byte[0],
{
let mut b = vec![0; len[0] as usize * 4];
@ -170,6 +176,7 @@ impl PSOPacketData for GameMessage {
GameMessage::PhotonChairSit(data) => data.as_bytes(),
GameMessage::PhotonChairTurn(data) => data.as_bytes(),
GameMessage::PhotonChairMove(data) => data.as_bytes(),
GameMessage::Unknown3B(data) => data.as_bytes(),
}
}
}

Loading…
Cancel
Save