Browse Source

use ShipList::new

pbs
jake 5 years ago
parent
commit
ea1f59899d
  1. 17
      src/login/character.rs

17
src/login/character.rs

@ -212,16 +212,15 @@ impl<EG: EntityGateway> CharacterServerState<EG> {
fn send_ship_list(&mut self, _id: ClientId, _pkt: &Login) -> Result<Vec<SendCharacterPacket>, 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<Vec<SendCharacterPacket>, CharacterError> {

Loading…
Cancel
Save