|
@ -2,6 +2,7 @@ use std::convert::{From, Into, TryFrom, TryInto}; |
|
|
use std::collections::HashMap;
|
|
|
use std::collections::HashMap;
|
|
|
|
|
|
|
|
|
use libpso::packet::ship::{UpdateConfig, WriteInfoboard};
|
|
|
use libpso::packet::ship::{UpdateConfig, WriteInfoboard};
|
|
|
|
|
|
use libpso::character::character::{DEFAULT_PALETTE_CONFIG, DEFAULT_TECH_MENU};
|
|
|
use crate::entity::item::tech::Technique;
|
|
|
use crate::entity::item::tech::Technique;
|
|
|
use crate::entity::account::UserAccountId;
|
|
|
use crate::entity::account::UserAccountId;
|
|
|
|
|
|
|
|
@ -189,7 +190,7 @@ pub struct CharacterConfig { |
|
|
impl CharacterConfig {
|
|
|
impl CharacterConfig {
|
|
|
fn new() -> CharacterConfig {
|
|
|
fn new() -> CharacterConfig {
|
|
|
CharacterConfig {
|
|
|
CharacterConfig {
|
|
|
raw_data: [0; 0xE8],
|
|
|
|
|
|
|
|
|
raw_data: DEFAULT_PALETTE_CONFIG,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
@ -228,6 +229,23 @@ pub struct CharacterGuildCard { |
|
|
pub description: String,
|
|
|
pub description: String,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Clone)]
|
|
|
|
|
|
pub struct CharacterTechMenu {
|
|
|
|
|
|
pub tech_menu: [u8; 40],
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
impl CharacterTechMenu {
|
|
|
|
|
|
fn new() -> CharacterTechMenu {
|
|
|
|
|
|
CharacterTechMenu {
|
|
|
|
|
|
tech_menu: DEFAULT_TECH_MENU,
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn as_bytes(&self) -> [u8; 40] {
|
|
|
|
|
|
self.tech_menu
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
|
|
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
|
|
pub struct CharacterEntityId(pub u32);
|
|
|
pub struct CharacterEntityId(pub u32);
|
|
@ -248,6 +266,8 @@ pub struct NewCharacterEntity { |
|
|
pub config: CharacterConfig,
|
|
|
pub config: CharacterConfig,
|
|
|
pub info_board: CharacterInfoboard,
|
|
|
pub info_board: CharacterInfoboard,
|
|
|
pub guildcard: CharacterGuildCard,
|
|
|
pub guildcard: CharacterGuildCard,
|
|
|
|
|
|
|
|
|
|
|
|
pub tech_menu: CharacterTechMenu,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
impl NewCharacterEntity {
|
|
|
impl NewCharacterEntity {
|
|
@ -264,6 +284,7 @@ impl NewCharacterEntity { |
|
|
config: CharacterConfig::new(),
|
|
|
config: CharacterConfig::new(),
|
|
|
info_board: CharacterInfoboard::new(),
|
|
|
info_board: CharacterInfoboard::new(),
|
|
|
guildcard: CharacterGuildCard::default(),
|
|
|
guildcard: CharacterGuildCard::default(),
|
|
|
|
|
|
tech_menu: CharacterTechMenu::new(),
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -285,4 +306,6 @@ pub struct CharacterEntity { |
|
|
pub config: CharacterConfig,
|
|
|
pub config: CharacterConfig,
|
|
|
pub info_board: CharacterInfoboard,
|
|
|
pub info_board: CharacterInfoboard,
|
|
|
pub guildcard: CharacterGuildCard,
|
|
|
pub guildcard: CharacterGuildCard,
|
|
|
|
|
|
|
|
|
|
|
|
pub tech_menu: CharacterTechMenu,
|
|
|
}
|
|
|
}
|