|
|
@ -317,11 +317,8 @@ impl<EG: EntityGateway> ShipServerState<EG> { |
|
|
|
}
|
|
|
|
|
|
|
|
fn player_chat(&mut self, id: ClientId, msg: &PlayerChat) -> Box<dyn Iterator<Item = (ClientId, SendShipPacket)>> {
|
|
|
|
let mut cmsg = PlayerChat::new(0, 0, String::new());
|
|
|
|
let client = self.clients.get_mut(&id).ok_or(ShipError::ClientNotFound(id)).unwrap();
|
|
|
|
cmsg.padding = 0x00010000;
|
|
|
|
cmsg.guildcard = client.user.guildcard.unwrap();
|
|
|
|
cmsg.message.push_str(msg.message.as_str());
|
|
|
|
let mut cmsg = PlayerChat::new(0x00010000, client.user.guildcard.unwrap(), msg.message.clone());
|
|
|
|
let mut mlen = (cmsg.message.len() * 2) + 0x12;
|
|
|
|
while mlen & 0x07 != 0 {
|
|
|
|
cmsg.message.push('\0');
|
|
|
|