|
@ -101,6 +101,7 @@ pub struct ShipServerState<EG: EntityGateway> { |
|
|
clients: HashMap<ClientId, ClientState>,
|
|
|
clients: HashMap<ClientId, ClientState>,
|
|
|
client_location: ClientLocation,
|
|
|
client_location: ClientLocation,
|
|
|
level_table: CharacterLevelTable,
|
|
|
level_table: CharacterLevelTable,
|
|
|
|
|
|
name: String,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
impl<EG: EntityGateway> ShipServerState<EG> {
|
|
|
impl<EG: EntityGateway> ShipServerState<EG> {
|
|
@ -110,6 +111,7 @@ impl<EG: EntityGateway> ShipServerState<EG> { |
|
|
clients: HashMap::new(),
|
|
|
clients: HashMap::new(),
|
|
|
client_location: ClientLocation::new(),
|
|
|
client_location: ClientLocation::new(),
|
|
|
level_table: CharacterLevelTable::new(),
|
|
|
level_table: CharacterLevelTable::new(),
|
|
|
|
|
|
name: "Sona-Nyl".into(),
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -128,7 +130,7 @@ impl<EG: EntityGateway> ShipServerState<EG> { |
|
|
.ok_or(ShipError::ClientNotFound(id))?;
|
|
|
.ok_or(ShipError::ClientNotFound(id))?;
|
|
|
|
|
|
|
|
|
self.clients.insert(id, ClientState::new(user, settings, character, pkt.session));
|
|
|
self.clients.insert(id, ClientState::new(user, settings, character, pkt.session));
|
|
|
vec![SendShipPacket::LoginResponse(response), SendShipPacket::ShipBlockList(ShipBlockList::new(3))]
|
|
|
|
|
|
|
|
|
vec![SendShipPacket::LoginResponse(response), SendShipPacket::ShipBlockList(ShipBlockList::new(&self.name, 3))]
|
|
|
},
|
|
|
},
|
|
|
Err(err) => {
|
|
|
Err(err) => {
|
|
|
vec![SendShipPacket::LoginResponse(LoginResponse::by_status(err, Session::new()))]
|
|
|
vec![SendShipPacket::LoginResponse(LoginResponse::by_status(err, Session::new()))]
|
|
|