Browse Source

Merge pull request 'full char data packet' (#222) from fullchar into master

pbs
jake 4 years ago
parent
commit
e6dd3326d2
  1. 5
      src/ship/ship.rs

5
src/ship/ship.rs

@ -91,6 +91,7 @@ pub enum RecvShipPacket {
QuestFileRequest(QuestFileRequest),
QuestChunkAck(QuestChunkAck),
DoneLoadingQuest(DoneLoadingQuest),
FullCharacterData(Box<FullCharacterData>),
}
impl RecvServerPacket for RecvShipPacket {
@ -126,6 +127,7 @@ impl RecvServerPacket for RecvShipPacket {
0x84 => Ok(RecvShipPacket::LobbySelect(LobbySelect::from_bytes(data)?)),
0xA2 => Ok(RecvShipPacket::RequestQuestList(RequestQuestList::from_bytes(data)?)),
0xAC => Ok(RecvShipPacket::DoneLoadingQuest(DoneLoadingQuest::from_bytes(data)?)),
0xE7 => Ok(RecvShipPacket::FullCharacterData(Box::new(FullCharacterData::from_bytes(data)?))),
_ => Err(PacketParseError::WrongPacketForServerType(u16::from_le_bytes([data[2], data[3]]), data.to_vec()))
}
}
@ -556,6 +558,9 @@ impl<EG: EntityGateway> ServerState for ShipServerState<EG> {
RecvShipPacket::DoneLoadingQuest(_) => {
handler::quest::done_loading_quest(id, &mut self.clients, &self.client_location)?
},
RecvShipPacket::FullCharacterData(full_character_data) => {
Box::new(None.into_iter())
},
})
}

Loading…
Cancel
Save