add default palette and symbol chats
This commit is contained in:
parent
f499cc20dc
commit
4fae76928d
@ -2,6 +2,7 @@ use std::convert::{From, Into, TryFrom, TryInto};
|
||||
use std::collections::HashMap;
|
||||
|
||||
use libpso::packet::ship::{UpdateConfig, WriteInfoboard};
|
||||
use libpso::character::character::{Character};
|
||||
use crate::entity::item::tech::Technique;
|
||||
use crate::entity::account::UserAccountId;
|
||||
|
||||
@ -189,7 +190,7 @@ pub struct CharacterConfig {
|
||||
impl CharacterConfig {
|
||||
fn new() -> CharacterConfig {
|
||||
CharacterConfig {
|
||||
raw_data: [0; 0xE8],
|
||||
raw_data: Character::default().config,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,6 +82,7 @@ pub struct FullCharacterBytesBuilder<'a> {
|
||||
inventory: Option<&'a ActiveInventory>,
|
||||
key_config: Option<&'a [u8; 0x16C]>,
|
||||
joystick_config: Option<&'a [u8; 0x38]>,
|
||||
symbol_chat: Option<&'a [u8; 1248]>,
|
||||
}
|
||||
|
||||
|
||||
@ -94,6 +95,7 @@ impl<'a> FullCharacterBytesBuilder<'a> {
|
||||
inventory: None,
|
||||
key_config: None,
|
||||
joystick_config: None,
|
||||
symbol_chat: None,
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,6 +141,13 @@ impl<'a> FullCharacterBytesBuilder<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn symbol_chat(self, symbol_chat: &'a [u8; 1248]) -> FullCharacterBytesBuilder<'a> {
|
||||
FullCharacterBytesBuilder {
|
||||
symbol_chat: Some(symbol_chat),
|
||||
..self
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pub fn build(self) -> character::FullCharacter {
|
||||
let character = self.character.unwrap();
|
||||
@ -147,6 +156,7 @@ impl<'a> FullCharacterBytesBuilder<'a> {
|
||||
let inventory = self.inventory.unwrap();
|
||||
let key_config = self.key_config.unwrap();
|
||||
let joystick_config = self.joystick_config.unwrap();
|
||||
let symbol_chat = self.symbol_chat.unwrap();
|
||||
|
||||
character::FullCharacter {
|
||||
character: CharacterBytesBuilder::new()
|
||||
@ -165,6 +175,7 @@ impl<'a> FullCharacterBytesBuilder<'a> {
|
||||
..character::KeyTeamConfig::default()
|
||||
},
|
||||
info_board: character.info_board.as_bytes(),
|
||||
symbol_chats: *symbol_chat,
|
||||
..character::FullCharacter::default()
|
||||
}
|
||||
}
|
||||
|
@ -220,6 +220,7 @@ impl<EG: EntityGateway> ShipServerState<EG> {
|
||||
.inventory(&client.inventory)
|
||||
.key_config(&client.settings.settings.key_config)
|
||||
.joystick_config(&client.settings.settings.joystick_config)
|
||||
.symbol_chat(&client.settings.settings.symbol_chats)
|
||||
.build();
|
||||
|
||||
Ok(vec![
|
||||
|
Loading…
x
Reference in New Issue
Block a user