28 lines
1.1 KiB
Rust
Raw Normal View History

2020-04-22 07:14:59 -06:00
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();
2020-04-26 22:01:05 -06:00
warn!("killed a {:?}", r.maps.enemy_by_id(request_exp.enemy_id as usize).unwrap().monster);
2020-04-22 07:14:59 -06:00
},
_ => {}
};
Box::new(None.into_iter())
}