Browse Source

add some defaults

pull/3/head
jake 5 years ago
parent
commit
e445db9aed
  1. 8
      src/character/character.rs

8
src/character/character.rs

@ -248,7 +248,7 @@ pub struct BankItem {
pub flags: u16, pub flags: u16,
} }
#[derive(PSOPacketData, Copy, Clone)]
#[derive(PSOPacketData, Default, Copy, Clone)]
pub struct Inventory { pub struct Inventory {
pub item_count: u8, pub item_count: u8,
pub hp_mats_used: u8, pub hp_mats_used: u8,
@ -279,6 +279,12 @@ pub struct KeyTeamConfig {
pub team_rewards: [u32; 2], 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)] #[derive(PSOPacketData, Copy, Clone)]
pub struct Player { pub struct Player {
pub inventory: Inventory, pub inventory: Inventory,

Loading…
Cancel
Save