add some defaults

This commit is contained in:
jake 2019-12-11 16:01:35 -08:00
parent e0e0ad8ec7
commit e445db9aed

View File

@ -248,7 +248,7 @@ pub struct BankItem {
pub flags: u16,
}
#[derive(PSOPacketData, Copy, Clone)]
#[derive(PSOPacketData, Default, Copy, Clone)]
pub struct Inventory {
pub item_count: u8,
pub hp_mats_used: u8,
@ -279,6 +279,12 @@ pub struct KeyTeamConfig {
pub team_rewards: [u32; 2],
}
impl std::default::Default for KeyTeamConfig {
fn default() -> KeyTeamConfig {
KeyTeamConfig::from_bytes(&mut std::io::Cursor::new([0; 0xAF4].to_vec())).unwrap()
}
}
#[derive(PSOPacketData, Copy, Clone)]
pub struct Player {
pub inventory: Inventory,