|
@ -219,6 +219,10 @@ pub struct ClientState { |
|
|
pub item_drop_location: Option<ItemDropLocation>,
|
|
|
pub item_drop_location: Option<ItemDropLocation>,
|
|
|
pub done_loading_quest: bool,
|
|
|
pub done_loading_quest: bool,
|
|
|
//pub loading_quest: Option<LoadingQuest>,
|
|
|
//pub loading_quest: Option<LoadingQuest>,
|
|
|
|
|
|
pub area: Option<MapArea>,
|
|
|
|
|
|
pub x: f32,
|
|
|
|
|
|
pub y: f32,
|
|
|
|
|
|
pub z: f32,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
impl ClientState {
|
|
|
impl ClientState {
|
|
@ -231,6 +235,10 @@ impl ClientState { |
|
|
block: 1,
|
|
|
block: 1,
|
|
|
item_drop_location: None,
|
|
|
item_drop_location: None,
|
|
|
done_loading_quest: false,
|
|
|
done_loading_quest: false,
|
|
|
|
|
|
area: None,
|
|
|
|
|
|
x: 0.0,
|
|
|
|
|
|
y: 0.0,
|
|
|
|
|
|
z: 0.0,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -275,6 +283,12 @@ impl<EG: EntityGateway> ShipServerState<EG> { |
|
|
GameMessage::PlayerSplitItemStack(split_item_stack) => {
|
|
|
GameMessage::PlayerSplitItemStack(split_item_stack) => {
|
|
|
handler::message::split_item_stack(id, split_item_stack, &mut self.entity_gateway, &mut self.client_location, &mut self.clients, &mut self.item_manager).await
|
|
|
handler::message::split_item_stack(id, split_item_stack, &mut self.entity_gateway, &mut self.client_location, &mut self.clients, &mut self.item_manager).await
|
|
|
},
|
|
|
},
|
|
|
|
|
|
GameMessage::PlayerChangedMap(_) | GameMessage::PlayerChangedMap2(_) | GameMessage::TellOtherPlayerMyLocation(_) |
|
|
|
|
|
|
GameMessage::PlayerWarpingToFloor(_) | GameMessage::PlayerTeleported(_) | GameMessage::PlayerStopped(_) |
|
|
|
|
|
|
GameMessage::PlayerLoadedIn(_) | GameMessage::PlayerWalking(_) | GameMessage::PlayerRunning(_) |
|
|
|
|
|
|
GameMessage::PlayerWarped(_) | GameMessage::PlayerChangedFloor(_) | GameMessage::InitializeSpeechNpc(_) => {
|
|
|
|
|
|
handler::message::update_player_position(id, &msg.msg, &mut self.clients, &mut self.client_location, &self.rooms)
|
|
|
|
|
|
},
|
|
|
_ => {
|
|
|
_ => {
|
|
|
let cmsg = msg.clone();
|
|
|
let cmsg = msg.clone();
|
|
|
Ok(Box::new(self.client_location.get_client_neighbors(id).unwrap().into_iter()
|
|
|
Ok(Box::new(self.client_location.get_client_neighbors(id).unwrap().into_iter()
|
|
|