forked from NewEriduPubSec/JaneDoe-ZS
Implement OpenUI interacts (currently configs only for Yorozuya and Archive) Fully working Archive (battles and cutscenes)
23 lines
607 B
Rust
23 lines
607 B
Rust
use std::collections::HashMap;
|
|
|
|
use crate::logic::BaseProperty;
|
|
use proto::InLevelAvatarData;
|
|
|
|
pub struct InLevelAvatarDataItem {
|
|
pub avatar_id: u32,
|
|
pub mp_property_override: HashMap<BaseProperty, i32>,
|
|
}
|
|
|
|
impl InLevelAvatarDataItem {
|
|
pub fn to_client(&self) -> InLevelAvatarData {
|
|
InLevelAvatarData {
|
|
avatar_id: self.avatar_id,
|
|
mp_property_override_map: self
|
|
.mp_property_override
|
|
.iter()
|
|
.map(|(prop, value)| (*prop as u32, *value))
|
|
.collect(),
|
|
..Default::default()
|
|
}
|
|
}
|
|
}
|