|
@ -86,6 +86,7 @@ pub struct FullCharacterBytesBuilder<'a> { |
|
|
joystick_config: Option<&'a [u8; 0x38]>,
|
|
|
joystick_config: Option<&'a [u8; 0x38]>,
|
|
|
symbol_chat: Option<&'a [u8; 1248]>,
|
|
|
symbol_chat: Option<&'a [u8; 1248]>,
|
|
|
tech_menu: Option<&'a [u8; 40]>,
|
|
|
tech_menu: Option<&'a [u8; 40]>,
|
|
|
|
|
|
option_flags: Option<u32>,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -101,6 +102,7 @@ impl<'a> FullCharacterBytesBuilder<'a> { |
|
|
joystick_config: None,
|
|
|
joystick_config: None,
|
|
|
symbol_chat: None,
|
|
|
symbol_chat: None,
|
|
|
tech_menu: None,
|
|
|
tech_menu: None,
|
|
|
|
|
|
option_flags: None,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -167,6 +169,13 @@ impl<'a> FullCharacterBytesBuilder<'a> { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn option_flags(self, option_flags: u32) -> FullCharacterBytesBuilder<'a> {
|
|
|
|
|
|
FullCharacterBytesBuilder {
|
|
|
|
|
|
option_flags: Some(option_flags),
|
|
|
|
|
|
..self
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
pub fn build(self) -> character::FullCharacter {
|
|
|
pub fn build(self) -> character::FullCharacter {
|
|
|
let character = self.character.unwrap();
|
|
|
let character = self.character.unwrap();
|
|
|
let stats = self.stats.unwrap();
|
|
|
let stats = self.stats.unwrap();
|
|
@ -177,6 +186,7 @@ impl<'a> FullCharacterBytesBuilder<'a> { |
|
|
let joystick_config = self.joystick_config.unwrap();
|
|
|
let joystick_config = self.joystick_config.unwrap();
|
|
|
let symbol_chat = self.symbol_chat.unwrap();
|
|
|
let symbol_chat = self.symbol_chat.unwrap();
|
|
|
let tech_menu = self.tech_menu.unwrap();
|
|
|
let tech_menu = self.tech_menu.unwrap();
|
|
|
|
|
|
let option_flags = self.option_flags.unwrap();
|
|
|
|
|
|
|
|
|
let mut inventory_items = inventory.as_client_inventory_items();
|
|
|
let mut inventory_items = inventory.as_client_inventory_items();
|
|
|
inventory_items[7].material_count = character.materials.power as u8;
|
|
|
inventory_items[7].material_count = character.materials.power as u8;
|
|
@ -207,6 +217,7 @@ impl<'a> FullCharacterBytesBuilder<'a> { |
|
|
symbol_chats: *symbol_chat,
|
|
|
symbol_chats: *symbol_chat,
|
|
|
tech_menu: *tech_menu,
|
|
|
tech_menu: *tech_menu,
|
|
|
bank: bank.as_client_bank_items(),
|
|
|
bank: bank.as_client_bank_items(),
|
|
|
|
|
|
option_flags: option_flags,
|
|
|
..character::FullCharacter::default()
|
|
|
..character::FullCharacter::default()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|