Browse Source

did I really forget this

pull/3/head
jake 5 years ago
parent
commit
500b02a225
  1. 9
      src/packet/messages.rs

9
src/packet/messages.rs

@ -152,6 +152,9 @@ pub enum GameMessage {
PhotonChairTurn(PhotonChairTurn), PhotonChairTurn(PhotonChairTurn),
PhotonChairMove(PhotonChairMove), PhotonChairMove(PhotonChairMove),
Unknown3B(Unknown3B), Unknown3B(Unknown3B),
RequestExp(RequestExp),
RequestItem(RequestItem),
KillMonster(KillMonster),
} }
impl PSOPacketData for GameMessage { impl PSOPacketData for GameMessage {
@ -177,6 +180,9 @@ impl PSOPacketData for GameMessage {
PhotonChairTurn::CMD => Ok(GameMessage::PhotonChairTurn(PhotonChairTurn::from_bytes(&mut cur)?)), PhotonChairTurn::CMD => Ok(GameMessage::PhotonChairTurn(PhotonChairTurn::from_bytes(&mut cur)?)),
PhotonChairMove::CMD => Ok(GameMessage::PhotonChairMove(PhotonChairMove::from_bytes(&mut cur)?)), PhotonChairMove::CMD => Ok(GameMessage::PhotonChairMove(PhotonChairMove::from_bytes(&mut cur)?)),
Unknown3B::CMD => Ok(GameMessage::Unknown3B(Unknown3B::from_bytes(&mut cur)?)), Unknown3B::CMD => Ok(GameMessage::Unknown3B(Unknown3B::from_bytes(&mut cur)?)),
RequestExp::CMD => Ok(GameMessage::RequestExp(RequestExp::from_bytes(&mut cur)?)),
RequestItem::CMD => Ok(GameMessage::RequestItem(RequestItem::from_bytes(&mut cur)?)),
KillMonster::CMD => Ok(GameMessage::KillMonster(KillMonster::from_bytes(&mut cur)?)),
_ => Err(PacketParseError::UnknownMessage(byte[0], _ => Err(PacketParseError::UnknownMessage(byte[0],
{ {
let mut b = vec![0; len[0] as usize * 4]; let mut b = vec![0; len[0] as usize * 4];
@ -203,6 +209,9 @@ impl PSOPacketData for GameMessage {
GameMessage::PhotonChairTurn(data) => data.as_bytes(), GameMessage::PhotonChairTurn(data) => data.as_bytes(),
GameMessage::PhotonChairMove(data) => data.as_bytes(), GameMessage::PhotonChairMove(data) => data.as_bytes(),
GameMessage::Unknown3B(data) => data.as_bytes(), GameMessage::Unknown3B(data) => data.as_bytes(),
GameMessage::RequestExp(data) => data.as_bytes(),
GameMessage::RequestItem(data) => data.as_bytes(),
GameMessage::KillMonster(data) => data.as_bytes(),
} }
} }
} }

Loading…
Cancel
Save