libpso/src/item/mod.rs

31 lines
529 B
Rust
Raw Normal View History

2019-12-11 15:59:30 -08:00
pub mod weapon;
use std::io::{Read, Seek};
use crate::{PSOPacketData, PacketParseError};
#[derive(Debug, Copy, Clone)]
pub enum Item {
Weapon(weapon::Weapon),
//Armor(Armor),
//Shield(Shield),
//Unit(Unit),
//Mag(Mag),
//Tool(Tool),
}
impl Item {
fn from_bytes<R: Read + Seek>(cursor: &mut R) -> Result<Self, PacketParseError> {
unimplemented!()
}
pub fn as_bytes(&self) -> [u8; 16] {
match self {
Item::Weapon(wep) => wep.as_bytes(),
}
}
}