Browse Source

and i oop braces

pbs
Andy Newjack 5 years ago
parent
commit
a83aa2d9df
  1. 4
      src/ship/ship.rs

4
src/ship/ship.rs

@ -71,12 +71,10 @@ impl RecvServerPacket for RecvShipPacket {
fn from_bytes(data: &[u8]) -> Result<RecvShipPacket, PacketParseError> {
match u16::from_le_bytes([data[2], data[3]]) {
0x93 => Ok(RecvShipPacket::Login(Login::from_bytes(data)?)),
0x10 => {
match data[0] {
0x10 => match data[0] {
16 => Ok(RecvShipPacket::MenuSelect(MenuSelect::from_bytes(data)?)),
48 => Ok(RecvShipPacket::RoomPasswordReq(RoomPasswordReq::from_bytes(data)?)),
_ => Err(PacketParseError::WrongPacketForServerType(u16::from_le_bytes([data[2], data[3]]), data.to_vec())),
}
},
0x61 => Ok(RecvShipPacket::CharData(CharData::from_bytes(data)?)),
0x60 => Ok(RecvShipPacket::Message(Message::from_bytes(data)?)),

Loading…
Cancel
Save