diff --git a/src/login/character.rs b/src/login/character.rs index 24b3fa8..5f36870 100644 --- a/src/login/character.rs +++ b/src/login/character.rs @@ -212,16 +212,15 @@ impl CharacterServerState { fn send_ship_list(&mut self, _id: ClientId, _pkt: &Login) -> Result, CharacterError> { Ok(vec![SendCharacterPacket::Timestamp(Timestamp::new(chrono::Utc::now())), - SendCharacterPacket::ShipList(ShipList { - ships: self.ships.iter().enumerate().map(|(i, s)| { - ShipListEntry { - menu: SHIP_MENU_ID, - item: i as u32, - flags: 0, - name: utf8_to_utf16_array!(s.name, 0x11) + SendCharacterPacket::ShipList(ShipList::new(self.ships.iter().enumerate().map(|(i, s)| { + ShipListEntry { + menu: SHIP_MENU_ID, + item: i as u32, + flags: 0, + name: utf8_to_utf16_array!(s.name, 0x11) } - }).collect() - })]) + }).collect())) + ]) } fn get_settings(&mut self, id: ClientId) -> Result, CharacterError> {