|
|
@ -8,6 +8,7 @@ use crate::ship::ship::{SendShipPacket, ShipError, Rooms, Clients, ItemDropLocat |
|
|
|
use crate::ship::location::{ClientLocation, ClientLocationError};
|
|
|
|
use crate::ship::items::{ItemManager, ClientItemId, InventoryItem};
|
|
|
|
use crate::ship::packet::builder;
|
|
|
|
use crate::entity::character::{PlayerTraps};
|
|
|
|
|
|
|
|
pub async fn request_exp<EG: EntityGateway>(id: ClientId,
|
|
|
|
request_exp: &RequestExp,
|
|
|
@ -364,3 +365,28 @@ where |
|
|
|
item_manager.player_sorts_items(entity_gateway, &client.character, pkt.item_ids).await?;
|
|
|
|
Ok(Box::new(None.into_iter())) // Do clients care about the order of other clients items?
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
// 0 - dt
|
|
|
|
// 1 - ft
|
|
|
|
// 3 - ct
|
|
|
|
// TODO: 2 - st? (requires bmode?)
|
|
|
|
// TODO: do we need to do anything with this packet other than log it and fwd it?
|
|
|
|
// TODO: do we need to track trap counts in EG?
|
|
|
|
|
|
|
|
pub fn player_trap_set(id: ClientId,
|
|
|
|
pkt: &PlayerTrapSet,
|
|
|
|
clients: &Clients)
|
|
|
|
-> Result<Box<dyn Iterator<Item = (ClientId, SendShipPacket)> + Send>, anyhow::Error>
|
|
|
|
{
|
|
|
|
let client = clients.get(&id).ok_or(ShipError::ClientNotFound(id))?;
|
|
|
|
match PlayerTraps::from(pkt.trap_type) {
|
|
|
|
PlayerTraps::FireTrap => {},
|
|
|
|
PlayerTraps::FreezeTrap => {},
|
|
|
|
PlayerTraps::SlowTrap => {},
|
|
|
|
PlayerTraps::ConfuseTrap {},
|
|
|
|
_ => {}, // uhoh
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
*/
|