28 lines
1.0 KiB
Rust
28 lines
1.0 KiB
Rust
|
use std::collections::HashMap;
|
||
|
use log::warn;
|
||
|
use libpso::packet::ship::*;
|
||
|
use libpso::packet::messages::*;
|
||
|
use crate::common::serverstate::ClientId;
|
||
|
use crate::common::leveltable::CharacterLevelTable;
|
||
|
use crate::ship::ship::{SendShipPacket, ShipError, ClientState, Rooms};
|
||
|
use crate::ship::character::{CharacterBytesBuilder, FullCharacterBytesBuilder};
|
||
|
use crate::ship::location::{ClientLocation, LobbyId, RoomId, RoomLobby, MAX_ROOMS};
|
||
|
use libpso::character::character;
|
||
|
use crate::entity::gateway::EntityGateway;
|
||
|
|
||
|
pub fn request_exp(id: ClientId,
|
||
|
request_exp: &RequestExp,
|
||
|
client_location: &ClientLocation,
|
||
|
rooms: &Rooms)
|
||
|
-> Box<dyn Iterator<Item = (ClientId, SendShipPacket)> + Send> {
|
||
|
|
||
|
match client_location.get_area(id).unwrap() {
|
||
|
RoomLobby::Room(room) => {
|
||
|
let r = rooms[room.0].as_ref().unwrap();
|
||
|
warn!("killed a {:?}", r.maps.enemy_by_id(request_exp.enemy_id as usize).monster);
|
||
|
},
|
||
|
_ => {}
|
||
|
};
|
||
|
Box::new(None.into_iter())
|
||
|
}
|