|
@ -120,11 +120,11 @@ pub fn join_room(id: ClientId, |
|
|
let client = clients.get(&id).ok_or(ShipError::ClientNotFound(id))?;
|
|
|
let client = clients.get(&id).ok_or(ShipError::ClientNotFound(id))?;
|
|
|
let area_client = client_location.get_local_client(id).map_err(|err| -> ClientLocationError { err.into() })?;
|
|
|
let area_client = client_location.get_local_client(id).map_err(|err| -> ClientLocationError { err.into() })?;
|
|
|
|
|
|
|
|
|
item_manager.add_character_to_room(room_id, &client.character, area_client);
|
|
|
|
|
|
|
|
|
item_state.add_character_to_room(room_id, &client.character, area_client);
|
|
|
|
|
|
|
|
|
let leader = client_location.get_room_leader(room_id).map_err(|err| -> ClientLocationError { err.into() })?;
|
|
|
let leader = client_location.get_room_leader(room_id).map_err(|err| -> ClientLocationError { err.into() })?;
|
|
|
let join_room = builder::room::join_room(id, clients, client_location, room_id, room)?;
|
|
|
let join_room = builder::room::join_room(id, clients, client_location, room_id, room)?;
|
|
|
let add_to = builder::room::add_to_room(id, client, &area_client, &leader, item_manager, level_table, room_id)?;
|
|
|
|
|
|
|
|
|
let add_to = builder::room::add_to_room(id, client, &area_client, &leader, item_state, level_table, room_id)?;
|
|
|
|
|
|
|
|
|
let room = rooms.get_mut(room_id.0).unwrap().as_mut().unwrap();
|
|
|
let room = rooms.get_mut(room_id.0).unwrap().as_mut().unwrap();
|
|
|
room.bursting = true;
|
|
|
room.bursting = true;
|
|
|