use serde::Deserialize; use serde_repr::Deserialize_repr; #[derive(Deserialize)] #[serde(rename_all = "PascalCase")] pub struct PropValueData { pub id: i32, pub value: f32, pub is_ratio: bool, } #[derive(Deserialize)] #[serde(rename_all = "PascalCase")] pub struct VectorData([f32; 3]); impl VectorData { pub fn get_x(&self) -> f32 { self.0[0] } pub fn get_y(&self) -> f32 { self.0[1] } pub fn get_z(&self) -> f32 { self.0[2] } } #[derive(Deserialize, Clone, Debug)] #[serde(rename_all = "PascalCase")] pub struct RawVectorData { pub x: f32, pub y: f32, pub z: f32, } impl RawVectorData { pub fn get_x(&self) -> f32 { self.x } pub fn get_y(&self) -> f32 { self.y } pub fn get_z(&self) -> f32 { self.z } } #[derive(Deserialize)] #[serde(rename_all = "PascalCase")] pub struct EntranceEntityData { pub dungeon_id: i32, pub entrance_entity_id: i32, } #[derive(Deserialize_repr, PartialEq, Debug, Copy, Clone)] #[repr(i32)] pub enum GachaViewTypeInfoId { NoviceConvene = 1, FeaturedResonatorConvene = 2, FeaturedWeaponConvene = 3, StandardResonatorConvene = 4, StandardWeaponConvene = 5, BeginnersChoiceConvene = 6, } #[derive(Deserialize, Debug, Clone)] #[serde(rename_all = "PascalCase")] pub struct Category { pub main_type: Option, pub monster_match_type: Option, } #[derive(Deserialize, Debug, Clone)] #[serde(rename_all = "PascalCase")] pub struct ScanFunction { pub scan_id: Option, pub is_concealed: Option, } #[derive(Deserialize, Debug, Clone)] #[serde(rename_all = "PascalCase")] pub struct WorldLevelBonusType { pub r#type: Option, pub world_level_bonus_id: Option, } #[derive(Deserialize, Debug)] #[serde(rename_all = "PascalCase")] pub struct BaseInfoComponent { pub tid_name: Option, pub category: Option, pub camp: Option, pub online_interact_type: Option, pub scan_function: Option, pub aoi_layer: Option, pub entity_property_id: Option, pub focus_priority: Option, pub aoi_zradius: Option, // TODO: Add more } #[derive(Deserialize, Debug)] #[serde(rename_all = "PascalCase")] pub struct AiComponent { pub disabled: Option, pub ai_id: Option, // TODO: Add more } #[derive(Deserialize, Debug)] #[serde(rename_all = "PascalCase")] pub struct AttributeComponent { pub property_id: Option, pub level: Option, pub world_level_bonus_type: Option, pub rage_mode_id: Option, pub hardness_mode_id: Option, pub monster_prop_extra_rate_id: Option, pub world_level_bonus_id: Option, pub fight_music: Option, // TODO: Add more } #[derive(Deserialize, Debug)] #[serde(rename_all = "PascalCase")] pub struct TeleportPosition { pub x: Option, pub y: Option, pub z: Option, pub a: Option, } #[derive(Deserialize, Debug)] #[serde(rename_all = "PascalCase")] pub struct TeleportComponent { pub disabled: Option, pub teleporter_id: Option, #[serde(rename = "TeleportPos")] pub teleport_position: Option, } #[derive(Deserialize, Debug)] #[serde(rename_all = "PascalCase")] pub struct ComponentsData { pub base_info_component: Option, pub ai_component: Option, pub attribute_component: Option, pub teleport_component: Option, // TODO: Implement this ones // pub scene_actor_ref_component: Option, // pub effect_area_component: Option, // pub entity_state_component: Option, // pub condition_listener_component: Option, // pub interact_component: Option, // pub npc_perform_component: Option, // pub var_component: Option, // pub entity_visible_component: Option, // pub level_ai_component: Option, // pub trigger_component: Option, // pub range_component: Option, // pub spline_component: Option, // pub bubble_component: Option, // pub reward_component: Option, // pub refresh_component: Option, // pub passerby_npc_spawn_component: Option, // pub vision_capture_component: Option, // pub refresh_group_component: Option, // pub collect_component: Option, // pub target_gear_component: Option, // pub fight_interact_component: Option, // pub guide_line_creator_component: Option, // pub photo_target_component: Option, // pub model_component: Option, // pub entity_group_component: Option, // pub scene_item_life_cycle_component: Option, // pub entity_state_audio_component: Option, // pub animal_component: Option, // pub monster_component: Option, // pub nearby_tracking_component: Option, // pub follow_track_component: Option, // pub jigsaw_foundation: Option, // pub treasure_box_component: Option, // pub hook_lock_point: Option, // pub explore_skill_interact_component: Option, // pub attach_target_component: Option, // pub target_gear_group_component: Option, // pub spawn_monster_component: Option, // pub skybox_component: Option, // pub destructible_item: Option, // pub fan_component: Option, // pub state_hint_component: Option, // pub buff_consumer_component: Option, // pub reset_entities_pos_component: Option, // pub group_ai_component: Option, // pub pulling_object_foundation: Option, // pub lift_component: Option, // pub scene_item_movement_component: Option, // pub reset_self_pos_component: Option, // pub jigsaw_item: Option, // pub level_play_component: Option, // pub interact_gear_component: Option, // pub ai_gear_strategy_component: Option, // pub pick_interact_component: Option, // pub level_sequence_frame_event_component: Option, // pub air_wall_spawner_component: Option, // pub progress_bar_control_component: Option, // pub batch_bullet_caster_component: Option, // pub client_trigger_component: Option, // pub enrichment_area_component: Option, // pub vehicle_component: Option, // pub item_foundation2: Option, // pub tele_control2: Option, // pub interact_audio_component: Option, // pub level_qte_component: Option, // pub resurrection_component: Option, // pub ai_alert_notify_component: Option, // pub trample_component: Option, // pub dungeon_entry_component: Option, // pub level_prefab_perform_component: Option, // pub render_specified_range_component: Option, // pub walking_pattern_component: Option, // pub no_render_portal_component: Option, // pub adsorb_component: Option, // pub beam_cast_component: Option, // pub beam_receive_component: Option, // pub timeline_track_control_component: Option, // pub scene_bullet_component: Option, // pub edit_custom_aoi_component: Option, // pub combat_component: Option, // pub location_safety_component: Option, // pub turntable_control_component: Option, // pub scene_item_ai_component: Option, // pub buff_producer_component: Option, // pub portal_component: Option, // pub inhalation_ability_component: Option, // pub inhaled_item_component: Option, // pub monster_gacha_base_component: Option, // pub monster_gacha_item_component: Option, // pub time_stop_component: Option, // pub hit_component: Option, // pub levitate_magnet_component: Option, // pub rebound_component: Option, // pub rotator_component2: Option, // pub conveyor_belt_component: Option, // pub dynamic_portal_creator_component: Option, // pub connector_component: Option, // pub monitor_component: Option, }