adding subcommand 0x3b. maybe it fixes the missing first packet on room create???

This commit is contained in:
andy 2020-01-15 01:05:03 -04:00
parent 2dbb662274
commit ab7a6b6a6c

View File

@ -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(),
}
}
}