|
|
@ -28,6 +28,7 @@ use crate::ship::map::{Maps, MapsError, MapAreaError, generate_free_roam_maps}; |
|
|
|
use crate::ship::packet::handler;
|
|
|
|
use crate::ship::shops::{WeaponShop, ToolShop, ArmorShop};
|
|
|
|
use crate::ship::trade::TradeState;
|
|
|
|
use crate::ship::chatcommand;
|
|
|
|
|
|
|
|
// TODO: remove once stuff settles down
|
|
|
|
pub use crate::ship::client::*;
|
|
|
@ -733,8 +734,15 @@ impl<EG: EntityGateway + Clone> ServerState for ShipServerState<EG> { |
|
|
|
self.direct_message(id, msg).await?
|
|
|
|
},
|
|
|
|
RecvShipPacket::PlayerChat(msg) => {
|
|
|
|
let block = self.blocks.get_from_client(id, &self.clients).await?;
|
|
|
|
handler::communication::player_chat(id, msg, &block.client_location, &self.clients).await?
|
|
|
|
match chatcommand::handle_chat_command(id, msg.clone(), &mut self).await {
|
|
|
|
Some(ccmd) => {
|
|
|
|
ccmd?
|
|
|
|
},
|
|
|
|
None => {
|
|
|
|
let block = self.blocks.get_from_client(id, &self.clients).await?;
|
|
|
|
handler::communication::player_chat(id, msg, &block.client_location, &self.clients).await?
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
RecvShipPacket::CreateRoom(create_room) => {
|
|
|
|
let block = self.blocks.get_from_client(id, &self.clients).await?;
|
|
|
|