31 lines
529 B
Rust
31 lines
529 B
Rust
|
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(),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|