|
|
@ -15,7 +15,6 @@ pub async fn validate_login<EG: EntityGateway>(id: ClientId, |
|
|
|
-> Result<Vec<SendShipPacket>, ShipError> {
|
|
|
|
Ok(match get_login_status(entity_gateway, pkt).await {
|
|
|
|
Ok(user) => {
|
|
|
|
if user.activated {
|
|
|
|
let mut response = LoginResponse::by_status(AccountStatus::Ok, Session::new());
|
|
|
|
response.guildcard = user.id.0 as u32;
|
|
|
|
response.team_id = user.team_id.map_or(31, |ti| ti) as u32;
|
|
|
@ -30,10 +29,6 @@ pub async fn validate_login<EG: EntityGateway>(id: ClientId, |
|
|
|
item_manager.load_character(entity_gateway, &character).await?;
|
|
|
|
clients.insert(id, ClientState::new(user, settings, character, pkt.session));
|
|
|
|
vec![SendShipPacket::LoginResponse(response), SendShipPacket::ShipBlockList(ShipBlockList::new(&&ship_name, 3))]
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
vec![SendShipPacket::LoginResponse(LoginResponse::by_status(AccountStatus::Locked, Session::new()))]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
Err(err) => {
|
|
|
|
vec![SendShipPacket::LoginResponse(LoginResponse::by_status(err, Session::new()))]
|
|
|
|