|
|
@ -2,6 +2,7 @@ pub mod weapon; |
|
|
|
pub mod armor;
|
|
|
|
pub mod shield;
|
|
|
|
pub mod tool;
|
|
|
|
pub mod unit;
|
|
|
|
|
|
|
|
//use libpso::item;
|
|
|
|
use libpso::character::character;
|
|
|
@ -57,6 +58,12 @@ pub struct Shield { |
|
|
|
pub shield: shield::Shield,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq)]
|
|
|
|
pub struct Unit {
|
|
|
|
pub equipped: bool,
|
|
|
|
pub unit: unit::Unit,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq)]
|
|
|
|
pub struct Tool {
|
|
|
|
pub tool: tool::ToolType,
|
|
|
@ -75,6 +82,7 @@ pub enum ItemDetail { |
|
|
|
Weapon(Weapon),
|
|
|
|
Armor(Armor),
|
|
|
|
Shield(Shield),
|
|
|
|
Unit(Unit),
|
|
|
|
Tool(Tool),
|
|
|
|
}
|
|
|
|
|
|
|
@ -91,6 +99,7 @@ impl ItemDetail { |
|
|
|
ItemDetail::Weapon(weapon) => weapon.weapon.as_bytes(),
|
|
|
|
ItemDetail::Armor(armor) => armor.armor.as_bytes(),
|
|
|
|
ItemDetail::Shield(shield) => shield.shield.as_bytes(),
|
|
|
|
ItemDetail::Unit(unit) => unit.unit.as_bytes(),
|
|
|
|
ItemDetail::Tool(tool) => tool.as_bytes(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|