From 23fcde33f5e0b8d2187d72c86a6f5e0f80c8393c Mon Sep 17 00:00:00 2001 From: traffic95 Date: Wed, 19 Mar 2025 08:52:04 +0000 Subject: [PATCH] Properties calc port for 1.7beta (#7) Reviewed-on: https://git.xeondev.com/ObolSquad/trigger-rs/pulls/7 Co-authored-by: traffic95 Co-committed-by: traffic95 --- crates/battle-server/src/logic/dungeon.rs | 4 + crates/battle-server/src/logic/mod.rs | 19 +- .../battle-server/src/logic/property_util.rs | 717 + .../src/server_message_handler.rs | 2 +- crates/battle-server/src/session/message.rs | 2 +- crates/dispatch-server/src/main.rs | 2 +- crates/dispatch-server/src/query_dispatch.rs | 4 +- crates/dispatch-server/src/query_gateway.rs | 37 +- crates/game-server/src/logic/gm_util.rs | 4 +- crates/game-server/src/logic/player/mod.rs | 2 +- .../src/logic/player/player_util.rs | 2 +- crates/game-server/src/main.rs | 2 +- .../game-server/src/server_message_handler.rs | 4 +- crates/game-server/src/session/message/mod.rs | 2 +- crates/game-server/src/session/mod.rs | 2 +- crates/gate-server/src/handlers/client.rs | 31 +- crates/gate-server/src/message_handler.rs | 2 +- crates/gate-server/src/net/connection.rs | 2 +- crates/gate-server/src/net/packet.rs | 2 +- crates/gate-server/src/net/tcp_gateway.rs | 2 +- crates/gate-server/src/session/mod.rs | 2 +- .../hall-server/src/logic/ecs/event_graph.rs | 2 +- crates/hall-server/src/logic/ecs/hall.rs | 2 +- .../hall-server/src/logic/ecs/interaction.rs | 4 +- crates/hall-server/src/logic/ecs/mod.rs | 2 +- .../hall-server/src/logic/ecs/scene_save.rs | 2 +- crates/hall-server/src/logic/listener.rs | 2 +- crates/hall-server/src/logic/message.rs | 4 +- crates/hall-server/src/logic/mod.rs | 4 +- crates/hall-server/src/main.rs | 4 +- .../hall-server/src/server_message_handler.rs | 2 +- crates/muip-server/src/http_server.rs | 4 +- crates/trigger-codegen/src/commands.rs | 7 +- crates/trigger-codegen/src/decodeable.rs | 2 +- crates/trigger-codegen/src/encodeable.rs | 2 +- .../src/handler_module_attribute.rs | 4 +- crates/trigger-codegen/src/lib.rs | 4 +- crates/trigger-cryptography/src/mhy/aes.rs | 2 +- crates/trigger-cryptography/src/rsa.rs | 4 +- crates/trigger-database/src/lib.rs | 6 +- crates/trigger-encoding/src/lib.rs | 2 +- crates/trigger-fileconfig/fbs/tables.fbs | 201 +- .../gen_flatbuffers/tables_generated.rs | 22853 +++++++++++----- crates/trigger-fileconfig/src/lib.rs | 6 + crates/trigger-logic/src/battle.rs | 91 + crates/trigger-logic/src/lib.rs | 1 + crates/trigger-protobuf/build.rs | 2 +- crates/trigger-protobuf/out/_.rs | 4 + crates/trigger-protobuf/out/protocol_map.rs | 10 + crates/trigger-protocol/src/lib.rs | 3 +- crates/trigger-sv/src/config.rs | 2 +- crates/trigger-sv/src/message/session.rs | 2 +- crates/trigger-sv/src/net/listener.rs | 2 +- crates/trigger-sv/src/net/mod.rs | 2 +- crates/trigger-sv/src/net/socket.rs | 2 +- 55 files changed, 16612 insertions(+), 7480 deletions(-) create mode 100644 crates/battle-server/src/logic/property_util.rs create mode 100644 crates/trigger-logic/src/battle.rs diff --git a/crates/battle-server/src/logic/dungeon.rs b/crates/battle-server/src/logic/dungeon.rs index 8cb1bb5..a05dc01 100644 --- a/crates/battle-server/src/logic/dungeon.rs +++ b/crates/battle-server/src/logic/dungeon.rs @@ -1,7 +1,10 @@ +use std::collections::HashMap; + use trigger_protocol::DungeonEquipInfo; pub struct AvatarUnit { pub avatar_id: u32, + pub properties: HashMap, } pub struct BuddyUnit { @@ -29,6 +32,7 @@ impl Dungeon { .iter() .map(|unit| AvatarUnitInfo { avatar_id: unit.avatar_id, + properties: unit.properties.clone(), }) .collect(), buddy_list: self diff --git a/crates/battle-server/src/logic/mod.rs b/crates/battle-server/src/logic/mod.rs index bf68257..64f74a5 100644 --- a/crates/battle-server/src/logic/mod.rs +++ b/crates/battle-server/src/logic/mod.rs @@ -1,4 +1,5 @@ mod dungeon; +mod property_util; pub use dungeon::*; pub mod scene; @@ -39,7 +40,14 @@ impl GameState { quest_id: *quest_id, avatar_list: avatar_id_list .iter() - .map(|&avatar_id| AvatarUnit { avatar_id }) + .map(|&avatar_id| AvatarUnit { + avatar_id, + properties: property_util::calculate_for_avatar( + avatar_id, + filecfg, + dungeon_equip, + ), + }) .collect(), buddy_list: vec![BuddyUnit { buddy_type: 0, @@ -71,7 +79,14 @@ impl GameState { quest_id: *quest_id, avatar_list: avatar_id_list .iter() - .map(|&avatar_id| AvatarUnit { avatar_id }) + .map(|&avatar_id| AvatarUnit { + avatar_id, + properties: property_util::calculate_for_avatar( + avatar_id, + filecfg, + dungeon_equip, + ), + }) .collect(), buddy_list: vec![BuddyUnit { buddy_type: 0, diff --git a/crates/battle-server/src/logic/property_util.rs b/crates/battle-server/src/logic/property_util.rs new file mode 100644 index 0000000..cd04694 --- /dev/null +++ b/crates/battle-server/src/logic/property_util.rs @@ -0,0 +1,717 @@ +use std::collections::HashMap; + +use trigger_fileconfig::{ + AvatarBattleTemplate, AvatarLevelAdvanceTemplate, AvatarPassiveSkillTemplate, NapFileCfg, + WeaponLevelTemplate, WeaponStarTemplate, WeaponTemplate, +}; +use trigger_logic::{battle::EPropertyType, skill::EAvatarSkillType}; +use trigger_protocol::{Avatar, DungeonEquipInfo, Equip, Weapon}; + +struct AvatarFileCfg<'a> { + pub avatar_battle_template: AvatarBattleTemplate<'a>, + pub avatar_passive_skill_templates: Vec>, + pub avatar_level_advances: Vec>, +} + +struct WeaponFileCfg<'a> { + pub weapon_template: WeaponTemplate<'a>, + pub weapon_level_template: WeaponLevelTemplate<'a>, + pub weapon_star_template: WeaponStarTemplate<'a>, +} + +const BEN_AVATAR_ID: u32 = 1121; +const BEN_CORE_PASSIVE_PERCENTAGE: [i32; 7] = [40, 46, 52, 60, 66, 72, 80]; + +pub fn calculate_for_avatar( + avatar_id: u32, + filecfg: &'static NapFileCfg, + dungeon_equip: &DungeonEquipInfo, +) -> HashMap { + let mut calculated_properties = HashMap::<_, _>::new(); + let Some(player_avatar) = dungeon_equip + .avatar_list + .iter() + .find(|a| (*a).id == avatar_id) + else { + return calculated_properties; + }; + let Some(avatar_file_cfg) = get_avatar_filecfg(avatar_id, filecfg) else { + return calculated_properties; + }; + insert_avatar_battle_template_properties(&avatar_file_cfg, &mut calculated_properties); + insert_avatar_battle_level_advance_properties( + &avatar_file_cfg, + player_avatar, + &mut calculated_properties, + ); + perform_avatar_growth_promotion_calculations(player_avatar, &mut calculated_properties); + add_avatar_passive_skill_properties( + &avatar_file_cfg, + player_avatar, + &mut calculated_properties, + ); + let player_weapon = dungeon_equip + .weapon_list + .iter() + .find(|w| w.uid == player_avatar.cur_weapon_uid); + if player_weapon.is_some() { + match get_weapon_filecfg(player_weapon.unwrap(), filecfg) { + Some(weapon_file_cfg) => { + add_weapon_template_properties(&weapon_file_cfg, &mut calculated_properties); + } + None => {} + }; + } + let player_dressed_equip_uids: Vec = player_avatar + .dressed_equip_list + .iter() + .map(|de| de.equip_uid) + .collect(); + let player_equips: Vec<&Equip> = dungeon_equip + .equip_list + .iter() + .filter(|e| player_dressed_equip_uids.contains(&e.uid)) + .collect(); + if player_equips.len() > 0 { + add_player_equip_properties(&player_equips, filecfg, &mut calculated_properties); + add_equipment_suit_properties(&player_equips, filecfg, &mut calculated_properties); + } + calculate_final_properties(&mut calculated_properties); + add_ben_core_passive(avatar_id, player_avatar, &mut calculated_properties); + remove_custom_properties(&mut calculated_properties); + set_battle_properties(&mut calculated_properties); + + calculated_properties +} + +fn get_avatar_filecfg( + avatar_id: u32, + filecfg: &'static NapFileCfg, +) -> Option> { + let Some(avatar_battle_template) = filecfg + .avatar_battle_template_tb() + .data() + .unwrap() + .iter() + .find(|tmpl| tmpl.id() == avatar_id as i32) + else { + return None; + }; + + let avatar_passive_skill_templates: Vec = filecfg + .avatar_passive_skill_template_tb() + .data() + .unwrap() + .iter() + .filter(|tmpl| tmpl.avatar_id() == avatar_id as i32) + .collect(); + if avatar_passive_skill_templates.len() == 0 { + return None; + } + + let avatar_level_advances: Vec = filecfg + .avatar_level_advance_template_tb() + .data() + .unwrap() + .iter() + .filter(|tmpl| tmpl.avatar_id() == avatar_id as i32) + .collect(); + if avatar_level_advances.len() == 0 { + return None; + } + + Some(AvatarFileCfg { + avatar_battle_template, + avatar_passive_skill_templates, + avatar_level_advances, + }) +} + +fn insert_avatar_battle_template_properties( + avatar_file_cfg: &AvatarFileCfg, + properties: &mut HashMap, +) { + properties.insert( + EPropertyType::HpMaxBase.into(), + avatar_file_cfg.avatar_battle_template.hp_max(), + ); + properties.insert( + EPropertyType::HpMaxGrowth.into(), + avatar_file_cfg.avatar_battle_template.health_growth(), + ); + properties.insert( + EPropertyType::AtkBase.into(), + avatar_file_cfg.avatar_battle_template.attack(), + ); + properties.insert( + EPropertyType::AtkGrowth.into(), + avatar_file_cfg.avatar_battle_template.attack_growth(), + ); + properties.insert( + EPropertyType::BreakStunBase.into(), + avatar_file_cfg.avatar_battle_template.break_stun(), + ); + properties.insert( + EPropertyType::DefBase.into(), + avatar_file_cfg.avatar_battle_template.defence(), + ); + properties.insert( + EPropertyType::DefGrowth.into(), + avatar_file_cfg.avatar_battle_template.defence_growth(), + ); + properties.insert( + EPropertyType::CritBase.into(), + avatar_file_cfg.avatar_battle_template.crit(), + ); + properties.insert( + EPropertyType::CritDmgBase.into(), + avatar_file_cfg.avatar_battle_template.crit_damage(), + ); + properties.insert( + EPropertyType::PenBase.into(), + avatar_file_cfg.avatar_battle_template.pen_rate(), + ); + properties.insert( + EPropertyType::PenValueBase.into(), + avatar_file_cfg.avatar_battle_template.pen_delta(), + ); + properties.insert( + EPropertyType::SpRecoverBase.into(), + avatar_file_cfg.avatar_battle_template.sp_recover(), + ); + properties.insert( + EPropertyType::ElementMysteryBase.into(), + avatar_file_cfg.avatar_battle_template.element_mystery(), + ); + properties.insert( + EPropertyType::ElementAbnormalPowerBase.into(), + avatar_file_cfg + .avatar_battle_template + .element_abnormal_power(), + ); +} + +fn insert_avatar_battle_level_advance_properties( + avatar_file_cfg: &AvatarFileCfg, + player_avatar: &Avatar, + properties: &mut HashMap, +) { + let Some(avatar_level_advance) = avatar_file_cfg + .avatar_level_advances + .iter() + .find(|tmpl| tmpl.id() == player_avatar.rank as i32) + else { + properties.insert(EPropertyType::HpMaxAdvance.into(), 0); + properties.insert(EPropertyType::AtkAdvance.into(), 0); + properties.insert(EPropertyType::DefAdvance.into(), 0); + + return; + }; + + properties.insert( + EPropertyType::HpMaxAdvance.into(), + avatar_level_advance.hp_max(), + ); + properties.insert( + EPropertyType::AtkAdvance.into(), + avatar_level_advance.attack(), + ); + properties.insert( + EPropertyType::DefAdvance.into(), + avatar_level_advance.defence(), + ); +} + +fn perform_avatar_growth_promotion_calculations( + player_avatar: &Avatar, + properties: &mut HashMap, +) { + properties.insert( + EPropertyType::HpMaxBase.into(), + properties.get(&EPropertyType::HpMaxBase.into()).unwrap() + + (((player_avatar.level - 1) as f32 + * *properties.get(&EPropertyType::HpMaxGrowth.into()).unwrap() as f32) + / 10000f32) as i32 + + properties.get(&EPropertyType::HpMaxAdvance.into()).unwrap(), + ); + properties.insert( + EPropertyType::AtkBase.into(), + properties.get(&EPropertyType::AtkBase.into()).unwrap() + + (((player_avatar.level - 1) as f32 + * *properties.get(&EPropertyType::AtkGrowth.into()).unwrap() as f32) + / 10000f32) as i32 + + properties.get(&EPropertyType::AtkAdvance.into()).unwrap(), + ); + properties.insert( + EPropertyType::DefBase.into(), + properties.get(&EPropertyType::DefBase.into()).unwrap() + + (((player_avatar.level - 1) as f32 + * *properties.get(&EPropertyType::DefGrowth.into()).unwrap() as f32) + / 10000f32) as i32 + + properties.get(&EPropertyType::DefAdvance.into()).unwrap(), + ); +} + +fn add_avatar_passive_skill_properties( + avatar_file_cfg: &AvatarFileCfg, + player_avatar: &Avatar, + properties: &mut HashMap, +) { + let passive_skill_level = player_avatar + .skill_type_level + .iter() + .find(|s| s.skill_type == EAvatarSkillType::CoreSkill as u32) + .unwrap() + .level; + + avatar_file_cfg + .avatar_passive_skill_templates + .iter() + .find(|a| a.unlock_passive_skill_level() == passive_skill_level as i32) + .map(|tmpl| tmpl.propertys().unwrap()) + .unwrap() + .iter() + .for_each(|p| { + properties.insert( + p.property() as u32, + properties.get(&(p.property() as u32)).unwrap_or(&0) + p.value(), + ); + }); +} + +fn get_weapon_filecfg( + player_weapon: &Weapon, + filecfg: &'static NapFileCfg, +) -> Option> { + let Some(weapon_template) = filecfg + .weapon_template_tb() + .data() + .unwrap() + .iter() + .find(|tmpl| tmpl.item_id() == player_weapon.id as i32) + else { + return None; + }; + + let Some(weapon_level_template) = filecfg + .weapon_level_template_tb() + .data() + .unwrap() + .iter() + .find(|tmpl| tmpl.level() == player_weapon.level as i32) + else { + return None; + }; + + let Some(weapon_star_template) = filecfg + .weapon_star_template_tb() + .data() + .unwrap() + .iter() + .find(|tmpl| tmpl.star() == player_weapon.star as i32) + else { + return None; + }; + + Some(WeaponFileCfg { + weapon_template, + weapon_level_template, + weapon_star_template, + }) +} + +fn add_weapon_template_properties( + weapon_file_cfg: &WeaponFileCfg, + properties: &mut HashMap, +) { + let base_property = weapon_file_cfg.weapon_template.base_property().unwrap(); + let base_property_value = base_property.value() + + (base_property.value() as f32 * weapon_file_cfg.weapon_level_template.rate() as f32 + / 10000f32) as i32 + + (base_property.value() as f32 * weapon_file_cfg.weapon_star_template.star_rate() as f32 + / 10000f32) as i32; + properties.insert( + base_property.property() as u32, + *properties + .get(&(base_property.property() as u32)) + .unwrap_or(&0) + + base_property_value, + ); + let rand_property = weapon_file_cfg.weapon_template.rand_property().unwrap(); + let rand_property_value = rand_property.value() + + (rand_property.value() as f32 * weapon_file_cfg.weapon_star_template.rand_rate() as f32 + / 10000f32) as i32; + properties.insert( + rand_property.property() as u32, + *properties + .get(&(rand_property.property() as u32)) + .unwrap_or(&0) + + rand_property_value, + ); +} + +fn add_player_equip_properties( + player_equips: &Vec<&Equip>, + filecfg: &'static NapFileCfg, + properties: &mut HashMap, +) { + player_equips.iter().for_each(|pe| { + let equip_rarity = (pe.id / 10) % 10; + let property_rate = filecfg + .equipment_level_template_tb() + .data() + .unwrap() + .iter() + .find(|tmpl| tmpl.rarity() == equip_rarity as i32 && tmpl.level() == pe.level as i32) + .map(|tmpl| tmpl.property_rate()) + .unwrap_or(1); + pe.propertys.iter().for_each(|p| { + properties.insert( + p.key, + properties.get(&p.key).unwrap_or(&0) + + p.base_value as i32 + + (p.base_value as f32 * property_rate as f32 / 10000f32) as i32, + ); + }); + pe.sub_propertys.iter().for_each(|p| { + properties.insert( + p.key, + properties.get(&p.key).unwrap_or(&0) + + (p.base_value as f32 * p.add_value as f32) as i32, + ); + }); + }); +} + +fn add_equipment_suit_properties( + player_equips: &Vec<&Equip>, + filecfg: &'static NapFileCfg, + properties: &mut HashMap, +) { + let mut suit_counts = HashMap::::new(); + player_equips.iter().for_each(|pe| { + let suit_id = pe.id as i32 / 100 * 100; + suit_counts.insert(suit_id, *suit_counts.get(&suit_id).unwrap_or(&0) + 1); + }); + suit_counts.iter().for_each(|sc| { + let Some(equipment_suit_template) = filecfg + .equipment_suit_template_tb() + .data() + .unwrap() + .iter() + .find(|tmpl| tmpl.id() == *sc.0) + else { + return; + }; + if equipment_suit_template.primary_condition() <= *sc.1 { + equipment_suit_template + .primary_suit_propertys() + .unwrap() + .iter() + .for_each(|p| { + properties.insert( + p.property() as u32, + properties.get(&(p.property() as u32)).unwrap_or(&0) + p.value(), + ); + }); + } + }); +} + +fn calculate_final_properties(properties: &mut HashMap) { + properties.insert( + EPropertyType::HpMax.into(), + properties.get(&EPropertyType::HpMaxBase.into()).unwrap() + + (*properties.get(&EPropertyType::HpMaxBase.into()).unwrap() as f32 + * *properties + .get(&EPropertyType::HpMaxRatio.into()) + .unwrap_or(&0) as f32 + / 10000f32) + .ceil() as i32 + + properties + .get(&EPropertyType::HpMaxDelta.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::Atk.into(), + properties.get(&EPropertyType::AtkBase.into()).unwrap() + + (*properties.get(&EPropertyType::AtkBase.into()).unwrap() as f32 + * *properties + .get(&EPropertyType::AtkRatio.into()) + .unwrap_or(&0) as f32 + / 10000f32) as i32 + + properties + .get(&EPropertyType::AtkDelta.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::BreakStun.into(), + properties + .get(&EPropertyType::BreakStunBase.into()) + .unwrap() + + (*properties + .get(&EPropertyType::BreakStunBase.into()) + .unwrap() as f32 + * *properties + .get(&EPropertyType::BreakStunRatio.into()) + .unwrap_or(&0) as f32 + / 10000f32) as i32 + + properties + .get(&EPropertyType::BreakStunDelta.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::Def.into(), + properties.get(&EPropertyType::DefBase.into()).unwrap() + + (*properties.get(&EPropertyType::DefBase.into()).unwrap() as f32 + * *properties + .get(&EPropertyType::DefRatio.into()) + .unwrap_or(&0) as f32 + / 10000f32) as i32 + + properties + .get(&EPropertyType::DefDelta.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::Crit.into(), + properties.get(&EPropertyType::CritBase.into()).unwrap() + + properties + .get(&EPropertyType::CritDelta.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::CritDmg.into(), + properties.get(&EPropertyType::CritDmgBase.into()).unwrap() + + properties + .get(&EPropertyType::CritDmgDelta.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::Pen.into(), + properties.get(&EPropertyType::PenBase.into()).unwrap() + + properties + .get(&EPropertyType::PenDelta.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::PenValue.into(), + properties.get(&EPropertyType::PenValueBase.into()).unwrap() + + properties + .get(&EPropertyType::PenValueDelta.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::SpRecover.into(), + properties + .get(&EPropertyType::SpRecoverBase.into()) + .unwrap() + + (*properties + .get(&EPropertyType::SpRecoverBase.into()) + .unwrap() as f32 + * *properties + .get(&EPropertyType::SpRecoverRatio.into()) + .unwrap_or(&0) as f32 + / 10000f32) as i32 + + properties + .get(&EPropertyType::SpRecoverDelta.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::ElementMystery.into(), + properties + .get(&EPropertyType::ElementMysteryBase.into()) + .unwrap() + + properties + .get(&EPropertyType::ElementMysteryDelta.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::ElementAbnormalPower.into(), + properties + .get(&EPropertyType::ElementAbnormalPowerBase.into()) + .unwrap() + + (*properties + .get(&EPropertyType::ElementAbnormalPowerBase.into()) + .unwrap() as f32 + * *properties + .get(&EPropertyType::ElementAbnormalPowerRatio.into()) + .unwrap_or(&0) as f32 + / 10000f32) as i32 + + properties + .get(&EPropertyType::ElementAbnormalPowerDelta.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::AddedDamageRatioPhysics.into(), + properties + .get(&EPropertyType::AddedDamageRatioPhysics1.into()) + .unwrap_or(&0) + + properties + .get(&EPropertyType::AddedDamageRatioPhysics3.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::AddedDamageRatioFire.into(), + properties + .get(&EPropertyType::AddedDamageRatioFire1.into()) + .unwrap_or(&0) + + properties + .get(&EPropertyType::AddedDamageRatioFire3.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::AddedDamageRatioIce.into(), + properties + .get(&EPropertyType::AddedDamageRatioIce1.into()) + .unwrap_or(&0) + + properties + .get(&EPropertyType::AddedDamageRatioIce3.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::AddedDamageRatioElec.into(), + properties + .get(&EPropertyType::AddedDamageRatioElec1.into()) + .unwrap_or(&0) + + properties + .get(&EPropertyType::AddedDamageRatioElec3.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::AddedDamageRatioEther.into(), + properties + .get(&EPropertyType::AddedDamageRatioEther1.into()) + .unwrap_or(&0) + + properties + .get(&EPropertyType::AddedDamageRatioEther3.into()) + .unwrap_or(&0), + ); +} + +fn add_ben_core_passive( + avatar_id: u32, + player_avatar: &Avatar, + properties: &mut HashMap, +) { + if avatar_id != BEN_AVATAR_ID { + return; + } + let core_level = player_avatar + .skill_type_level + .iter() + .find(|sl| sl.skill_type == EAvatarSkillType::CoreSkill as u32) + .unwrap() + .level as usize; + let def_atk_bonus = match core_level { + 1..=7 => { + *properties.get(&EPropertyType::Def.into()).unwrap_or(&0) + * BEN_CORE_PASSIVE_PERCENTAGE[core_level - 1] + / 100 + } + _ => 0, + }; + properties.insert( + EPropertyType::Atk.into(), + *properties.get(&EPropertyType::Atk.into()).unwrap_or(&0) + def_atk_bonus, + ); +} + +fn remove_custom_properties(properties: &mut HashMap) { + properties.remove(&EPropertyType::HpMaxGrowth.into()); + properties.remove(&EPropertyType::AtkGrowth.into()); + properties.remove(&EPropertyType::DefGrowth.into()); + properties.remove(&EPropertyType::HpMaxAdvance.into()); + properties.remove(&EPropertyType::AtkAdvance.into()); + properties.remove(&EPropertyType::DefAdvance.into()); +} + +fn set_battle_properties(properties: &mut HashMap) { + properties.insert( + EPropertyType::Hp.into(), + *properties.get(&EPropertyType::HpMax.into()).unwrap_or(&0), + ); + properties.insert( + EPropertyType::HpMaxBattle.into(), + *properties.get(&EPropertyType::HpMax.into()).unwrap_or(&0), + ); + properties.insert( + EPropertyType::AtkBattle.into(), + *properties.get(&EPropertyType::Atk.into()).unwrap_or(&0), + ); + properties.insert( + EPropertyType::BreakStunBattle.into(), + *properties + .get(&EPropertyType::BreakStun.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::DefBattle.into(), + *properties.get(&EPropertyType::Def.into()).unwrap_or(&0), + ); + properties.insert( + EPropertyType::CritBattle.into(), + *properties.get(&EPropertyType::Crit.into()).unwrap_or(&0), + ); + properties.insert( + EPropertyType::CritDmgBattle.into(), + *properties.get(&EPropertyType::CritDmg.into()).unwrap_or(&0), + ); + properties.insert( + EPropertyType::PenRatioBattle.into(), + *properties.get(&EPropertyType::Pen.into()).unwrap_or(&0), + ); + properties.insert( + EPropertyType::PenDeltaBattle.into(), + *properties + .get(&EPropertyType::PenValue.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::SpRecoverBattle.into(), + *properties + .get(&EPropertyType::SpRecover.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::ElementMysteryBattle.into(), + *properties + .get(&EPropertyType::ElementMystery.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::ElementAbnormalPowerBattle.into(), + *properties + .get(&EPropertyType::ElementAbnormalPower.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::AddedDamageRatioPhysicsBattle.into(), + *properties + .get(&EPropertyType::AddedDamageRatioPhysics.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::AddedDamageRatioFireBattle.into(), + *properties + .get(&EPropertyType::AddedDamageRatioFire.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::AddedDamageRatioIceBattle.into(), + *properties + .get(&EPropertyType::AddedDamageRatioIce.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::AddedDamageRatioElecBattle.into(), + *properties + .get(&EPropertyType::AddedDamageRatioElec.into()) + .unwrap_or(&0), + ); + properties.insert( + EPropertyType::AddedDamageRatioEtherBattle.into(), + *properties + .get(&EPropertyType::AddedDamageRatioEther.into()) + .unwrap_or(&0), + ); +} diff --git a/crates/battle-server/src/server_message_handler.rs b/crates/battle-server/src/server_message_handler.rs index 3db5f28..358ac9b 100644 --- a/crates/battle-server/src/server_message_handler.rs +++ b/crates/battle-server/src/server_message_handler.rs @@ -10,7 +10,7 @@ use trigger_sv::{ net::ServerType, }; -use crate::{logic::GameState, session::BattleSession, AppState}; +use crate::{AppState, logic::GameState, session::BattleSession}; pub async fn handle_message(state: &'static AppState, packet: trigger_sv::message::NetworkPacket) { match packet.opcode { diff --git a/crates/battle-server/src/session/message.rs b/crates/battle-server/src/session/message.rs index e8b6775..8f84e24 100644 --- a/crates/battle-server/src/session/message.rs +++ b/crates/battle-server/src/session/message.rs @@ -1,5 +1,5 @@ use trigger_encoding::Decodeable; -use trigger_protocol::{util::ProtocolUnit, ClientCmdID, EndBattleCsReq}; +use trigger_protocol::{ClientCmdID, EndBattleCsReq, util::ProtocolUnit}; use trigger_sv::message::GameStateCallback; use super::BattleSession; diff --git a/crates/dispatch-server/src/main.rs b/crates/dispatch-server/src/main.rs index 3e5e847..94ab414 100644 --- a/crates/dispatch-server/src/main.rs +++ b/crates/dispatch-server/src/main.rs @@ -3,7 +3,7 @@ use std::{ sync::{LazyLock, OnceLock}, }; -use axum::{routing::get, Router}; +use axum::{Router, routing::get}; use config::DispatchConfig; use tokio::net::TcpListener; use tracing::error; diff --git a/crates/dispatch-server/src/query_dispatch.rs b/crates/dispatch-server/src/query_dispatch.rs index 33f2cb4..f4d4b9d 100644 --- a/crates/dispatch-server/src/query_dispatch.rs +++ b/crates/dispatch-server/src/query_dispatch.rs @@ -1,8 +1,8 @@ -use axum::{extract::State, Json}; +use axum::{Json, extract::State}; use crate::{ - data::{QueryDispatchRsp, ServerListInfo}, AppState, + data::{QueryDispatchRsp, ServerListInfo}, }; pub const ROUTE_ENDPOINT: &str = "/query_dispatch"; diff --git a/crates/dispatch-server/src/query_gateway.rs b/crates/dispatch-server/src/query_gateway.rs index b9bd881..3a692b5 100644 --- a/crates/dispatch-server/src/query_gateway.rs +++ b/crates/dispatch-server/src/query_gateway.rs @@ -1,20 +1,20 @@ use axum::{ + Json, extract::{Query, State}, response::IntoResponse, - Json, }; -use base64::{display::Base64Display, engine::general_purpose::STANDARD, Engine}; +use base64::{Engine, display::Base64Display, engine::general_purpose::STANDARD}; use serde::{Deserialize, Serialize, Serializer}; use tracing::debug; use trigger_cryptography::rsa; use trigger_sv::config::RsaSetting; use crate::{ + AppState, data::{ CdnConfExt, CdnDesignData, CdnGameRes, CdnSilenceData, RegionExtension, RegionSwitchFunc, ServerDispatchData, ServerGateway, }, - AppState, }; pub const ROUTE_ENDPOINT: &str = "/query_gateway"; @@ -127,7 +127,10 @@ fn internal_process( msg: String::with_capacity(0), region_name: Borrowed(&server.name), title: Borrowed(&server.title), - client_secret_key: Owned(base64::engine::general_purpose::STANDARD.encode(&state.environment.security.static_key.seed_buf)), + client_secret_key: Owned( + base64::engine::general_purpose::STANDARD + .encode(&state.environment.security.static_key.seed_buf), + ), cdn_check_url: String::with_capacity(0), gateway: Some(ServerGateway { ip: Borrowed(&server.addr), @@ -139,20 +142,32 @@ fn internal_process( cdn_conf_ext: Some(CdnConfExt { // TODO: unhardcode this design_data: CdnDesignData { - base_url: Borrowed("https://autopatchcn.juequling.com/design_data/beta_live/output_7054632_323d17319c/client/"), + base_url: Borrowed( + "https://autopatchcn.juequling.com/design_data/beta_live/output_7054632_323d17319c/client/", + ), data_revision: Borrowed("7054632"), - md5_files: Borrowed(r#"[{"fileName": "data_version", "fileSize": 4503, "fileMD5": "419987357302147246"}]"#), + md5_files: Borrowed( + r#"[{"fileName": "data_version", "fileSize": 4503, "fileMD5": "419987357302147246"}]"#, + ), }, game_res: CdnGameRes { audio_revision: Borrowed("7025371"), - base_url: Borrowed("https://autopatchcn.juequling.com/game_res/beta_live/output_7054632_323d17319c/client/"), + base_url: Borrowed( + "https://autopatchcn.juequling.com/game_res/beta_live/output_7054632_323d17319c/client/", + ), branch: Borrowed("beta_live"), - md5_files: Borrowed(r#"[{"fileName": "res_version", "fileSize": 2379030, "fileMD5": "15840336186912297231"}, {"fileName": "audio_version", "fileSize": 30435, "fileMD5": "15675397132378459243"}, {"fileName": "base_revision", "fileSize": 18, "fileMD5": "18079377284431001248"}]"#), + md5_files: Borrowed( + r#"[{"fileName": "res_version", "fileSize": 2379030, "fileMD5": "15840336186912297231"}, {"fileName": "audio_version", "fileSize": 30435, "fileMD5": "15675397132378459243"}, {"fileName": "base_revision", "fileSize": 18, "fileMD5": "18079377284431001248"}]"#, + ), res_revision: Borrowed("7054632"), }, silence_data: CdnSilenceData { - base_url: Borrowed("https://autopatchcn.juequling.com/design_data/beta_live/output_7054632_323d17319c/client_silence/"), - md5_files: Borrowed(r#"[{"fileName": "silence_version", "fileSize": 647, "fileMD5": "15019531890587528788"}]"#), + base_url: Borrowed( + "https://autopatchcn.juequling.com/design_data/beta_live/output_7054632_323d17319c/client_silence/", + ), + md5_files: Borrowed( + r#"[{"fileName": "silence_version", "fileSize": 647, "fileMD5": "15019531890587528788"}]"#, + ), silence_revision: Borrowed("7042559"), }, pre_download: None, @@ -174,7 +189,7 @@ fn internal_process( url_check_nap: String::new(), url_check_sdk: String::new(), }), - } + }, }) } diff --git a/crates/game-server/src/logic/gm_util.rs b/crates/game-server/src/logic/gm_util.rs index 3ac2c56..833ffc5 100644 --- a/crates/game-server/src/logic/gm_util.rs +++ b/crates/game-server/src/logic/gm_util.rs @@ -1,11 +1,11 @@ use tracing::{debug, warn}; use trigger_logic::quest::EQuestType; -use trigger_protocol::{util::ProtocolUnit, AvatarSync, CafeSync, ItemSync, PlayerSyncScNotify}; +use trigger_protocol::{AvatarSync, CafeSync, ItemSync, PlayerSyncScNotify, util::ProtocolUnit}; use trigger_sv::gm_command::GMCommand; use crate::AppState; -use super::{player::AvatarPropertyChanges, NapPlayer}; +use super::{NapPlayer, player::AvatarPropertyChanges}; pub struct CommandContext<'player> { pub player: &'player mut NapPlayer, diff --git a/crates/game-server/src/logic/player/mod.rs b/crates/game-server/src/logic/player/mod.rs index 43d6ee9..feb50c1 100644 --- a/crates/game-server/src/logic/player/mod.rs +++ b/crates/game-server/src/logic/player/mod.rs @@ -6,7 +6,7 @@ use quest::QuestModel; use ramen::RamenModel; use role::RoleModel; use scene::SceneModel; -use trigger_database::{entity::*, prelude::*, DatabaseConnection}; +use trigger_database::{DatabaseConnection, entity::*, prelude::*}; use trigger_fileconfig::NapFileCfg; use trigger_logic::scene::ESceneType; use trigger_protocol::PlayerBasicInfo; diff --git a/crates/game-server/src/logic/player/player_util.rs b/crates/game-server/src/logic/player/player_util.rs index 13e85ab..c1a4845 100644 --- a/crates/game-server/src/logic/player/player_util.rs +++ b/crates/game-server/src/logic/player/player_util.rs @@ -1,6 +1,6 @@ +use trigger_database::DatabaseConnection; use trigger_database::entity::*; use trigger_database::prelude::*; -use trigger_database::DatabaseConnection; pub async fn load_player_basic_info( db: &DatabaseConnection, diff --git a/crates/game-server/src/main.rs b/crates/game-server/src/main.rs index ffb9b25..a66451b 100644 --- a/crates/game-server/src/main.rs +++ b/crates/game-server/src/main.rs @@ -12,7 +12,7 @@ use tracing::{error, info}; use trigger_database::DatabaseConnection; use trigger_fileconfig::NapFileCfg; use trigger_sv::{ - config::{load_json_config, ServerEnvironmentConfiguration, TomlConfig}, + config::{ServerEnvironmentConfiguration, TomlConfig, load_json_config}, die, logging, net::{ServerNetworkManager, ServerType}, print_banner, diff --git a/crates/game-server/src/server_message_handler.rs b/crates/game-server/src/server_message_handler.rs index 8642297..95fcabd 100644 --- a/crates/game-server/src/server_message_handler.rs +++ b/crates/game-server/src/server_message_handler.rs @@ -1,9 +1,9 @@ use std::sync::Arc; use crate::{ - logic::{gm_util, NapPlayer}, - session::GameSession, AppState, + logic::{NapPlayer, gm_util}, + session::GameSession, }; use tokio::sync::Mutex; use tracing::{debug, info, warn}; diff --git a/crates/game-server/src/session/message/mod.rs b/crates/game-server/src/session/message/mod.rs index 6154be1..ed57d96 100644 --- a/crates/game-server/src/session/message/mod.rs +++ b/crates/game-server/src/session/message/mod.rs @@ -1,5 +1,5 @@ use trigger_encoding::Encodeable; -use trigger_protocol::{util::ProtocolUnit, ClientCmdID}; +use trigger_protocol::{ClientCmdID, util::ProtocolUnit}; use super::GameSession; use crate::AppState; diff --git a/crates/game-server/src/session/mod.rs b/crates/game-server/src/session/mod.rs index d1bdc59..15a9c82 100644 --- a/crates/game-server/src/session/mod.rs +++ b/crates/game-server/src/session/mod.rs @@ -15,7 +15,7 @@ use trigger_sv::{ net::{ServerNetworkManager, ServerType}, }; -use crate::logic::{scene_util, NapPlayer}; +use crate::logic::{NapPlayer, scene_util}; pub mod message; diff --git a/crates/gate-server/src/handlers/client.rs b/crates/gate-server/src/handlers/client.rs index 65f7d59..2fb0eef 100644 --- a/crates/gate-server/src/handlers/client.rs +++ b/crates/gate-server/src/handlers/client.rs @@ -12,10 +12,10 @@ use trigger_sv::{ }; use crate::{ + AppState, net::{Connection, NetPacket}, session::SessionState, util::BinExt, - AppState, }; pub async fn handle_message(connection: &Connection, state: &'static AppState, packet: NetPacket) { @@ -41,20 +41,33 @@ pub async fn handle_message(connection: &Connection, state: &'static AppState, p on_keep_alive( connection, state, - KeepAliveNotify::decode(&*packet.body).unwrap_or_default() - ).await + KeepAliveNotify::decode(&*packet.body).unwrap_or_default(), + ) + .await } cmd_id if connection.session.is_logged_in() => { match trigger_protobuf::pb_to_common_protocol_unit(cmd_id, &packet.body) { - Ok(Some(unit)) => state.network_mgr.send_to(ServerType::GameServer, 0, ForwardClientProtocolMessage { - session_id: connection.session.id, - request_id: head.packet_id, - message: unit, - }).await, + Ok(Some(unit)) => { + state + .network_mgr + .send_to( + ServerType::GameServer, + 0, + ForwardClientProtocolMessage { + session_id: connection.session.id, + request_id: head.packet_id, + message: unit, + }, + ) + .await + } Ok(None) => warn!("ignoring message with unknown cmd_id: {cmd_id}"), Err(err) => error!( "failed to decode a message with cmd_id: {} from {} (player_uid: {}), error: {}", - cmd_id, connection.addr(), connection.session.player_uid(), err + cmd_id, + connection.addr(), + connection.session.player_uid(), + err ), } } diff --git a/crates/gate-server/src/message_handler.rs b/crates/gate-server/src/message_handler.rs index ab38c2f..712ba6f 100644 --- a/crates/gate-server/src/message_handler.rs +++ b/crates/gate-server/src/message_handler.rs @@ -1,7 +1,7 @@ use tokio::sync::mpsc; use tracing::warn; -use crate::{net::NetPacket, AppState}; +use crate::{AppState, net::NetPacket}; #[derive(Clone)] pub struct MessageHandler(mpsc::UnboundedSender<(u64, NetPacket)>); diff --git a/crates/gate-server/src/net/connection.rs b/crates/gate-server/src/net/connection.rs index b0567a8..b0ea1ce 100644 --- a/crates/gate-server/src/net/connection.rs +++ b/crates/gate-server/src/net/connection.rs @@ -2,8 +2,8 @@ use std::{ io, net::SocketAddr, sync::{ - atomic::{AtomicU32, Ordering::SeqCst}, Arc, OnceLock, + atomic::{AtomicU32, Ordering::SeqCst}, }, time::Duration, }; diff --git a/crates/gate-server/src/net/packet.rs b/crates/gate-server/src/net/packet.rs index bd63a61..c9dc870 100644 --- a/crates/gate-server/src/net/packet.rs +++ b/crates/gate-server/src/net/packet.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use byteorder::{WriteBytesExt, BE}; +use byteorder::{BE, WriteBytesExt}; use trigger_protobuf::PacketHead; pub struct NetPacket { diff --git a/crates/gate-server/src/net/tcp_gateway.rs b/crates/gate-server/src/net/tcp_gateway.rs index 13a6562..4a1c59f 100644 --- a/crates/gate-server/src/net/tcp_gateway.rs +++ b/crates/gate-server/src/net/tcp_gateway.rs @@ -3,7 +3,7 @@ use std::{io, net::SocketAddr}; use tokio::net::TcpListener; use tracing::info; -use crate::{message_handler::MessageHandler, AppState}; +use crate::{AppState, message_handler::MessageHandler}; pub async fn serve( addr: SocketAddr, diff --git a/crates/gate-server/src/session/mod.rs b/crates/gate-server/src/session/mod.rs index dfe9f88..8370d58 100644 --- a/crates/gate-server/src/session/mod.rs +++ b/crates/gate-server/src/session/mod.rs @@ -1,6 +1,6 @@ use std::sync::{ - atomic::{AtomicI64, Ordering::SeqCst}, OnceLock, + atomic::{AtomicI64, Ordering::SeqCst}, }; use atomic_enum::atomic_enum; diff --git a/crates/hall-server/src/logic/ecs/event_graph.rs b/crates/hall-server/src/logic/ecs/event_graph.rs index 691d917..7ce137e 100644 --- a/crates/hall-server/src/logic/ecs/event_graph.rs +++ b/crates/hall-server/src/logic/ecs/event_graph.rs @@ -107,6 +107,6 @@ use trigger_protocol::{ }; use trigger_sv::message::GameStateCallback; -use crate::logic::{message::RunEventGraphEvent, GameStateListener}; +use crate::logic::{GameStateListener, message::RunEventGraphEvent}; use super::scene_unit::{InteractContainer, SceneUnitTag}; diff --git a/crates/hall-server/src/logic/ecs/hall.rs b/crates/hall-server/src/logic/ecs/hall.rs index 5b969a5..f4e37c8 100644 --- a/crates/hall-server/src/logic/ecs/hall.rs +++ b/crates/hall-server/src/logic/ecs/hall.rs @@ -1,6 +1,6 @@ use bevy_ecs::{prelude::*, query::QueryData}; use tracing::warn; -use trigger_fileconfig::{main_city_script::MainCityConfig, NapFileCfg}; +use trigger_fileconfig::{NapFileCfg, main_city_script::MainCityConfig}; use crate::logic::save::HallSceneSaveData; diff --git a/crates/hall-server/src/logic/ecs/interaction.rs b/crates/hall-server/src/logic/ecs/interaction.rs index ce06f58..a6efe09 100644 --- a/crates/hall-server/src/logic/ecs/interaction.rs +++ b/crates/hall-server/src/logic/ecs/interaction.rs @@ -3,13 +3,13 @@ use tracing::{debug, warn}; use trigger_protocol::InteractWithUnitScRsp; use trigger_sv::message::GameStateCallback; -use crate::logic::{message::InteractWithUnitEvent, GameStateListener}; +use crate::logic::{GameStateListener, message::InteractWithUnitEvent}; use super::{ + NapResources, event_graph::{ActionChangeInteractCfgEvent, EventGraph, GraphEvent}, hall::MainCitySection, scene_unit::{InteractContainer, SceneUnitTag}, - NapResources, }; pub fn tick_change_interact( diff --git a/crates/hall-server/src/logic/ecs/mod.rs b/crates/hall-server/src/logic/ecs/mod.rs index 5489963..cf15a10 100644 --- a/crates/hall-server/src/logic/ecs/mod.rs +++ b/crates/hall-server/src/logic/ecs/mod.rs @@ -8,11 +8,11 @@ use scene::PlayerEnterScene; use trigger_fileconfig::main_city_script::MainCityConfig; use super::{ + GameStateListener, message::{ EnterSectionEvent, InteractWithUnitEvent, PlayerMoveEvent, RunEventGraphEvent, SwitchRoleEvent, }, - GameStateListener, }; pub mod event_graph; diff --git a/crates/hall-server/src/logic/ecs/scene_save.rs b/crates/hall-server/src/logic/ecs/scene_save.rs index 0472316..f365e7b 100644 --- a/crates/hall-server/src/logic/ecs/scene_save.rs +++ b/crates/hall-server/src/logic/ecs/scene_save.rs @@ -1,8 +1,8 @@ use bevy_ecs::prelude::*; use crate::logic::{ - save::{HallSceneSaveData, MainCityPositionSave}, GameStateListener, + save::{HallSceneSaveData, MainCityPositionSave}, }; use super::{ diff --git a/crates/hall-server/src/logic/listener.rs b/crates/hall-server/src/logic/listener.rs index e9bc224..ec291a3 100644 --- a/crates/hall-server/src/logic/listener.rs +++ b/crates/hall-server/src/logic/listener.rs @@ -1,6 +1,6 @@ use bevy_ecs::system::Resource; use trigger_encoding::Encodeable; -use trigger_protocol::{util::ProtocolUnit, ClientCmdID}; +use trigger_protocol::{ClientCmdID, util::ProtocolUnit}; use trigger_sv::{ message::{GameStateCallback, GameStateCallbackMessage}, net::{ServerNetworkManager, ServerType}, diff --git a/crates/hall-server/src/logic/message.rs b/crates/hall-server/src/logic/message.rs index 8efdb13..e072baa 100644 --- a/crates/hall-server/src/logic/message.rs +++ b/crates/hall-server/src/logic/message.rs @@ -2,8 +2,8 @@ use bevy_ecs::event::Event; use trigger_encoding::Decodeable; use trigger_logic::scene::Transform; use trigger_protocol::{ - util::ProtocolUnit, ClientCmdID, EnterSectionCsReq, InteractWithUnitCsReq, RunEventGraphCsReq, - SavePosInMainCityCsReq, SwitchRoleCsReq, + ClientCmdID, EnterSectionCsReq, InteractWithUnitCsReq, RunEventGraphCsReq, + SavePosInMainCityCsReq, SwitchRoleCsReq, util::ProtocolUnit, }; use super::ecs::NapEcs; diff --git a/crates/hall-server/src/logic/mod.rs b/crates/hall-server/src/logic/mod.rs index 546121c..efa57ca 100644 --- a/crates/hall-server/src/logic/mod.rs +++ b/crates/hall-server/src/logic/mod.rs @@ -1,6 +1,6 @@ use std::{collections::HashMap, sync::mpsc, thread}; -use ecs::{scene::PlayerEnterScene, NapEcs}; +use ecs::{NapEcs, scene::PlayerEnterScene}; use message::ProtocolEventHandler; use tracing::debug; use trigger_protocol::util::ProtocolUnit; @@ -11,8 +11,8 @@ mod listener; mod message; pub mod save; -pub use ecs::hall::HallInitData; pub use ecs::NapResources; +pub use ecs::hall::HallInitData; pub use listener::GameStateListener; #[derive(Clone)] diff --git a/crates/hall-server/src/main.rs b/crates/hall-server/src/main.rs index c9c71c1..75ca39d 100644 --- a/crates/hall-server/src/main.rs +++ b/crates/hall-server/src/main.rs @@ -8,9 +8,9 @@ use dashmap::DashMap; use logic::{GameRunner, NapResources}; use session::HallSession; use tracing::{error, info}; -use trigger_fileconfig::{main_city_script::MainCityConfig, NapFileCfg}; +use trigger_fileconfig::{NapFileCfg, main_city_script::MainCityConfig}; use trigger_sv::{ - config::{load_json_config, ServerEnvironmentConfiguration, TomlConfig}, + config::{ServerEnvironmentConfiguration, TomlConfig, load_json_config}, die, logging, net::{ServerNetworkManager, ServerType}, print_banner, diff --git a/crates/hall-server/src/server_message_handler.rs b/crates/hall-server/src/server_message_handler.rs index 721f8b6..530ee79 100644 --- a/crates/hall-server/src/server_message_handler.rs +++ b/crates/hall-server/src/server_message_handler.rs @@ -5,9 +5,9 @@ use trigger_sv::message::{ }; use crate::{ + AppState, logic::{GameStateListener, HallInitData}, session::HallSession, - AppState, }; pub async fn handle_message(state: &'static AppState, packet: trigger_sv::message::NetworkPacket) { diff --git a/crates/muip-server/src/http_server.rs b/crates/muip-server/src/http_server.rs index 5e4f664..3cd4c96 100644 --- a/crates/muip-server/src/http_server.rs +++ b/crates/muip-server/src/http_server.rs @@ -1,9 +1,9 @@ use std::borrow::Cow; use axum::{ + Json, Router, extract::{Query, State}, routing::get, - Json, Router, }; use serde::{Deserialize, Serialize}; use tokio::net::TcpListener; @@ -64,7 +64,7 @@ async fn gm_api( return Json(Response { retcode: 2, message: Some(Cow::Owned(format!("invalid command format: {err}"))), - }) + }); } }; diff --git a/crates/trigger-codegen/src/commands.rs b/crates/trigger-codegen/src/commands.rs index 491ae90..0af7d3a 100644 --- a/crates/trigger-codegen/src/commands.rs +++ b/crates/trigger-codegen/src/commands.rs @@ -1,8 +1,8 @@ use proc_macro2::TokenStream; use quote::quote; use syn::{ - parse_macro_input, Data, DeriveInput, Field, Fields, GenericArgument, PathArguments, Type, - TypePath, + Data, DeriveInput, Field, Fields, GenericArgument, PathArguments, Type, TypePath, + parse_macro_input, }; pub fn impl_gm_input(input: proc_macro::TokenStream) -> proc_macro::TokenStream { @@ -114,7 +114,7 @@ pub fn impl_gm_input(input: proc_macro::TokenStream) -> proc_macro::TokenStream fn from_str(input: &str) -> Result { use GMInputParseError::*; - static CMD_TYPE_MAP: ::std::sync::LazyLock<::std::collections::HashMap<&'static str, #internal_enum_name>> = + static CMD_TYPE_MAP: ::std::sync::LazyLock<::std::collections::HashMap<&'static str, #internal_enum_name>> = ::std::sync::LazyLock::new(|| ::std::collections::HashMap::from([#internal_enum_mapping])); let mut data = input.split(' '); @@ -165,4 +165,3 @@ fn get_field_sub_type(field: &Field) -> String { _ => panic!("Unsupported field type"), } } - diff --git a/crates/trigger-codegen/src/decodeable.rs b/crates/trigger-codegen/src/decodeable.rs index ef4e455..30f5144 100644 --- a/crates/trigger-codegen/src/decodeable.rs +++ b/crates/trigger-codegen/src/decodeable.rs @@ -1,6 +1,6 @@ use proc_macro2::TokenStream; use quote::quote; -use syn::{parse_macro_input, Data, DeriveInput, Fields, Ident}; +use syn::{Data, DeriveInput, Fields, Ident, parse_macro_input}; pub fn impl_decodeable(item: proc_macro::TokenStream) -> proc_macro::TokenStream { let input = parse_macro_input!(item as DeriveInput); diff --git a/crates/trigger-codegen/src/encodeable.rs b/crates/trigger-codegen/src/encodeable.rs index 3acf515..fb3ca75 100644 --- a/crates/trigger-codegen/src/encodeable.rs +++ b/crates/trigger-codegen/src/encodeable.rs @@ -1,6 +1,6 @@ use proc_macro2::TokenStream; use quote::quote; -use syn::{parse_macro_input, Data, DeriveInput, Fields, Ident}; +use syn::{Data, DeriveInput, Fields, Ident, parse_macro_input}; pub fn impl_encodeable(item: proc_macro::TokenStream) -> proc_macro::TokenStream { let input = parse_macro_input!(item as DeriveInput); diff --git a/crates/trigger-codegen/src/handler_module_attribute.rs b/crates/trigger-codegen/src/handler_module_attribute.rs index 257c482..fce3476 100644 --- a/crates/trigger-codegen/src/handler_module_attribute.rs +++ b/crates/trigger-codegen/src/handler_module_attribute.rs @@ -1,6 +1,6 @@ use proc_macro2::TokenStream; -use quote::{quote, ToTokens}; -use syn::{parse_macro_input, FnArg, Item, ItemMod, ReturnType}; +use quote::{ToTokens, quote}; +use syn::{FnArg, Item, ItemMod, ReturnType, parse_macro_input}; pub fn imp(input: proc_macro::TokenStream) -> proc_macro::TokenStream { const INVALID_FUNCTION_SIGNATURE_MSG: &str = "functions in message handler module should have following signature: fn(&mut MessageContext<'_>, CsReq) -> ScRsp"; diff --git a/crates/trigger-codegen/src/lib.rs b/crates/trigger-codegen/src/lib.rs index 815f5e3..8d53e37 100644 --- a/crates/trigger-codegen/src/lib.rs +++ b/crates/trigger-codegen/src/lib.rs @@ -1,6 +1,6 @@ use proc_macro::TokenStream; -use quote::{quote, ToTokens}; -use syn::{parse_macro_input, DeriveInput, Meta, MetaList}; +use quote::{ToTokens, quote}; +use syn::{DeriveInput, Meta, MetaList, parse_macro_input}; mod commands; mod decodeable; diff --git a/crates/trigger-cryptography/src/mhy/aes.rs b/crates/trigger-cryptography/src/mhy/aes.rs index c9c2d14..894dea4 100644 --- a/crates/trigger-cryptography/src/mhy/aes.rs +++ b/crates/trigger-cryptography/src/mhy/aes.rs @@ -1,7 +1,7 @@ #![allow(unused)] use super::tables::{ - LOOKUP_G11, LOOKUP_G13, LOOKUP_G14, LOOKUP_G2, LOOKUP_G3, LOOKUP_G9, LOOKUP_RCON, LOOKUP_SBOX, + LOOKUP_G2, LOOKUP_G3, LOOKUP_G9, LOOKUP_G11, LOOKUP_G13, LOOKUP_G14, LOOKUP_RCON, LOOKUP_SBOX, LOOKUP_SBOX_INV, SHIFT_ROWS_TABLE, SHIFT_ROWS_TABLE_INV, }; diff --git a/crates/trigger-cryptography/src/rsa.rs b/crates/trigger-cryptography/src/rsa.rs index ae09363..23c447c 100644 --- a/crates/trigger-cryptography/src/rsa.rs +++ b/crates/trigger-cryptography/src/rsa.rs @@ -1,6 +1,6 @@ use rsa::{ - pkcs1v15::SigningKey, sha2::Sha256, signature::RandomizedSigner, Pkcs1v15Encrypt, - RsaPrivateKey, RsaPublicKey, + Pkcs1v15Encrypt, RsaPrivateKey, RsaPublicKey, pkcs1v15::SigningKey, sha2::Sha256, + signature::RandomizedSigner, }; const RSA_CHUNK_SIZE: usize = 117; diff --git a/crates/trigger-database/src/lib.rs b/crates/trigger-database/src/lib.rs index 5082333..ab34cbb 100644 --- a/crates/trigger-database/src/lib.rs +++ b/crates/trigger-database/src/lib.rs @@ -10,10 +10,10 @@ pub use sea_orm::DbErr; use tracing::error; pub mod prelude { - pub use sea_orm::entity::prelude::*; - pub use sea_orm::entity::ActiveValue::*; - pub use sea_orm::query::Condition; pub use sea_orm::TransactionTrait; + pub use sea_orm::entity::ActiveValue::*; + pub use sea_orm::entity::prelude::*; + pub use sea_orm::query::Condition; } #[derive(Debug, Deserialize)] diff --git a/crates/trigger-encoding/src/lib.rs b/crates/trigger-encoding/src/lib.rs index 15982ee..48c3d36 100644 --- a/crates/trigger-encoding/src/lib.rs +++ b/crates/trigger-encoding/src/lib.rs @@ -1,4 +1,4 @@ -use byteorder::{ReadBytesExt, WriteBytesExt, BE}; +use byteorder::{BE, ReadBytesExt, WriteBytesExt}; use std::collections::HashMap; use std::io::{self, Read, Write}; diff --git a/crates/trigger-fileconfig/fbs/tables.fbs b/crates/trigger-fileconfig/fbs/tables.fbs index 7d667b6..204e452 100644 --- a/crates/trigger-fileconfig/fbs/tables.fbs +++ b/crates/trigger-fileconfig/fbs/tables.fbs @@ -215,17 +215,32 @@ table EquipmentSuitTemplate { id: int; name: string; primary_condition: int; - primary_suit_propertys: [Property]; + unk_3: int; primary_suit_ability: int; primary_description: string; secondary_condition: int; - secondary_suit_propertys: [Property]; + unk_7: int; secondary_suit_ability: int; secondary_description: string; - suit_item_icon: string; + suit_icon: string; suit_story: string; suit_filter_option: string; - suit_icon: string; + suit_item_icon: string; + unk_14: int; + order: int; + unk_16: int; + unk_17: int; + unk_18: int; + unk_19: int; + unk_20: int; + unk_21: int; + primary_suit_propertys: [Property]; + unk_23: [int]; + unk_24: int; + unk_25: [int]; + unk_26: [int]; + unk_27: [int]; + tag: string; } table HollowConfigTemplate { @@ -380,6 +395,160 @@ table ConditionConfigTemplate { type: int; } +table AvatarBattleTemplate { + id: int; + unk_1: [int]; + unk_2: [int]; + unk_3: [int]; + unk_4: [int]; + unk_5: [int]; + unk_6: [int]; + unk_7: [int]; + unk_8: int; + unk_9: int; + unk_10: int; + avatar_piece_id: int; + unk_12: int; + unk_13: int; + hp_max: int; + health_growth: int; + unk_16: int; + unk_17: int; + unk_18: int; + unk_19: int; + unk_20: int; + attack: int; + attack_growth: int; + defence: int; + defence_growth: int; + crit: int; + crit_damage: int; + crit_res: int; + crit_damage_res: int; + pen_rate: int; + pen_delta: int; + luck: int; + stun: int; + break_stun: int; + element_abnormal_power: int; + sp_bar_point: int; + sp_recover: int; + element_mystery: int; + rbl: int; + rbl_correction_factor: int; + rbl_probability: int; + unk_41: int; + unk_42: int; + unk_43: int; + unk_44: int; + unk_45: int; + unk_46: int; + unk_47: int; + unk_48: int; + unk_49: int; + unk_50: int; + unk_51: int; + unk_52: int; + unk_53: int; + unk_54: int; + unk_55: int; + unk_56: int; + unk_57: int; + unk_58: int; + unk_59: int; + unk_60: int; + unk_61: int; + unk_62: int; + unk_63: int; + unk_64: int; + unk_65: int; + unk_66: int; + tags: [string]; + unk_68: [int]; + unk_69: [int]; + unk_70: int; + unk_71: int; + element: [int]; + hit_type: [int]; + unk_element_camp: [string]; + unk_75: int; + unk_76: short; +} + +table AvatarLevelAdvanceTemplate { + avatar_id: int; + id: int; + min_level: int; + max_level: int; + hp_max: int; + unk_5: int; + unk_6: int; + attack: int; + defence: int; + unk_9: int; + unk_10: int; + unk_11: int; + unk_12: int; + unk_13: int; + unk_14: int; + unk_15: int; + unk_16: int; + unk_17: int; + unk_18: [int]; + promotion_costs: [RefineCost]; +} + +table WeaponLevelTemplate { + rarity: int; + level: int; + rate: int; + exp: int; +} + +table WeaponStarTemplate { + rarity: int; + star: int; + min_level: int; + max_level: int; + star_rate: int; + rand_rate: int; + unk_6: int; + unk_7: int; + unk_8: int; + unk_9: int; + unk_10: int; + unk_11: int; + unk_12: int; +} + +table AvatarPassiveSkillTemplate { + skill_id: int; + avatar_id: int; + min_avatar_level: int; + min_passive_skill_level: int; + unlock_passive_skill_level: int; + unk_5: int; + unk_levelup: string; + unk_7: int; + unk_8: int; + unk_9: int; + unk_10: int; + propertys: [Property]; + names: [string]; + descriptions: [string]; + materials_costs: [RefineCost]; +} + +table EquipmentLevelTemplate { + rarity: int; + level: int; + property_rate: int; + unk_3: int; + unk_4: int; + unk_5: int; + unk_6: int; +} + table AvatarBaseTemplateTb { data: [AvatarBaseTemplate]; } @@ -451,3 +620,27 @@ table TeleportConfigTemplateTb { table ConditionConfigTemplateTb { data: [ConditionConfigTemplate]; } + +table AvatarBattleTemplateTb { + data: [AvatarBattleTemplate]; +} + +table AvatarLevelAdvanceTemplateTb { + data: [AvatarLevelAdvanceTemplate]; +} + +table WeaponLevelTemplateTb { + data: [WeaponLevelTemplate]; +} + +table WeaponStarTemplateTb { + data: [WeaponStarTemplate]; +} + +table AvatarPassiveSkillTemplateTb { + data: [AvatarPassiveSkillTemplate]; +} + +table EquipmentLevelTemplateTb { + data: [EquipmentLevelTemplate]; +} \ No newline at end of file diff --git a/crates/trigger-fileconfig/gen_flatbuffers/tables_generated.rs b/crates/trigger-fileconfig/gen_flatbuffers/tables_generated.rs index 43c5f57..4332905 100644 --- a/crates/trigger-fileconfig/gen_flatbuffers/tables_generated.rs +++ b/crates/trigger-fileconfig/gen_flatbuffers/tables_generated.rs @@ -1,10 +1,9 @@ // automatically generated by the FlatBuffers compiler, do not modify - // @generated -use core::mem; use core::cmp::Ordering; +use core::mem; extern crate flatbuffers; use self::flatbuffers::{EndianScalar, Follow}; @@ -13,40 +12,43 @@ use self::flatbuffers::{EndianScalar, Follow}; #[repr(transparent)] #[derive(Clone, Copy, PartialEq)] pub struct Property(pub [u8; 8]); -impl Default for Property { - fn default() -> Self { - Self([0; 8]) - } +impl Default for Property { + fn default() -> Self { + Self([0; 8]) + } } impl core::fmt::Debug for Property { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("Property") - .field("property", &self.property()) - .field("value", &self.value()) - .finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("Property") + .field("property", &self.property()) + .field("value", &self.value()) + .finish() + } } impl flatbuffers::SimpleToVerifyInSlice for Property {} impl<'a> flatbuffers::Follow<'a> for Property { - type Inner = &'a Property; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - <&'a Property>::follow(buf, loc) - } + type Inner = &'a Property; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + <&'a Property>::follow(buf, loc) + } } impl<'a> flatbuffers::Follow<'a> for &'a Property { - type Inner = &'a Property; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - flatbuffers::follow_cast_ref::(buf, loc) - } + type Inner = &'a Property; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + flatbuffers::follow_cast_ref::(buf, loc) + } } impl<'b> flatbuffers::Push for Property { type Output = Property; #[inline] unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - let src = ::core::slice::from_raw_parts(self as *const Property as *const u8, ::size()); + let src = ::core::slice::from_raw_parts( + self as *const Property as *const u8, + ::size(), + ); dst.copy_from_slice(src); } #[inline] @@ -56,125 +58,125 @@ impl<'b> flatbuffers::Push for Property { } impl<'a> flatbuffers::Verifiable for Property { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.in_buffer::(pos) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.in_buffer::(pos) + } } impl<'a> Property { - #[allow(clippy::too_many_arguments)] - pub fn new( - property: i32, - value: i32, - ) -> Self { - let mut s = Self([0; 8]); - s.set_property(property); - s.set_value(value); - s - } - - pub fn property(&self) -> i32 { - let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_property(&mut self, x: i32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); + #[allow(clippy::too_many_arguments)] + pub fn new(property: i32, value: i32) -> Self { + let mut s = Self([0; 8]); + s.set_property(property); + s.set_value(value); + s } - } - pub fn value(&self) -> i32 { - let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[4..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_value(&mut self, x: i32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[4..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); + pub fn property(&self) -> i32 { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) } - } + pub fn set_property(&mut self, x: i32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + + pub fn value(&self) -> i32 { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[4..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_value(&mut self, x: i32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[4..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } } // struct RefineCost, aligned to 4 #[repr(transparent)] #[derive(Clone, Copy, PartialEq)] pub struct RefineCost(pub [u8; 8]); -impl Default for RefineCost { - fn default() -> Self { - Self([0; 8]) - } +impl Default for RefineCost { + fn default() -> Self { + Self([0; 8]) + } } impl core::fmt::Debug for RefineCost { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("RefineCost") - .field("item_id", &self.item_id()) - .field("number", &self.number()) - .finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("RefineCost") + .field("item_id", &self.item_id()) + .field("number", &self.number()) + .finish() + } } impl flatbuffers::SimpleToVerifyInSlice for RefineCost {} impl<'a> flatbuffers::Follow<'a> for RefineCost { - type Inner = &'a RefineCost; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - <&'a RefineCost>::follow(buf, loc) - } + type Inner = &'a RefineCost; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + <&'a RefineCost>::follow(buf, loc) + } } impl<'a> flatbuffers::Follow<'a> for &'a RefineCost { - type Inner = &'a RefineCost; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - flatbuffers::follow_cast_ref::(buf, loc) - } + type Inner = &'a RefineCost; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + flatbuffers::follow_cast_ref::(buf, loc) + } } impl<'b> flatbuffers::Push for RefineCost { type Output = RefineCost; #[inline] unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - let src = ::core::slice::from_raw_parts(self as *const RefineCost as *const u8, ::size()); + let src = ::core::slice::from_raw_parts( + self as *const RefineCost as *const u8, + ::size(), + ); dst.copy_from_slice(src); } #[inline] @@ -184,250 +186,340 @@ impl<'b> flatbuffers::Push for RefineCost { } impl<'a> flatbuffers::Verifiable for RefineCost { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.in_buffer::(pos) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.in_buffer::(pos) + } } impl<'a> RefineCost { - #[allow(clippy::too_many_arguments)] - pub fn new( - item_id: i32, - number: i32, - ) -> Self { - let mut s = Self([0; 8]); - s.set_item_id(item_id); - s.set_number(number); - s - } - - pub fn item_id(&self) -> i32 { - let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_item_id(&mut self, x: i32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); + #[allow(clippy::too_many_arguments)] + pub fn new(item_id: i32, number: i32) -> Self { + let mut s = Self([0; 8]); + s.set_item_id(item_id); + s.set_number(number); + s } - } - pub fn number(&self) -> i32 { - let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - EndianScalar::from_little_endian(unsafe { - core::ptr::copy_nonoverlapping( - self.0[4..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::<::Scalar>(), - ); - mem.assume_init() - }) - } - - pub fn set_number(&mut self, x: i32) { - let x_le = x.to_little_endian(); - // Safety: - // Created from a valid Table for this object - // Which contains a valid value in this slot - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const _ as *const u8, - self.0[4..].as_mut_ptr(), - core::mem::size_of::<::Scalar>(), - ); + pub fn item_id(&self) -> i32 { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) } - } + pub fn set_item_id(&mut self, x: i32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } + + pub fn number(&self) -> i32 { + let mut mem = core::mem::MaybeUninit::<::Scalar>::uninit(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + EndianScalar::from_little_endian(unsafe { + core::ptr::copy_nonoverlapping( + self.0[4..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::<::Scalar>(), + ); + mem.assume_init() + }) + } + + pub fn set_number(&mut self, x: i32) { + let x_le = x.to_little_endian(); + // Safety: + // Created from a valid Table for this object + // Which contains a valid value in this slot + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const _ as *const u8, + self.0[4..].as_mut_ptr(), + core::mem::size_of::<::Scalar>(), + ); + } + } } pub enum AvatarBaseTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct AvatarBaseTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for AvatarBaseTemplate<'a> { - type Inner = AvatarBaseTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = AvatarBaseTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> AvatarBaseTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_CODE_NAME: flatbuffers::VOffsetT = 6; - pub const VT_NAME: flatbuffers::VOffsetT = 8; - pub const VT_FULL_NAME: flatbuffers::VOffsetT = 10; - pub const VT_AUDIO_EVENT_REPLACE_PARAM: flatbuffers::VOffsetT = 12; - pub const VT_AUDIO_BANK: flatbuffers::VOffsetT = 14; - pub const VT_HIT_TYPES: flatbuffers::VOffsetT = 16; - pub const VT_ELEMENT_TYPES: flatbuffers::VOffsetT = 18; - pub const VT_UNK_1: flatbuffers::VOffsetT = 20; - pub const VT_GENDER: flatbuffers::VOffsetT = 22; - pub const VT_CAMP: flatbuffers::VOffsetT = 24; - pub const VT_UNK_2: flatbuffers::VOffsetT = 26; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_CODE_NAME: flatbuffers::VOffsetT = 6; + pub const VT_NAME: flatbuffers::VOffsetT = 8; + pub const VT_FULL_NAME: flatbuffers::VOffsetT = 10; + pub const VT_AUDIO_EVENT_REPLACE_PARAM: flatbuffers::VOffsetT = 12; + pub const VT_AUDIO_BANK: flatbuffers::VOffsetT = 14; + pub const VT_HIT_TYPES: flatbuffers::VOffsetT = 16; + pub const VT_ELEMENT_TYPES: flatbuffers::VOffsetT = 18; + pub const VT_UNK_1: flatbuffers::VOffsetT = 20; + pub const VT_GENDER: flatbuffers::VOffsetT = 22; + pub const VT_CAMP: flatbuffers::VOffsetT = 24; + pub const VT_UNK_2: flatbuffers::VOffsetT = 26; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - AvatarBaseTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args AvatarBaseTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = AvatarBaseTemplateBuilder::new(_fbb); - if let Some(x) = args.unk_2 { builder.add_unk_2(x); } - builder.add_camp(args.camp); - builder.add_gender(args.gender); - builder.add_unk_1(args.unk_1); - if let Some(x) = args.element_types { builder.add_element_types(x); } - if let Some(x) = args.hit_types { builder.add_hit_types(x); } - if let Some(x) = args.audio_bank { builder.add_audio_bank(x); } - if let Some(x) = args.audio_event_replace_param { builder.add_audio_event_replace_param(x); } - if let Some(x) = args.full_name { builder.add_full_name(x); } - if let Some(x) = args.name { builder.add_name(x); } - if let Some(x) = args.code_name { builder.add_code_name(x); } - builder.add_id(args.id); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AvatarBaseTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args AvatarBaseTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = AvatarBaseTemplateBuilder::new(_fbb); + if let Some(x) = args.unk_2 { + builder.add_unk_2(x); + } + builder.add_camp(args.camp); + builder.add_gender(args.gender); + builder.add_unk_1(args.unk_1); + if let Some(x) = args.element_types { + builder.add_element_types(x); + } + if let Some(x) = args.hit_types { + builder.add_hit_types(x); + } + if let Some(x) = args.audio_bank { + builder.add_audio_bank(x); + } + if let Some(x) = args.audio_event_replace_param { + builder.add_audio_event_replace_param(x); + } + if let Some(x) = args.full_name { + builder.add_full_name(x); + } + if let Some(x) = args.name { + builder.add_name(x); + } + if let Some(x) = args.code_name { + builder.add_code_name(x); + } + builder.add_id(args.id); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AvatarBaseTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn code_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(AvatarBaseTemplate::VT_CODE_NAME, None)} - } - #[inline] - pub fn name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(AvatarBaseTemplate::VT_NAME, None)} - } - #[inline] - pub fn full_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(AvatarBaseTemplate::VT_FULL_NAME, None)} - } - #[inline] - pub fn audio_event_replace_param(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(AvatarBaseTemplate::VT_AUDIO_EVENT_REPLACE_PARAM, None)} - } - #[inline] - pub fn audio_bank(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(AvatarBaseTemplate::VT_AUDIO_BANK, None)} - } - #[inline] - pub fn hit_types(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(AvatarBaseTemplate::VT_HIT_TYPES, None)} - } - #[inline] - pub fn element_types(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(AvatarBaseTemplate::VT_ELEMENT_TYPES, None)} - } - #[inline] - pub fn unk_1(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AvatarBaseTemplate::VT_UNK_1, Some(0)).unwrap()} - } - #[inline] - pub fn gender(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AvatarBaseTemplate::VT_GENDER, Some(0)).unwrap()} - } - #[inline] - pub fn camp(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(AvatarBaseTemplate::VT_CAMP, Some(0)).unwrap()} - } - #[inline] - pub fn unk_2(&self) -> Option>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(AvatarBaseTemplate::VT_UNK_2, None)} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBaseTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn code_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(AvatarBaseTemplate::VT_CODE_NAME, None) + } + } + #[inline] + pub fn name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(AvatarBaseTemplate::VT_NAME, None) + } + } + #[inline] + pub fn full_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(AvatarBaseTemplate::VT_FULL_NAME, None) + } + } + #[inline] + pub fn audio_event_replace_param(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + AvatarBaseTemplate::VT_AUDIO_EVENT_REPLACE_PARAM, + None, + ) + } + } + #[inline] + pub fn audio_bank(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(AvatarBaseTemplate::VT_AUDIO_BANK, None) + } + } + #[inline] + pub fn hit_types(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBaseTemplate::VT_HIT_TYPES, + None, + ) + } + } + #[inline] + pub fn element_types(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBaseTemplate::VT_ELEMENT_TYPES, + None, + ) + } + } + #[inline] + pub fn unk_1(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBaseTemplate::VT_UNK_1, Some(0)) + .unwrap() + } + } + #[inline] + pub fn gender(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBaseTemplate::VT_GENDER, Some(0)) + .unwrap() + } + } + #[inline] + pub fn camp(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBaseTemplate::VT_CAMP, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_2(&self) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(AvatarBaseTemplate::VT_UNK_2, None) + } + } } impl flatbuffers::Verifiable for AvatarBaseTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::>("code_name", Self::VT_CODE_NAME, false)? - .visit_field::>("name", Self::VT_NAME, false)? - .visit_field::>("full_name", Self::VT_FULL_NAME, false)? - .visit_field::>("audio_event_replace_param", Self::VT_AUDIO_EVENT_REPLACE_PARAM, false)? - .visit_field::>("audio_bank", Self::VT_AUDIO_BANK, false)? - .visit_field::>>("hit_types", Self::VT_HIT_TYPES, false)? - .visit_field::>>("element_types", Self::VT_ELEMENT_TYPES, false)? - .visit_field::("unk_1", Self::VT_UNK_1, false)? - .visit_field::("gender", Self::VT_GENDER, false)? - .visit_field::("camp", Self::VT_CAMP, false)? - .visit_field::>>>("unk_2", Self::VT_UNK_2, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::>( + "code_name", + Self::VT_CODE_NAME, + false, + )? + .visit_field::>("name", Self::VT_NAME, false)? + .visit_field::>( + "full_name", + Self::VT_FULL_NAME, + false, + )? + .visit_field::>( + "audio_event_replace_param", + Self::VT_AUDIO_EVENT_REPLACE_PARAM, + false, + )? + .visit_field::>( + "audio_bank", + Self::VT_AUDIO_BANK, + false, + )? + .visit_field::>>( + "hit_types", + Self::VT_HIT_TYPES, + false, + )? + .visit_field::>>( + "element_types", + Self::VT_ELEMENT_TYPES, + false, + )? + .visit_field::("unk_1", Self::VT_UNK_1, false)? + .visit_field::("gender", Self::VT_GENDER, false)? + .visit_field::("camp", Self::VT_CAMP, false)? + .visit_field::>, + >>("unk_2", Self::VT_UNK_2, false)? + .finish(); + Ok(()) + } } pub struct AvatarBaseTemplateArgs<'a> { pub id: i32, @@ -441,427 +533,644 @@ pub struct AvatarBaseTemplateArgs<'a> { pub unk_1: i32, pub gender: i32, pub camp: i32, - pub unk_2: Option>>>, + pub unk_2: Option< + flatbuffers::WIPOffset>>, + >, } impl<'a> Default for AvatarBaseTemplateArgs<'a> { - #[inline] - fn default() -> Self { - AvatarBaseTemplateArgs { - id: 0, - code_name: None, - name: None, - full_name: None, - audio_event_replace_param: None, - audio_bank: None, - hit_types: None, - element_types: None, - unk_1: 0, - gender: 0, - camp: 0, - unk_2: None, + #[inline] + fn default() -> Self { + AvatarBaseTemplateArgs { + id: 0, + code_name: None, + name: None, + full_name: None, + audio_event_replace_param: None, + audio_bank: None, + hit_types: None, + element_types: None, + unk_1: 0, + gender: 0, + camp: 0, + unk_2: None, + } } - } } pub struct AvatarBaseTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AvatarBaseTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(AvatarBaseTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_code_name(&mut self, code_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(AvatarBaseTemplate::VT_CODE_NAME, code_name); - } - #[inline] - pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(AvatarBaseTemplate::VT_NAME, name); - } - #[inline] - pub fn add_full_name(&mut self, full_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(AvatarBaseTemplate::VT_FULL_NAME, full_name); - } - #[inline] - pub fn add_audio_event_replace_param(&mut self, audio_event_replace_param: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(AvatarBaseTemplate::VT_AUDIO_EVENT_REPLACE_PARAM, audio_event_replace_param); - } - #[inline] - pub fn add_audio_bank(&mut self, audio_bank: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(AvatarBaseTemplate::VT_AUDIO_BANK, audio_bank); - } - #[inline] - pub fn add_hit_types(&mut self, hit_types: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(AvatarBaseTemplate::VT_HIT_TYPES, hit_types); - } - #[inline] - pub fn add_element_types(&mut self, element_types: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(AvatarBaseTemplate::VT_ELEMENT_TYPES, element_types); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: i32) { - self.fbb_.push_slot::(AvatarBaseTemplate::VT_UNK_1, unk_1, 0); - } - #[inline] - pub fn add_gender(&mut self, gender: i32) { - self.fbb_.push_slot::(AvatarBaseTemplate::VT_GENDER, gender, 0); - } - #[inline] - pub fn add_camp(&mut self, camp: i32) { - self.fbb_.push_slot::(AvatarBaseTemplate::VT_CAMP, camp, 0); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset>>) { - self.fbb_.push_slot_always::>(AvatarBaseTemplate::VT_UNK_2, unk_2); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> AvatarBaseTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - AvatarBaseTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_.push_slot::(AvatarBaseTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_code_name(&mut self, code_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + AvatarBaseTemplate::VT_CODE_NAME, + code_name, + ); + } + #[inline] + pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(AvatarBaseTemplate::VT_NAME, name); + } + #[inline] + pub fn add_full_name(&mut self, full_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + AvatarBaseTemplate::VT_FULL_NAME, + full_name, + ); + } + #[inline] + pub fn add_audio_event_replace_param( + &mut self, + audio_event_replace_param: flatbuffers::WIPOffset<&'b str>, + ) { + self.fbb_.push_slot_always::>( + AvatarBaseTemplate::VT_AUDIO_EVENT_REPLACE_PARAM, + audio_event_replace_param, + ); + } + #[inline] + pub fn add_audio_bank(&mut self, audio_bank: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + AvatarBaseTemplate::VT_AUDIO_BANK, + audio_bank, + ); + } + #[inline] + pub fn add_hit_types( + &mut self, + hit_types: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + AvatarBaseTemplate::VT_HIT_TYPES, + hit_types, + ); + } + #[inline] + pub fn add_element_types( + &mut self, + element_types: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + AvatarBaseTemplate::VT_ELEMENT_TYPES, + element_types, + ); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: i32) { + self.fbb_ + .push_slot::(AvatarBaseTemplate::VT_UNK_1, unk_1, 0); + } + #[inline] + pub fn add_gender(&mut self, gender: i32) { + self.fbb_ + .push_slot::(AvatarBaseTemplate::VT_GENDER, gender, 0); + } + #[inline] + pub fn add_camp(&mut self, camp: i32) { + self.fbb_ + .push_slot::(AvatarBaseTemplate::VT_CAMP, camp, 0); + } + #[inline] + pub fn add_unk_2( + &mut self, + unk_2: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_ + .push_slot_always::>(AvatarBaseTemplate::VT_UNK_2, unk_2); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> AvatarBaseTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + AvatarBaseTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for AvatarBaseTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("AvatarBaseTemplate"); - ds.field("id", &self.id()); - ds.field("code_name", &self.code_name()); - ds.field("name", &self.name()); - ds.field("full_name", &self.full_name()); - ds.field("audio_event_replace_param", &self.audio_event_replace_param()); - ds.field("audio_bank", &self.audio_bank()); - ds.field("hit_types", &self.hit_types()); - ds.field("element_types", &self.element_types()); - ds.field("unk_1", &self.unk_1()); - ds.field("gender", &self.gender()); - ds.field("camp", &self.camp()); - ds.field("unk_2", &self.unk_2()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AvatarBaseTemplate"); + ds.field("id", &self.id()); + ds.field("code_name", &self.code_name()); + ds.field("name", &self.name()); + ds.field("full_name", &self.full_name()); + ds.field( + "audio_event_replace_param", + &self.audio_event_replace_param(), + ); + ds.field("audio_bank", &self.audio_bank()); + ds.field("hit_types", &self.hit_types()); + ds.field("element_types", &self.element_types()); + ds.field("unk_1", &self.unk_1()); + ds.field("gender", &self.gender()); + ds.field("camp", &self.camp()); + ds.field("unk_2", &self.unk_2()); + ds.finish() + } } pub enum WeaponTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct WeaponTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for WeaponTemplate<'a> { - type Inner = WeaponTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = WeaponTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> WeaponTemplate<'a> { - pub const VT_ITEM_ID: flatbuffers::VOffsetT = 4; - pub const VT_WEAPON_NAME: flatbuffers::VOffsetT = 6; - pub const VT_UNK_MISSING_FIELD: flatbuffers::VOffsetT = 8; - pub const VT_BASE_PROPERTY: flatbuffers::VOffsetT = 10; - pub const VT_RAND_PROPERTY: flatbuffers::VOffsetT = 12; - pub const VT_STAR_LIMIT: flatbuffers::VOffsetT = 14; - pub const VT_EXP_RECYCLE: flatbuffers::VOffsetT = 16; - pub const VT_WEAPON_SCRIPT_CONFIG: flatbuffers::VOffsetT = 18; - pub const VT_WEAPON_UI_MODEL: flatbuffers::VOffsetT = 20; - pub const VT_UNK_1: flatbuffers::VOffsetT = 22; - pub const VT_UNK_MISSING_FIELD_2: flatbuffers::VOffsetT = 24; - pub const VT_UNK_WEAPON_PATH: flatbuffers::VOffsetT = 26; - pub const VT_UNK_MISSING_FIELD_3: flatbuffers::VOffsetT = 28; - pub const VT_REFINE_INITIAL: flatbuffers::VOffsetT = 30; - pub const VT_REFINE_LIMIT: flatbuffers::VOffsetT = 32; - pub const VT_UNK_MISSING_FIELD_4: flatbuffers::VOffsetT = 34; - pub const VT_UNK_MISSING_FIELD_5: flatbuffers::VOffsetT = 36; - pub const VT_UNK_STRING_WITH_VALUES: flatbuffers::VOffsetT = 38; - pub const VT_UNK_MISSING_FIELD_6: flatbuffers::VOffsetT = 40; - pub const VT_UNK_2: flatbuffers::VOffsetT = 42; - pub const VT_WEAPON_DESC: flatbuffers::VOffsetT = 44; - pub const VT_WEAPON_RELEASE_TAG: flatbuffers::VOffsetT = 46; - pub const VT_UNK_EMPTY_STRING: flatbuffers::VOffsetT = 48; - pub const VT_AVATAR_ID: flatbuffers::VOffsetT = 50; - pub const VT_WEAPON_COMMENT: flatbuffers::VOffsetT = 52; - pub const VT_REFINE_COSTS: flatbuffers::VOffsetT = 54; - pub const VT_UNK_3: flatbuffers::VOffsetT = 56; + pub const VT_ITEM_ID: flatbuffers::VOffsetT = 4; + pub const VT_WEAPON_NAME: flatbuffers::VOffsetT = 6; + pub const VT_UNK_MISSING_FIELD: flatbuffers::VOffsetT = 8; + pub const VT_BASE_PROPERTY: flatbuffers::VOffsetT = 10; + pub const VT_RAND_PROPERTY: flatbuffers::VOffsetT = 12; + pub const VT_STAR_LIMIT: flatbuffers::VOffsetT = 14; + pub const VT_EXP_RECYCLE: flatbuffers::VOffsetT = 16; + pub const VT_WEAPON_SCRIPT_CONFIG: flatbuffers::VOffsetT = 18; + pub const VT_WEAPON_UI_MODEL: flatbuffers::VOffsetT = 20; + pub const VT_UNK_1: flatbuffers::VOffsetT = 22; + pub const VT_UNK_MISSING_FIELD_2: flatbuffers::VOffsetT = 24; + pub const VT_UNK_WEAPON_PATH: flatbuffers::VOffsetT = 26; + pub const VT_UNK_MISSING_FIELD_3: flatbuffers::VOffsetT = 28; + pub const VT_REFINE_INITIAL: flatbuffers::VOffsetT = 30; + pub const VT_REFINE_LIMIT: flatbuffers::VOffsetT = 32; + pub const VT_UNK_MISSING_FIELD_4: flatbuffers::VOffsetT = 34; + pub const VT_UNK_MISSING_FIELD_5: flatbuffers::VOffsetT = 36; + pub const VT_UNK_STRING_WITH_VALUES: flatbuffers::VOffsetT = 38; + pub const VT_UNK_MISSING_FIELD_6: flatbuffers::VOffsetT = 40; + pub const VT_UNK_2: flatbuffers::VOffsetT = 42; + pub const VT_WEAPON_DESC: flatbuffers::VOffsetT = 44; + pub const VT_WEAPON_RELEASE_TAG: flatbuffers::VOffsetT = 46; + pub const VT_UNK_EMPTY_STRING: flatbuffers::VOffsetT = 48; + pub const VT_AVATAR_ID: flatbuffers::VOffsetT = 50; + pub const VT_WEAPON_COMMENT: flatbuffers::VOffsetT = 52; + pub const VT_REFINE_COSTS: flatbuffers::VOffsetT = 54; + pub const VT_UNK_3: flatbuffers::VOffsetT = 56; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - WeaponTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args WeaponTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = WeaponTemplateBuilder::new(_fbb); - builder.add_unk_3(args.unk_3); - if let Some(x) = args.refine_costs { builder.add_refine_costs(x); } - if let Some(x) = args.weapon_comment { builder.add_weapon_comment(x); } - builder.add_avatar_id(args.avatar_id); - if let Some(x) = args.unk_empty_string { builder.add_unk_empty_string(x); } - if let Some(x) = args.weapon_release_tag { builder.add_weapon_release_tag(x); } - if let Some(x) = args.weapon_desc { builder.add_weapon_desc(x); } - builder.add_unk_2(args.unk_2); - builder.add_unk_missing_field_6(args.unk_missing_field_6); - if let Some(x) = args.unk_string_with_values { builder.add_unk_string_with_values(x); } - builder.add_unk_missing_field_5(args.unk_missing_field_5); - builder.add_unk_missing_field_4(args.unk_missing_field_4); - builder.add_refine_limit(args.refine_limit); - builder.add_refine_initial(args.refine_initial); - builder.add_unk_missing_field_3(args.unk_missing_field_3); - if let Some(x) = args.unk_weapon_path { builder.add_unk_weapon_path(x); } - builder.add_unk_missing_field_2(args.unk_missing_field_2); - builder.add_unk_1(args.unk_1); - if let Some(x) = args.weapon_ui_model { builder.add_weapon_ui_model(x); } - if let Some(x) = args.weapon_script_config { builder.add_weapon_script_config(x); } - builder.add_exp_recycle(args.exp_recycle); - builder.add_star_limit(args.star_limit); - if let Some(x) = args.rand_property { builder.add_rand_property(x); } - if let Some(x) = args.base_property { builder.add_base_property(x); } - builder.add_unk_missing_field(args.unk_missing_field); - if let Some(x) = args.weapon_name { builder.add_weapon_name(x); } - builder.add_item_id(args.item_id); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + WeaponTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args WeaponTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = WeaponTemplateBuilder::new(_fbb); + builder.add_unk_3(args.unk_3); + if let Some(x) = args.refine_costs { + builder.add_refine_costs(x); + } + if let Some(x) = args.weapon_comment { + builder.add_weapon_comment(x); + } + builder.add_avatar_id(args.avatar_id); + if let Some(x) = args.unk_empty_string { + builder.add_unk_empty_string(x); + } + if let Some(x) = args.weapon_release_tag { + builder.add_weapon_release_tag(x); + } + if let Some(x) = args.weapon_desc { + builder.add_weapon_desc(x); + } + builder.add_unk_2(args.unk_2); + builder.add_unk_missing_field_6(args.unk_missing_field_6); + if let Some(x) = args.unk_string_with_values { + builder.add_unk_string_with_values(x); + } + builder.add_unk_missing_field_5(args.unk_missing_field_5); + builder.add_unk_missing_field_4(args.unk_missing_field_4); + builder.add_refine_limit(args.refine_limit); + builder.add_refine_initial(args.refine_initial); + builder.add_unk_missing_field_3(args.unk_missing_field_3); + if let Some(x) = args.unk_weapon_path { + builder.add_unk_weapon_path(x); + } + builder.add_unk_missing_field_2(args.unk_missing_field_2); + builder.add_unk_1(args.unk_1); + if let Some(x) = args.weapon_ui_model { + builder.add_weapon_ui_model(x); + } + if let Some(x) = args.weapon_script_config { + builder.add_weapon_script_config(x); + } + builder.add_exp_recycle(args.exp_recycle); + builder.add_star_limit(args.star_limit); + if let Some(x) = args.rand_property { + builder.add_rand_property(x); + } + if let Some(x) = args.base_property { + builder.add_base_property(x); + } + builder.add_unk_missing_field(args.unk_missing_field); + if let Some(x) = args.weapon_name { + builder.add_weapon_name(x); + } + builder.add_item_id(args.item_id); + builder.finish() + } - - #[inline] - pub fn item_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_ITEM_ID, Some(0)).unwrap()} - } - #[inline] - pub fn weapon_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(WeaponTemplate::VT_WEAPON_NAME, None)} - } - #[inline] - pub fn unk_missing_field(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_UNK_MISSING_FIELD, Some(0)).unwrap()} - } - #[inline] - pub fn base_property(&self) -> Option<&'a Property> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_BASE_PROPERTY, None)} - } - #[inline] - pub fn rand_property(&self) -> Option<&'a Property> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_RAND_PROPERTY, None)} - } - #[inline] - pub fn star_limit(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_STAR_LIMIT, Some(0)).unwrap()} - } - #[inline] - pub fn exp_recycle(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_EXP_RECYCLE, Some(0)).unwrap()} - } - #[inline] - pub fn weapon_script_config(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(WeaponTemplate::VT_WEAPON_SCRIPT_CONFIG, None)} - } - #[inline] - pub fn weapon_ui_model(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(WeaponTemplate::VT_WEAPON_UI_MODEL, None)} - } - #[inline] - pub fn unk_1(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_UNK_1, Some(0)).unwrap()} - } - #[inline] - pub fn unk_missing_field_2(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_UNK_MISSING_FIELD_2, Some(0)).unwrap()} - } - #[inline] - pub fn unk_weapon_path(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(WeaponTemplate::VT_UNK_WEAPON_PATH, None)} - } - #[inline] - pub fn unk_missing_field_3(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_UNK_MISSING_FIELD_3, Some(0)).unwrap()} - } - #[inline] - pub fn refine_initial(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_REFINE_INITIAL, Some(0)).unwrap()} - } - #[inline] - pub fn refine_limit(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_REFINE_LIMIT, Some(0)).unwrap()} - } - #[inline] - pub fn unk_missing_field_4(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_UNK_MISSING_FIELD_4, Some(0)).unwrap()} - } - #[inline] - pub fn unk_missing_field_5(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_UNK_MISSING_FIELD_5, Some(0)).unwrap()} - } - #[inline] - pub fn unk_string_with_values(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(WeaponTemplate::VT_UNK_STRING_WITH_VALUES, None)} - } - #[inline] - pub fn unk_missing_field_6(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_UNK_MISSING_FIELD_6, Some(0)).unwrap()} - } - #[inline] - pub fn unk_2(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_UNK_2, Some(0)).unwrap()} - } - #[inline] - pub fn weapon_desc(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(WeaponTemplate::VT_WEAPON_DESC, None)} - } - #[inline] - pub fn weapon_release_tag(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(WeaponTemplate::VT_WEAPON_RELEASE_TAG, None)} - } - #[inline] - pub fn unk_empty_string(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(WeaponTemplate::VT_UNK_EMPTY_STRING, None)} - } - #[inline] - pub fn avatar_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_AVATAR_ID, Some(0)).unwrap()} - } - #[inline] - pub fn weapon_comment(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(WeaponTemplate::VT_WEAPON_COMMENT, None)} - } - #[inline] - pub fn refine_costs(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(WeaponTemplate::VT_REFINE_COSTS, None)} - } - #[inline] - pub fn unk_3(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(WeaponTemplate::VT_UNK_3, Some(0)).unwrap()} - } + #[inline] + pub fn item_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_ITEM_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn weapon_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(WeaponTemplate::VT_WEAPON_NAME, None) + } + } + #[inline] + pub fn unk_missing_field(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_UNK_MISSING_FIELD, Some(0)) + .unwrap() + } + } + #[inline] + pub fn base_property(&self) -> Option<&'a Property> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_BASE_PROPERTY, None) + } + } + #[inline] + pub fn rand_property(&self) -> Option<&'a Property> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_RAND_PROPERTY, None) + } + } + #[inline] + pub fn star_limit(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_STAR_LIMIT, Some(0)) + .unwrap() + } + } + #[inline] + pub fn exp_recycle(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_EXP_RECYCLE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn weapon_script_config(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + WeaponTemplate::VT_WEAPON_SCRIPT_CONFIG, + None, + ) + } + } + #[inline] + pub fn weapon_ui_model(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(WeaponTemplate::VT_WEAPON_UI_MODEL, None) + } + } + #[inline] + pub fn unk_1(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_UNK_1, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_missing_field_2(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_UNK_MISSING_FIELD_2, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_weapon_path(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(WeaponTemplate::VT_UNK_WEAPON_PATH, None) + } + } + #[inline] + pub fn unk_missing_field_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_UNK_MISSING_FIELD_3, Some(0)) + .unwrap() + } + } + #[inline] + pub fn refine_initial(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_REFINE_INITIAL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn refine_limit(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_REFINE_LIMIT, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_missing_field_4(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_UNK_MISSING_FIELD_4, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_missing_field_5(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_UNK_MISSING_FIELD_5, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_string_with_values(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + WeaponTemplate::VT_UNK_STRING_WITH_VALUES, + None, + ) + } + } + #[inline] + pub fn unk_missing_field_6(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_UNK_MISSING_FIELD_6, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_2(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_UNK_2, Some(0)) + .unwrap() + } + } + #[inline] + pub fn weapon_desc(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(WeaponTemplate::VT_WEAPON_DESC, None) + } + } + #[inline] + pub fn weapon_release_tag(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + WeaponTemplate::VT_WEAPON_RELEASE_TAG, + None, + ) + } + } + #[inline] + pub fn unk_empty_string(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + WeaponTemplate::VT_UNK_EMPTY_STRING, + None, + ) + } + } + #[inline] + pub fn avatar_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_AVATAR_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn weapon_comment(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(WeaponTemplate::VT_WEAPON_COMMENT, None) + } + } + #[inline] + pub fn refine_costs(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + WeaponTemplate::VT_REFINE_COSTS, + None, + ) + } + } + #[inline] + pub fn unk_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponTemplate::VT_UNK_3, Some(0)) + .unwrap() + } + } } impl flatbuffers::Verifiable for WeaponTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("item_id", Self::VT_ITEM_ID, false)? - .visit_field::>("weapon_name", Self::VT_WEAPON_NAME, false)? - .visit_field::("unk_missing_field", Self::VT_UNK_MISSING_FIELD, false)? - .visit_field::("base_property", Self::VT_BASE_PROPERTY, false)? - .visit_field::("rand_property", Self::VT_RAND_PROPERTY, false)? - .visit_field::("star_limit", Self::VT_STAR_LIMIT, false)? - .visit_field::("exp_recycle", Self::VT_EXP_RECYCLE, false)? - .visit_field::>("weapon_script_config", Self::VT_WEAPON_SCRIPT_CONFIG, false)? - .visit_field::>("weapon_ui_model", Self::VT_WEAPON_UI_MODEL, false)? - .visit_field::("unk_1", Self::VT_UNK_1, false)? - .visit_field::("unk_missing_field_2", Self::VT_UNK_MISSING_FIELD_2, false)? - .visit_field::>("unk_weapon_path", Self::VT_UNK_WEAPON_PATH, false)? - .visit_field::("unk_missing_field_3", Self::VT_UNK_MISSING_FIELD_3, false)? - .visit_field::("refine_initial", Self::VT_REFINE_INITIAL, false)? - .visit_field::("refine_limit", Self::VT_REFINE_LIMIT, false)? - .visit_field::("unk_missing_field_4", Self::VT_UNK_MISSING_FIELD_4, false)? - .visit_field::("unk_missing_field_5", Self::VT_UNK_MISSING_FIELD_5, false)? - .visit_field::>("unk_string_with_values", Self::VT_UNK_STRING_WITH_VALUES, false)? - .visit_field::("unk_missing_field_6", Self::VT_UNK_MISSING_FIELD_6, false)? - .visit_field::("unk_2", Self::VT_UNK_2, false)? - .visit_field::>("weapon_desc", Self::VT_WEAPON_DESC, false)? - .visit_field::>("weapon_release_tag", Self::VT_WEAPON_RELEASE_TAG, false)? - .visit_field::>("unk_empty_string", Self::VT_UNK_EMPTY_STRING, false)? - .visit_field::("avatar_id", Self::VT_AVATAR_ID, false)? - .visit_field::>("weapon_comment", Self::VT_WEAPON_COMMENT, false)? - .visit_field::>>("refine_costs", Self::VT_REFINE_COSTS, false)? - .visit_field::("unk_3", Self::VT_UNK_3, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("item_id", Self::VT_ITEM_ID, false)? + .visit_field::>( + "weapon_name", + Self::VT_WEAPON_NAME, + false, + )? + .visit_field::("unk_missing_field", Self::VT_UNK_MISSING_FIELD, false)? + .visit_field::("base_property", Self::VT_BASE_PROPERTY, false)? + .visit_field::("rand_property", Self::VT_RAND_PROPERTY, false)? + .visit_field::("star_limit", Self::VT_STAR_LIMIT, false)? + .visit_field::("exp_recycle", Self::VT_EXP_RECYCLE, false)? + .visit_field::>( + "weapon_script_config", + Self::VT_WEAPON_SCRIPT_CONFIG, + false, + )? + .visit_field::>( + "weapon_ui_model", + Self::VT_WEAPON_UI_MODEL, + false, + )? + .visit_field::("unk_1", Self::VT_UNK_1, false)? + .visit_field::("unk_missing_field_2", Self::VT_UNK_MISSING_FIELD_2, false)? + .visit_field::>( + "unk_weapon_path", + Self::VT_UNK_WEAPON_PATH, + false, + )? + .visit_field::("unk_missing_field_3", Self::VT_UNK_MISSING_FIELD_3, false)? + .visit_field::("refine_initial", Self::VT_REFINE_INITIAL, false)? + .visit_field::("refine_limit", Self::VT_REFINE_LIMIT, false)? + .visit_field::("unk_missing_field_4", Self::VT_UNK_MISSING_FIELD_4, false)? + .visit_field::("unk_missing_field_5", Self::VT_UNK_MISSING_FIELD_5, false)? + .visit_field::>( + "unk_string_with_values", + Self::VT_UNK_STRING_WITH_VALUES, + false, + )? + .visit_field::("unk_missing_field_6", Self::VT_UNK_MISSING_FIELD_6, false)? + .visit_field::("unk_2", Self::VT_UNK_2, false)? + .visit_field::>( + "weapon_desc", + Self::VT_WEAPON_DESC, + false, + )? + .visit_field::>( + "weapon_release_tag", + Self::VT_WEAPON_RELEASE_TAG, + false, + )? + .visit_field::>( + "unk_empty_string", + Self::VT_UNK_EMPTY_STRING, + false, + )? + .visit_field::("avatar_id", Self::VT_AVATAR_ID, false)? + .visit_field::>( + "weapon_comment", + Self::VT_WEAPON_COMMENT, + false, + )? + .visit_field::>>( + "refine_costs", + Self::VT_REFINE_COSTS, + false, + )? + .visit_field::("unk_3", Self::VT_UNK_3, false)? + .finish(); + Ok(()) + } } pub struct WeaponTemplateArgs<'a> { pub item_id: i32, @@ -893,494 +1202,691 @@ pub struct WeaponTemplateArgs<'a> { pub unk_3: i32, } impl<'a> Default for WeaponTemplateArgs<'a> { - #[inline] - fn default() -> Self { - WeaponTemplateArgs { - item_id: 0, - weapon_name: None, - unk_missing_field: 0, - base_property: None, - rand_property: None, - star_limit: 0, - exp_recycle: 0, - weapon_script_config: None, - weapon_ui_model: None, - unk_1: 0, - unk_missing_field_2: 0, - unk_weapon_path: None, - unk_missing_field_3: 0, - refine_initial: 0, - refine_limit: 0, - unk_missing_field_4: 0, - unk_missing_field_5: 0, - unk_string_with_values: None, - unk_missing_field_6: 0, - unk_2: 0, - weapon_desc: None, - weapon_release_tag: None, - unk_empty_string: None, - avatar_id: 0, - weapon_comment: None, - refine_costs: None, - unk_3: 0, + #[inline] + fn default() -> Self { + WeaponTemplateArgs { + item_id: 0, + weapon_name: None, + unk_missing_field: 0, + base_property: None, + rand_property: None, + star_limit: 0, + exp_recycle: 0, + weapon_script_config: None, + weapon_ui_model: None, + unk_1: 0, + unk_missing_field_2: 0, + unk_weapon_path: None, + unk_missing_field_3: 0, + refine_initial: 0, + refine_limit: 0, + unk_missing_field_4: 0, + unk_missing_field_5: 0, + unk_string_with_values: None, + unk_missing_field_6: 0, + unk_2: 0, + weapon_desc: None, + weapon_release_tag: None, + unk_empty_string: None, + avatar_id: 0, + weapon_comment: None, + refine_costs: None, + unk_3: 0, + } } - } } pub struct WeaponTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> WeaponTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_item_id(&mut self, item_id: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_ITEM_ID, item_id, 0); - } - #[inline] - pub fn add_weapon_name(&mut self, weapon_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(WeaponTemplate::VT_WEAPON_NAME, weapon_name); - } - #[inline] - pub fn add_unk_missing_field(&mut self, unk_missing_field: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_UNK_MISSING_FIELD, unk_missing_field, 0); - } - #[inline] - pub fn add_base_property(&mut self, base_property: &Property) { - self.fbb_.push_slot_always::<&Property>(WeaponTemplate::VT_BASE_PROPERTY, base_property); - } - #[inline] - pub fn add_rand_property(&mut self, rand_property: &Property) { - self.fbb_.push_slot_always::<&Property>(WeaponTemplate::VT_RAND_PROPERTY, rand_property); - } - #[inline] - pub fn add_star_limit(&mut self, star_limit: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_STAR_LIMIT, star_limit, 0); - } - #[inline] - pub fn add_exp_recycle(&mut self, exp_recycle: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_EXP_RECYCLE, exp_recycle, 0); - } - #[inline] - pub fn add_weapon_script_config(&mut self, weapon_script_config: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(WeaponTemplate::VT_WEAPON_SCRIPT_CONFIG, weapon_script_config); - } - #[inline] - pub fn add_weapon_ui_model(&mut self, weapon_ui_model: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(WeaponTemplate::VT_WEAPON_UI_MODEL, weapon_ui_model); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_UNK_1, unk_1, 0); - } - #[inline] - pub fn add_unk_missing_field_2(&mut self, unk_missing_field_2: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_UNK_MISSING_FIELD_2, unk_missing_field_2, 0); - } - #[inline] - pub fn add_unk_weapon_path(&mut self, unk_weapon_path: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(WeaponTemplate::VT_UNK_WEAPON_PATH, unk_weapon_path); - } - #[inline] - pub fn add_unk_missing_field_3(&mut self, unk_missing_field_3: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_UNK_MISSING_FIELD_3, unk_missing_field_3, 0); - } - #[inline] - pub fn add_refine_initial(&mut self, refine_initial: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_REFINE_INITIAL, refine_initial, 0); - } - #[inline] - pub fn add_refine_limit(&mut self, refine_limit: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_REFINE_LIMIT, refine_limit, 0); - } - #[inline] - pub fn add_unk_missing_field_4(&mut self, unk_missing_field_4: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_UNK_MISSING_FIELD_4, unk_missing_field_4, 0); - } - #[inline] - pub fn add_unk_missing_field_5(&mut self, unk_missing_field_5: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_UNK_MISSING_FIELD_5, unk_missing_field_5, 0); - } - #[inline] - pub fn add_unk_string_with_values(&mut self, unk_string_with_values: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(WeaponTemplate::VT_UNK_STRING_WITH_VALUES, unk_string_with_values); - } - #[inline] - pub fn add_unk_missing_field_6(&mut self, unk_missing_field_6: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_UNK_MISSING_FIELD_6, unk_missing_field_6, 0); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_UNK_2, unk_2, 0); - } - #[inline] - pub fn add_weapon_desc(&mut self, weapon_desc: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(WeaponTemplate::VT_WEAPON_DESC, weapon_desc); - } - #[inline] - pub fn add_weapon_release_tag(&mut self, weapon_release_tag: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(WeaponTemplate::VT_WEAPON_RELEASE_TAG, weapon_release_tag); - } - #[inline] - pub fn add_unk_empty_string(&mut self, unk_empty_string: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(WeaponTemplate::VT_UNK_EMPTY_STRING, unk_empty_string); - } - #[inline] - pub fn add_avatar_id(&mut self, avatar_id: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_AVATAR_ID, avatar_id, 0); - } - #[inline] - pub fn add_weapon_comment(&mut self, weapon_comment: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(WeaponTemplate::VT_WEAPON_COMMENT, weapon_comment); - } - #[inline] - pub fn add_refine_costs(&mut self, refine_costs: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(WeaponTemplate::VT_REFINE_COSTS, refine_costs); - } - #[inline] - pub fn add_unk_3(&mut self, unk_3: i32) { - self.fbb_.push_slot::(WeaponTemplate::VT_UNK_3, unk_3, 0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> WeaponTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - WeaponTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_item_id(&mut self, item_id: i32) { + self.fbb_ + .push_slot::(WeaponTemplate::VT_ITEM_ID, item_id, 0); + } + #[inline] + pub fn add_weapon_name(&mut self, weapon_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + WeaponTemplate::VT_WEAPON_NAME, + weapon_name, + ); + } + #[inline] + pub fn add_unk_missing_field(&mut self, unk_missing_field: i32) { + self.fbb_ + .push_slot::(WeaponTemplate::VT_UNK_MISSING_FIELD, unk_missing_field, 0); + } + #[inline] + pub fn add_base_property(&mut self, base_property: &Property) { + self.fbb_ + .push_slot_always::<&Property>(WeaponTemplate::VT_BASE_PROPERTY, base_property); + } + #[inline] + pub fn add_rand_property(&mut self, rand_property: &Property) { + self.fbb_ + .push_slot_always::<&Property>(WeaponTemplate::VT_RAND_PROPERTY, rand_property); + } + #[inline] + pub fn add_star_limit(&mut self, star_limit: i32) { + self.fbb_ + .push_slot::(WeaponTemplate::VT_STAR_LIMIT, star_limit, 0); + } + #[inline] + pub fn add_exp_recycle(&mut self, exp_recycle: i32) { + self.fbb_ + .push_slot::(WeaponTemplate::VT_EXP_RECYCLE, exp_recycle, 0); + } + #[inline] + pub fn add_weapon_script_config( + &mut self, + weapon_script_config: flatbuffers::WIPOffset<&'b str>, + ) { + self.fbb_.push_slot_always::>( + WeaponTemplate::VT_WEAPON_SCRIPT_CONFIG, + weapon_script_config, + ); + } + #[inline] + pub fn add_weapon_ui_model(&mut self, weapon_ui_model: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + WeaponTemplate::VT_WEAPON_UI_MODEL, + weapon_ui_model, + ); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: i32) { + self.fbb_ + .push_slot::(WeaponTemplate::VT_UNK_1, unk_1, 0); + } + #[inline] + pub fn add_unk_missing_field_2(&mut self, unk_missing_field_2: i32) { + self.fbb_.push_slot::( + WeaponTemplate::VT_UNK_MISSING_FIELD_2, + unk_missing_field_2, + 0, + ); + } + #[inline] + pub fn add_unk_weapon_path(&mut self, unk_weapon_path: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + WeaponTemplate::VT_UNK_WEAPON_PATH, + unk_weapon_path, + ); + } + #[inline] + pub fn add_unk_missing_field_3(&mut self, unk_missing_field_3: i32) { + self.fbb_.push_slot::( + WeaponTemplate::VT_UNK_MISSING_FIELD_3, + unk_missing_field_3, + 0, + ); + } + #[inline] + pub fn add_refine_initial(&mut self, refine_initial: i32) { + self.fbb_ + .push_slot::(WeaponTemplate::VT_REFINE_INITIAL, refine_initial, 0); + } + #[inline] + pub fn add_refine_limit(&mut self, refine_limit: i32) { + self.fbb_ + .push_slot::(WeaponTemplate::VT_REFINE_LIMIT, refine_limit, 0); + } + #[inline] + pub fn add_unk_missing_field_4(&mut self, unk_missing_field_4: i32) { + self.fbb_.push_slot::( + WeaponTemplate::VT_UNK_MISSING_FIELD_4, + unk_missing_field_4, + 0, + ); + } + #[inline] + pub fn add_unk_missing_field_5(&mut self, unk_missing_field_5: i32) { + self.fbb_.push_slot::( + WeaponTemplate::VT_UNK_MISSING_FIELD_5, + unk_missing_field_5, + 0, + ); + } + #[inline] + pub fn add_unk_string_with_values( + &mut self, + unk_string_with_values: flatbuffers::WIPOffset<&'b str>, + ) { + self.fbb_.push_slot_always::>( + WeaponTemplate::VT_UNK_STRING_WITH_VALUES, + unk_string_with_values, + ); + } + #[inline] + pub fn add_unk_missing_field_6(&mut self, unk_missing_field_6: i32) { + self.fbb_.push_slot::( + WeaponTemplate::VT_UNK_MISSING_FIELD_6, + unk_missing_field_6, + 0, + ); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: i32) { + self.fbb_ + .push_slot::(WeaponTemplate::VT_UNK_2, unk_2, 0); + } + #[inline] + pub fn add_weapon_desc(&mut self, weapon_desc: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + WeaponTemplate::VT_WEAPON_DESC, + weapon_desc, + ); + } + #[inline] + pub fn add_weapon_release_tag(&mut self, weapon_release_tag: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + WeaponTemplate::VT_WEAPON_RELEASE_TAG, + weapon_release_tag, + ); + } + #[inline] + pub fn add_unk_empty_string(&mut self, unk_empty_string: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + WeaponTemplate::VT_UNK_EMPTY_STRING, + unk_empty_string, + ); + } + #[inline] + pub fn add_avatar_id(&mut self, avatar_id: i32) { + self.fbb_ + .push_slot::(WeaponTemplate::VT_AVATAR_ID, avatar_id, 0); + } + #[inline] + pub fn add_weapon_comment(&mut self, weapon_comment: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + WeaponTemplate::VT_WEAPON_COMMENT, + weapon_comment, + ); + } + #[inline] + pub fn add_refine_costs( + &mut self, + refine_costs: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + WeaponTemplate::VT_REFINE_COSTS, + refine_costs, + ); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: i32) { + self.fbb_ + .push_slot::(WeaponTemplate::VT_UNK_3, unk_3, 0); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> WeaponTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + WeaponTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for WeaponTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("WeaponTemplate"); - ds.field("item_id", &self.item_id()); - ds.field("weapon_name", &self.weapon_name()); - ds.field("unk_missing_field", &self.unk_missing_field()); - ds.field("base_property", &self.base_property()); - ds.field("rand_property", &self.rand_property()); - ds.field("star_limit", &self.star_limit()); - ds.field("exp_recycle", &self.exp_recycle()); - ds.field("weapon_script_config", &self.weapon_script_config()); - ds.field("weapon_ui_model", &self.weapon_ui_model()); - ds.field("unk_1", &self.unk_1()); - ds.field("unk_missing_field_2", &self.unk_missing_field_2()); - ds.field("unk_weapon_path", &self.unk_weapon_path()); - ds.field("unk_missing_field_3", &self.unk_missing_field_3()); - ds.field("refine_initial", &self.refine_initial()); - ds.field("refine_limit", &self.refine_limit()); - ds.field("unk_missing_field_4", &self.unk_missing_field_4()); - ds.field("unk_missing_field_5", &self.unk_missing_field_5()); - ds.field("unk_string_with_values", &self.unk_string_with_values()); - ds.field("unk_missing_field_6", &self.unk_missing_field_6()); - ds.field("unk_2", &self.unk_2()); - ds.field("weapon_desc", &self.weapon_desc()); - ds.field("weapon_release_tag", &self.weapon_release_tag()); - ds.field("unk_empty_string", &self.unk_empty_string()); - ds.field("avatar_id", &self.avatar_id()); - ds.field("weapon_comment", &self.weapon_comment()); - ds.field("refine_costs", &self.refine_costs()); - ds.field("unk_3", &self.unk_3()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("WeaponTemplate"); + ds.field("item_id", &self.item_id()); + ds.field("weapon_name", &self.weapon_name()); + ds.field("unk_missing_field", &self.unk_missing_field()); + ds.field("base_property", &self.base_property()); + ds.field("rand_property", &self.rand_property()); + ds.field("star_limit", &self.star_limit()); + ds.field("exp_recycle", &self.exp_recycle()); + ds.field("weapon_script_config", &self.weapon_script_config()); + ds.field("weapon_ui_model", &self.weapon_ui_model()); + ds.field("unk_1", &self.unk_1()); + ds.field("unk_missing_field_2", &self.unk_missing_field_2()); + ds.field("unk_weapon_path", &self.unk_weapon_path()); + ds.field("unk_missing_field_3", &self.unk_missing_field_3()); + ds.field("refine_initial", &self.refine_initial()); + ds.field("refine_limit", &self.refine_limit()); + ds.field("unk_missing_field_4", &self.unk_missing_field_4()); + ds.field("unk_missing_field_5", &self.unk_missing_field_5()); + ds.field("unk_string_with_values", &self.unk_string_with_values()); + ds.field("unk_missing_field_6", &self.unk_missing_field_6()); + ds.field("unk_2", &self.unk_2()); + ds.field("weapon_desc", &self.weapon_desc()); + ds.field("weapon_release_tag", &self.weapon_release_tag()); + ds.field("unk_empty_string", &self.unk_empty_string()); + ds.field("avatar_id", &self.avatar_id()); + ds.field("weapon_comment", &self.weapon_comment()); + ds.field("refine_costs", &self.refine_costs()); + ds.field("unk_3", &self.unk_3()); + ds.finish() + } } pub enum UnlockConfigTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct UnlockConfigTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for UnlockConfigTemplate<'a> { - type Inner = UnlockConfigTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = UnlockConfigTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> UnlockConfigTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_UNK_1: flatbuffers::VOffsetT = 6; - pub const VT_UNK_2: flatbuffers::VOffsetT = 8; - pub const VT_UNK_3: flatbuffers::VOffsetT = 10; - pub const VT_UNK_4: flatbuffers::VOffsetT = 12; - pub const VT_UNK_5: flatbuffers::VOffsetT = 14; - pub const VT_UNK_6: flatbuffers::VOffsetT = 16; - pub const VT_UNK_7: flatbuffers::VOffsetT = 18; - pub const VT_UNK_8: flatbuffers::VOffsetT = 20; - pub const VT_ICON_RES: flatbuffers::VOffsetT = 22; - pub const VT_UNK_9: flatbuffers::VOffsetT = 24; - pub const VT_NAME: flatbuffers::VOffsetT = 26; - pub const VT_UNK_10: flatbuffers::VOffsetT = 28; - pub const VT_UNK_11: flatbuffers::VOffsetT = 30; - pub const VT_UNK_12: flatbuffers::VOffsetT = 32; - pub const VT_UNK_13: flatbuffers::VOffsetT = 34; - pub const VT_UNK_14: flatbuffers::VOffsetT = 36; - pub const VT_UNK_15: flatbuffers::VOffsetT = 38; - pub const VT_UNK_16: flatbuffers::VOffsetT = 40; - pub const VT_UNK_17: flatbuffers::VOffsetT = 42; - pub const VT_UNK_18: flatbuffers::VOffsetT = 44; - pub const VT_UNK_19: flatbuffers::VOffsetT = 46; - pub const VT_UNK_20: flatbuffers::VOffsetT = 48; - pub const VT_UNK_21: flatbuffers::VOffsetT = 50; - pub const VT_UNK_22: flatbuffers::VOffsetT = 52; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_UNK_1: flatbuffers::VOffsetT = 6; + pub const VT_UNK_2: flatbuffers::VOffsetT = 8; + pub const VT_UNK_3: flatbuffers::VOffsetT = 10; + pub const VT_UNK_4: flatbuffers::VOffsetT = 12; + pub const VT_UNK_5: flatbuffers::VOffsetT = 14; + pub const VT_UNK_6: flatbuffers::VOffsetT = 16; + pub const VT_UNK_7: flatbuffers::VOffsetT = 18; + pub const VT_UNK_8: flatbuffers::VOffsetT = 20; + pub const VT_ICON_RES: flatbuffers::VOffsetT = 22; + pub const VT_UNK_9: flatbuffers::VOffsetT = 24; + pub const VT_NAME: flatbuffers::VOffsetT = 26; + pub const VT_UNK_10: flatbuffers::VOffsetT = 28; + pub const VT_UNK_11: flatbuffers::VOffsetT = 30; + pub const VT_UNK_12: flatbuffers::VOffsetT = 32; + pub const VT_UNK_13: flatbuffers::VOffsetT = 34; + pub const VT_UNK_14: flatbuffers::VOffsetT = 36; + pub const VT_UNK_15: flatbuffers::VOffsetT = 38; + pub const VT_UNK_16: flatbuffers::VOffsetT = 40; + pub const VT_UNK_17: flatbuffers::VOffsetT = 42; + pub const VT_UNK_18: flatbuffers::VOffsetT = 44; + pub const VT_UNK_19: flatbuffers::VOffsetT = 46; + pub const VT_UNK_20: flatbuffers::VOffsetT = 48; + pub const VT_UNK_21: flatbuffers::VOffsetT = 50; + pub const VT_UNK_22: flatbuffers::VOffsetT = 52; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - UnlockConfigTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args UnlockConfigTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = UnlockConfigTemplateBuilder::new(_fbb); - if let Some(x) = args.unk_22 { builder.add_unk_22(x); } - builder.add_unk_21(args.unk_21); - if let Some(x) = args.unk_20 { builder.add_unk_20(x); } - builder.add_unk_19(args.unk_19); - builder.add_unk_18(args.unk_18); - if let Some(x) = args.unk_17 { builder.add_unk_17(x); } - builder.add_unk_16(args.unk_16); - if let Some(x) = args.unk_15 { builder.add_unk_15(x); } - builder.add_unk_14(args.unk_14); - builder.add_unk_12(args.unk_12); - builder.add_unk_11(args.unk_11); - if let Some(x) = args.unk_10 { builder.add_unk_10(x); } - if let Some(x) = args.name { builder.add_name(x); } - builder.add_unk_9(args.unk_9); - if let Some(x) = args.icon_res { builder.add_icon_res(x); } - if let Some(x) = args.unk_8 { builder.add_unk_8(x); } - builder.add_unk_7(args.unk_7); - if let Some(x) = args.unk_6 { builder.add_unk_6(x); } - builder.add_unk_5(args.unk_5); - builder.add_unk_4(args.unk_4); - builder.add_unk_3(args.unk_3); - if let Some(x) = args.unk_2 { builder.add_unk_2(x); } - if let Some(x) = args.unk_1 { builder.add_unk_1(x); } - builder.add_id(args.id); - builder.add_unk_13(args.unk_13); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + UnlockConfigTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args UnlockConfigTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = UnlockConfigTemplateBuilder::new(_fbb); + if let Some(x) = args.unk_22 { + builder.add_unk_22(x); + } + builder.add_unk_21(args.unk_21); + if let Some(x) = args.unk_20 { + builder.add_unk_20(x); + } + builder.add_unk_19(args.unk_19); + builder.add_unk_18(args.unk_18); + if let Some(x) = args.unk_17 { + builder.add_unk_17(x); + } + builder.add_unk_16(args.unk_16); + if let Some(x) = args.unk_15 { + builder.add_unk_15(x); + } + builder.add_unk_14(args.unk_14); + builder.add_unk_12(args.unk_12); + builder.add_unk_11(args.unk_11); + if let Some(x) = args.unk_10 { + builder.add_unk_10(x); + } + if let Some(x) = args.name { + builder.add_name(x); + } + builder.add_unk_9(args.unk_9); + if let Some(x) = args.icon_res { + builder.add_icon_res(x); + } + if let Some(x) = args.unk_8 { + builder.add_unk_8(x); + } + builder.add_unk_7(args.unk_7); + if let Some(x) = args.unk_6 { + builder.add_unk_6(x); + } + builder.add_unk_5(args.unk_5); + builder.add_unk_4(args.unk_4); + builder.add_unk_3(args.unk_3); + if let Some(x) = args.unk_2 { + builder.add_unk_2(x); + } + if let Some(x) = args.unk_1 { + builder.add_unk_1(x); + } + builder.add_id(args.id); + builder.add_unk_13(args.unk_13); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn unk_1(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(UnlockConfigTemplate::VT_UNK_1, None)} - } - #[inline] - pub fn unk_2(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(UnlockConfigTemplate::VT_UNK_2, None)} - } - #[inline] - pub fn unk_3(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_3, Some(0)).unwrap()} - } - #[inline] - pub fn unk_4(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_4, Some(0)).unwrap()} - } - #[inline] - pub fn unk_5(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_5, Some(0)).unwrap()} - } - #[inline] - pub fn unk_6(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(UnlockConfigTemplate::VT_UNK_6, None)} - } - #[inline] - pub fn unk_7(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_7, Some(0)).unwrap()} - } - #[inline] - pub fn unk_8(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(UnlockConfigTemplate::VT_UNK_8, None)} - } - #[inline] - pub fn icon_res(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(UnlockConfigTemplate::VT_ICON_RES, None)} - } - #[inline] - pub fn unk_9(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_9, Some(0)).unwrap()} - } - #[inline] - pub fn name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(UnlockConfigTemplate::VT_NAME, None)} - } - #[inline] - pub fn unk_10(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(UnlockConfigTemplate::VT_UNK_10, None)} - } - #[inline] - pub fn unk_11(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_11, Some(0)).unwrap()} - } - #[inline] - pub fn unk_12(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_12, Some(0)).unwrap()} - } - #[inline] - pub fn unk_13(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_13, Some(false)).unwrap()} - } - #[inline] - pub fn unk_14(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_14, Some(0)).unwrap()} - } - #[inline] - pub fn unk_15(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(UnlockConfigTemplate::VT_UNK_15, None)} - } - #[inline] - pub fn unk_16(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_16, Some(0)).unwrap()} - } - #[inline] - pub fn unk_17(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(UnlockConfigTemplate::VT_UNK_17, None)} - } - #[inline] - pub fn unk_18(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_18, Some(0)).unwrap()} - } - #[inline] - pub fn unk_19(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_19, Some(0)).unwrap()} - } - #[inline] - pub fn unk_20(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(UnlockConfigTemplate::VT_UNK_20, None)} - } - #[inline] - pub fn unk_21(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(UnlockConfigTemplate::VT_UNK_21, Some(0)).unwrap()} - } - #[inline] - pub fn unk_22(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(UnlockConfigTemplate::VT_UNK_22, None)} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_1(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(UnlockConfigTemplate::VT_UNK_1, None) + } + } + #[inline] + pub fn unk_2(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + UnlockConfigTemplate::VT_UNK_2, + None, + ) + } + } + #[inline] + pub fn unk_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_3, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_4(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_4, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_5(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_5, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_6(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(UnlockConfigTemplate::VT_UNK_6, None) + } + } + #[inline] + pub fn unk_7(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_7, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_8(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(UnlockConfigTemplate::VT_UNK_8, None) + } + } + #[inline] + pub fn icon_res(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(UnlockConfigTemplate::VT_ICON_RES, None) + } + } + #[inline] + pub fn unk_9(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_9, Some(0)) + .unwrap() + } + } + #[inline] + pub fn name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(UnlockConfigTemplate::VT_NAME, None) + } + } + #[inline] + pub fn unk_10(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(UnlockConfigTemplate::VT_UNK_10, None) + } + } + #[inline] + pub fn unk_11(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_11, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_12(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_12, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_13(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_13, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_14(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_14, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_15(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(UnlockConfigTemplate::VT_UNK_15, None) + } + } + #[inline] + pub fn unk_16(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_16, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_17(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(UnlockConfigTemplate::VT_UNK_17, None) + } + } + #[inline] + pub fn unk_18(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_18, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_19(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_19, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_20(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(UnlockConfigTemplate::VT_UNK_20, None) + } + } + #[inline] + pub fn unk_21(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(UnlockConfigTemplate::VT_UNK_21, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_22(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(UnlockConfigTemplate::VT_UNK_22, None) + } + } } impl flatbuffers::Verifiable for UnlockConfigTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::>("unk_1", Self::VT_UNK_1, false)? - .visit_field::>>("unk_2", Self::VT_UNK_2, false)? - .visit_field::("unk_3", Self::VT_UNK_3, false)? - .visit_field::("unk_4", Self::VT_UNK_4, false)? - .visit_field::("unk_5", Self::VT_UNK_5, false)? - .visit_field::>("unk_6", Self::VT_UNK_6, false)? - .visit_field::("unk_7", Self::VT_UNK_7, false)? - .visit_field::>("unk_8", Self::VT_UNK_8, false)? - .visit_field::>("icon_res", Self::VT_ICON_RES, false)? - .visit_field::("unk_9", Self::VT_UNK_9, false)? - .visit_field::>("name", Self::VT_NAME, false)? - .visit_field::>("unk_10", Self::VT_UNK_10, false)? - .visit_field::("unk_11", Self::VT_UNK_11, false)? - .visit_field::("unk_12", Self::VT_UNK_12, false)? - .visit_field::("unk_13", Self::VT_UNK_13, false)? - .visit_field::("unk_14", Self::VT_UNK_14, false)? - .visit_field::>("unk_15", Self::VT_UNK_15, false)? - .visit_field::("unk_16", Self::VT_UNK_16, false)? - .visit_field::>("unk_17", Self::VT_UNK_17, false)? - .visit_field::("unk_18", Self::VT_UNK_18, false)? - .visit_field::("unk_19", Self::VT_UNK_19, false)? - .visit_field::>("unk_20", Self::VT_UNK_20, false)? - .visit_field::("unk_21", Self::VT_UNK_21, false)? - .visit_field::>("unk_22", Self::VT_UNK_22, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::>("unk_1", Self::VT_UNK_1, false)? + .visit_field::>>( + "unk_2", + Self::VT_UNK_2, + false, + )? + .visit_field::("unk_3", Self::VT_UNK_3, false)? + .visit_field::("unk_4", Self::VT_UNK_4, false)? + .visit_field::("unk_5", Self::VT_UNK_5, false)? + .visit_field::>("unk_6", Self::VT_UNK_6, false)? + .visit_field::("unk_7", Self::VT_UNK_7, false)? + .visit_field::>("unk_8", Self::VT_UNK_8, false)? + .visit_field::>( + "icon_res", + Self::VT_ICON_RES, + false, + )? + .visit_field::("unk_9", Self::VT_UNK_9, false)? + .visit_field::>("name", Self::VT_NAME, false)? + .visit_field::>("unk_10", Self::VT_UNK_10, false)? + .visit_field::("unk_11", Self::VT_UNK_11, false)? + .visit_field::("unk_12", Self::VT_UNK_12, false)? + .visit_field::("unk_13", Self::VT_UNK_13, false)? + .visit_field::("unk_14", Self::VT_UNK_14, false)? + .visit_field::>("unk_15", Self::VT_UNK_15, false)? + .visit_field::("unk_16", Self::VT_UNK_16, false)? + .visit_field::>("unk_17", Self::VT_UNK_17, false)? + .visit_field::("unk_18", Self::VT_UNK_18, false)? + .visit_field::("unk_19", Self::VT_UNK_19, false)? + .visit_field::>("unk_20", Self::VT_UNK_20, false)? + .visit_field::("unk_21", Self::VT_UNK_21, false)? + .visit_field::>("unk_22", Self::VT_UNK_22, false)? + .finish(); + Ok(()) + } } pub struct UnlockConfigTemplateArgs<'a> { pub id: i32, @@ -1410,322 +1916,408 @@ pub struct UnlockConfigTemplateArgs<'a> { pub unk_22: Option>, } impl<'a> Default for UnlockConfigTemplateArgs<'a> { - #[inline] - fn default() -> Self { - UnlockConfigTemplateArgs { - id: 0, - unk_1: None, - unk_2: None, - unk_3: 0, - unk_4: 0, - unk_5: 0, - unk_6: None, - unk_7: 0, - unk_8: None, - icon_res: None, - unk_9: 0, - name: None, - unk_10: None, - unk_11: 0, - unk_12: 0, - unk_13: false, - unk_14: 0, - unk_15: None, - unk_16: 0, - unk_17: None, - unk_18: 0, - unk_19: 0, - unk_20: None, - unk_21: 0, - unk_22: None, + #[inline] + fn default() -> Self { + UnlockConfigTemplateArgs { + id: 0, + unk_1: None, + unk_2: None, + unk_3: 0, + unk_4: 0, + unk_5: 0, + unk_6: None, + unk_7: 0, + unk_8: None, + icon_res: None, + unk_9: 0, + name: None, + unk_10: None, + unk_11: 0, + unk_12: 0, + unk_13: false, + unk_14: 0, + unk_15: None, + unk_16: 0, + unk_17: None, + unk_18: 0, + unk_19: 0, + unk_20: None, + unk_21: 0, + unk_22: None, + } } - } } pub struct UnlockConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UnlockConfigTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UnlockConfigTemplate::VT_UNK_1, unk_1); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(UnlockConfigTemplate::VT_UNK_2, unk_2); - } - #[inline] - pub fn add_unk_3(&mut self, unk_3: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_3, unk_3, 0); - } - #[inline] - pub fn add_unk_4(&mut self, unk_4: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_4, unk_4, 0); - } - #[inline] - pub fn add_unk_5(&mut self, unk_5: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_5, unk_5, 0); - } - #[inline] - pub fn add_unk_6(&mut self, unk_6: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UnlockConfigTemplate::VT_UNK_6, unk_6); - } - #[inline] - pub fn add_unk_7(&mut self, unk_7: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_7, unk_7, 0); - } - #[inline] - pub fn add_unk_8(&mut self, unk_8: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UnlockConfigTemplate::VT_UNK_8, unk_8); - } - #[inline] - pub fn add_icon_res(&mut self, icon_res: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UnlockConfigTemplate::VT_ICON_RES, icon_res); - } - #[inline] - pub fn add_unk_9(&mut self, unk_9: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_9, unk_9, 0); - } - #[inline] - pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UnlockConfigTemplate::VT_NAME, name); - } - #[inline] - pub fn add_unk_10(&mut self, unk_10: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UnlockConfigTemplate::VT_UNK_10, unk_10); - } - #[inline] - pub fn add_unk_11(&mut self, unk_11: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_11, unk_11, 0); - } - #[inline] - pub fn add_unk_12(&mut self, unk_12: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_12, unk_12, 0); - } - #[inline] - pub fn add_unk_13(&mut self, unk_13: bool) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_13, unk_13, false); - } - #[inline] - pub fn add_unk_14(&mut self, unk_14: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_14, unk_14, 0); - } - #[inline] - pub fn add_unk_15(&mut self, unk_15: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UnlockConfigTemplate::VT_UNK_15, unk_15); - } - #[inline] - pub fn add_unk_16(&mut self, unk_16: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_16, unk_16, 0); - } - #[inline] - pub fn add_unk_17(&mut self, unk_17: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UnlockConfigTemplate::VT_UNK_17, unk_17); - } - #[inline] - pub fn add_unk_18(&mut self, unk_18: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_18, unk_18, 0); - } - #[inline] - pub fn add_unk_19(&mut self, unk_19: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_19, unk_19, 0); - } - #[inline] - pub fn add_unk_20(&mut self, unk_20: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UnlockConfigTemplate::VT_UNK_20, unk_20); - } - #[inline] - pub fn add_unk_21(&mut self, unk_21: i32) { - self.fbb_.push_slot::(UnlockConfigTemplate::VT_UNK_21, unk_21, 0); - } - #[inline] - pub fn add_unk_22(&mut self, unk_22: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UnlockConfigTemplate::VT_UNK_22, unk_22); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UnlockConfigTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - UnlockConfigTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(UnlockConfigTemplate::VT_UNK_1, unk_1); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(UnlockConfigTemplate::VT_UNK_2, unk_2); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_3, unk_3, 0); + } + #[inline] + pub fn add_unk_4(&mut self, unk_4: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_4, unk_4, 0); + } + #[inline] + pub fn add_unk_5(&mut self, unk_5: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_5, unk_5, 0); + } + #[inline] + pub fn add_unk_6(&mut self, unk_6: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(UnlockConfigTemplate::VT_UNK_6, unk_6); + } + #[inline] + pub fn add_unk_7(&mut self, unk_7: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_7, unk_7, 0); + } + #[inline] + pub fn add_unk_8(&mut self, unk_8: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(UnlockConfigTemplate::VT_UNK_8, unk_8); + } + #[inline] + pub fn add_icon_res(&mut self, icon_res: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + UnlockConfigTemplate::VT_ICON_RES, + icon_res, + ); + } + #[inline] + pub fn add_unk_9(&mut self, unk_9: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_9, unk_9, 0); + } + #[inline] + pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(UnlockConfigTemplate::VT_NAME, name); + } + #[inline] + pub fn add_unk_10(&mut self, unk_10: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(UnlockConfigTemplate::VT_UNK_10, unk_10); + } + #[inline] + pub fn add_unk_11(&mut self, unk_11: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_11, unk_11, 0); + } + #[inline] + pub fn add_unk_12(&mut self, unk_12: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_12, unk_12, 0); + } + #[inline] + pub fn add_unk_13(&mut self, unk_13: bool) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_13, unk_13, false); + } + #[inline] + pub fn add_unk_14(&mut self, unk_14: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_14, unk_14, 0); + } + #[inline] + pub fn add_unk_15(&mut self, unk_15: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(UnlockConfigTemplate::VT_UNK_15, unk_15); + } + #[inline] + pub fn add_unk_16(&mut self, unk_16: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_16, unk_16, 0); + } + #[inline] + pub fn add_unk_17(&mut self, unk_17: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(UnlockConfigTemplate::VT_UNK_17, unk_17); + } + #[inline] + pub fn add_unk_18(&mut self, unk_18: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_18, unk_18, 0); + } + #[inline] + pub fn add_unk_19(&mut self, unk_19: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_19, unk_19, 0); + } + #[inline] + pub fn add_unk_20(&mut self, unk_20: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(UnlockConfigTemplate::VT_UNK_20, unk_20); + } + #[inline] + pub fn add_unk_21(&mut self, unk_21: i32) { + self.fbb_ + .push_slot::(UnlockConfigTemplate::VT_UNK_21, unk_21, 0); + } + #[inline] + pub fn add_unk_22(&mut self, unk_22: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(UnlockConfigTemplate::VT_UNK_22, unk_22); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> UnlockConfigTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + UnlockConfigTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for UnlockConfigTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("UnlockConfigTemplate"); - ds.field("id", &self.id()); - ds.field("unk_1", &self.unk_1()); - ds.field("unk_2", &self.unk_2()); - ds.field("unk_3", &self.unk_3()); - ds.field("unk_4", &self.unk_4()); - ds.field("unk_5", &self.unk_5()); - ds.field("unk_6", &self.unk_6()); - ds.field("unk_7", &self.unk_7()); - ds.field("unk_8", &self.unk_8()); - ds.field("icon_res", &self.icon_res()); - ds.field("unk_9", &self.unk_9()); - ds.field("name", &self.name()); - ds.field("unk_10", &self.unk_10()); - ds.field("unk_11", &self.unk_11()); - ds.field("unk_12", &self.unk_12()); - ds.field("unk_13", &self.unk_13()); - ds.field("unk_14", &self.unk_14()); - ds.field("unk_15", &self.unk_15()); - ds.field("unk_16", &self.unk_16()); - ds.field("unk_17", &self.unk_17()); - ds.field("unk_18", &self.unk_18()); - ds.field("unk_19", &self.unk_19()); - ds.field("unk_20", &self.unk_20()); - ds.field("unk_21", &self.unk_21()); - ds.field("unk_22", &self.unk_22()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("UnlockConfigTemplate"); + ds.field("id", &self.id()); + ds.field("unk_1", &self.unk_1()); + ds.field("unk_2", &self.unk_2()); + ds.field("unk_3", &self.unk_3()); + ds.field("unk_4", &self.unk_4()); + ds.field("unk_5", &self.unk_5()); + ds.field("unk_6", &self.unk_6()); + ds.field("unk_7", &self.unk_7()); + ds.field("unk_8", &self.unk_8()); + ds.field("icon_res", &self.icon_res()); + ds.field("unk_9", &self.unk_9()); + ds.field("name", &self.name()); + ds.field("unk_10", &self.unk_10()); + ds.field("unk_11", &self.unk_11()); + ds.field("unk_12", &self.unk_12()); + ds.field("unk_13", &self.unk_13()); + ds.field("unk_14", &self.unk_14()); + ds.field("unk_15", &self.unk_15()); + ds.field("unk_16", &self.unk_16()); + ds.field("unk_17", &self.unk_17()); + ds.field("unk_18", &self.unk_18()); + ds.field("unk_19", &self.unk_19()); + ds.field("unk_20", &self.unk_20()); + ds.field("unk_21", &self.unk_21()); + ds.field("unk_22", &self.unk_22()); + ds.finish() + } } pub enum PostGirlConfigTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct PostGirlConfigTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for PostGirlConfigTemplate<'a> { - type Inner = PostGirlConfigTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = PostGirlConfigTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> PostGirlConfigTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_NAME: flatbuffers::VOffsetT = 6; - pub const VT_TAG: flatbuffers::VOffsetT = 8; - pub const VT_UNK_1: flatbuffers::VOffsetT = 10; - pub const VT_UNK_2: flatbuffers::VOffsetT = 12; - pub const VT_UNK_3: flatbuffers::VOffsetT = 14; - pub const VT_ROLE_ICON_NAME: flatbuffers::VOffsetT = 16; - pub const VT_UNK_4: flatbuffers::VOffsetT = 18; - pub const VT_UNK_5: flatbuffers::VOffsetT = 20; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_NAME: flatbuffers::VOffsetT = 6; + pub const VT_TAG: flatbuffers::VOffsetT = 8; + pub const VT_UNK_1: flatbuffers::VOffsetT = 10; + pub const VT_UNK_2: flatbuffers::VOffsetT = 12; + pub const VT_UNK_3: flatbuffers::VOffsetT = 14; + pub const VT_ROLE_ICON_NAME: flatbuffers::VOffsetT = 16; + pub const VT_UNK_4: flatbuffers::VOffsetT = 18; + pub const VT_UNK_5: flatbuffers::VOffsetT = 20; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - PostGirlConfigTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args PostGirlConfigTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = PostGirlConfigTemplateBuilder::new(_fbb); - if let Some(x) = args.unk_5 { builder.add_unk_5(x); } - if let Some(x) = args.unk_4 { builder.add_unk_4(x); } - if let Some(x) = args.role_icon_name { builder.add_role_icon_name(x); } - builder.add_unk_3(args.unk_3); - if let Some(x) = args.unk_2 { builder.add_unk_2(x); } - builder.add_unk_1(args.unk_1); - if let Some(x) = args.tag { builder.add_tag(x); } - if let Some(x) = args.name { builder.add_name(x); } - builder.add_id(args.id); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + PostGirlConfigTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args PostGirlConfigTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = PostGirlConfigTemplateBuilder::new(_fbb); + if let Some(x) = args.unk_5 { + builder.add_unk_5(x); + } + if let Some(x) = args.unk_4 { + builder.add_unk_4(x); + } + if let Some(x) = args.role_icon_name { + builder.add_role_icon_name(x); + } + builder.add_unk_3(args.unk_3); + if let Some(x) = args.unk_2 { + builder.add_unk_2(x); + } + builder.add_unk_1(args.unk_1); + if let Some(x) = args.tag { + builder.add_tag(x); + } + if let Some(x) = args.name { + builder.add_name(x); + } + builder.add_id(args.id); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(PostGirlConfigTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(PostGirlConfigTemplate::VT_NAME, None)} - } - #[inline] - pub fn tag(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(PostGirlConfigTemplate::VT_TAG, None)} - } - #[inline] - pub fn unk_1(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(PostGirlConfigTemplate::VT_UNK_1, Some(0)).unwrap()} - } - #[inline] - pub fn unk_2(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(PostGirlConfigTemplate::VT_UNK_2, None)} - } - #[inline] - pub fn unk_3(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(PostGirlConfigTemplate::VT_UNK_3, Some(0)).unwrap()} - } - #[inline] - pub fn role_icon_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(PostGirlConfigTemplate::VT_ROLE_ICON_NAME, None)} - } - #[inline] - pub fn unk_4(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(PostGirlConfigTemplate::VT_UNK_4, None)} - } - #[inline] - pub fn unk_5(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(PostGirlConfigTemplate::VT_UNK_5, None)} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(PostGirlConfigTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(PostGirlConfigTemplate::VT_NAME, None) + } + } + #[inline] + pub fn tag(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(PostGirlConfigTemplate::VT_TAG, None) + } + } + #[inline] + pub fn unk_1(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(PostGirlConfigTemplate::VT_UNK_1, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_2(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(PostGirlConfigTemplate::VT_UNK_2, None) + } + } + #[inline] + pub fn unk_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(PostGirlConfigTemplate::VT_UNK_3, Some(0)) + .unwrap() + } + } + #[inline] + pub fn role_icon_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + PostGirlConfigTemplate::VT_ROLE_ICON_NAME, + None, + ) + } + } + #[inline] + pub fn unk_4(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(PostGirlConfigTemplate::VT_UNK_4, None) + } + } + #[inline] + pub fn unk_5(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + PostGirlConfigTemplate::VT_UNK_5, + None, + ) + } + } } impl flatbuffers::Verifiable for PostGirlConfigTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::>("name", Self::VT_NAME, false)? - .visit_field::>("tag", Self::VT_TAG, false)? - .visit_field::("unk_1", Self::VT_UNK_1, false)? - .visit_field::>("unk_2", Self::VT_UNK_2, false)? - .visit_field::("unk_3", Self::VT_UNK_3, false)? - .visit_field::>("role_icon_name", Self::VT_ROLE_ICON_NAME, false)? - .visit_field::>("unk_4", Self::VT_UNK_4, false)? - .visit_field::>>("unk_5", Self::VT_UNK_5, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::>("name", Self::VT_NAME, false)? + .visit_field::>("tag", Self::VT_TAG, false)? + .visit_field::("unk_1", Self::VT_UNK_1, false)? + .visit_field::>("unk_2", Self::VT_UNK_2, false)? + .visit_field::("unk_3", Self::VT_UNK_3, false)? + .visit_field::>( + "role_icon_name", + Self::VT_ROLE_ICON_NAME, + false, + )? + .visit_field::>("unk_4", Self::VT_UNK_4, false)? + .visit_field::>>( + "unk_5", + Self::VT_UNK_5, + false, + )? + .finish(); + Ok(()) + } } pub struct PostGirlConfigTemplateArgs<'a> { pub id: i32, @@ -1739,256 +2331,357 @@ pub struct PostGirlConfigTemplateArgs<'a> { pub unk_5: Option>>, } impl<'a> Default for PostGirlConfigTemplateArgs<'a> { - #[inline] - fn default() -> Self { - PostGirlConfigTemplateArgs { - id: 0, - name: None, - tag: None, - unk_1: 0, - unk_2: None, - unk_3: 0, - role_icon_name: None, - unk_4: None, - unk_5: None, + #[inline] + fn default() -> Self { + PostGirlConfigTemplateArgs { + id: 0, + name: None, + tag: None, + unk_1: 0, + unk_2: None, + unk_3: 0, + role_icon_name: None, + unk_4: None, + unk_5: None, + } } - } } pub struct PostGirlConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PostGirlConfigTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(PostGirlConfigTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(PostGirlConfigTemplate::VT_NAME, name); - } - #[inline] - pub fn add_tag(&mut self, tag: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(PostGirlConfigTemplate::VT_TAG, tag); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: i32) { - self.fbb_.push_slot::(PostGirlConfigTemplate::VT_UNK_1, unk_1, 0); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(PostGirlConfigTemplate::VT_UNK_2, unk_2); - } - #[inline] - pub fn add_unk_3(&mut self, unk_3: i32) { - self.fbb_.push_slot::(PostGirlConfigTemplate::VT_UNK_3, unk_3, 0); - } - #[inline] - pub fn add_role_icon_name(&mut self, role_icon_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(PostGirlConfigTemplate::VT_ROLE_ICON_NAME, role_icon_name); - } - #[inline] - pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(PostGirlConfigTemplate::VT_UNK_4, unk_4); - } - #[inline] - pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(PostGirlConfigTemplate::VT_UNK_5, unk_5); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PostGirlConfigTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - PostGirlConfigTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_ + .push_slot::(PostGirlConfigTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(PostGirlConfigTemplate::VT_NAME, name); + } + #[inline] + pub fn add_tag(&mut self, tag: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(PostGirlConfigTemplate::VT_TAG, tag); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: i32) { + self.fbb_ + .push_slot::(PostGirlConfigTemplate::VT_UNK_1, unk_1, 0); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(PostGirlConfigTemplate::VT_UNK_2, unk_2); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: i32) { + self.fbb_ + .push_slot::(PostGirlConfigTemplate::VT_UNK_3, unk_3, 0); + } + #[inline] + pub fn add_role_icon_name(&mut self, role_icon_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + PostGirlConfigTemplate::VT_ROLE_ICON_NAME, + role_icon_name, + ); + } + #[inline] + pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(PostGirlConfigTemplate::VT_UNK_4, unk_4); + } + #[inline] + pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(PostGirlConfigTemplate::VT_UNK_5, unk_5); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> PostGirlConfigTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + PostGirlConfigTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for PostGirlConfigTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("PostGirlConfigTemplate"); - ds.field("id", &self.id()); - ds.field("name", &self.name()); - ds.field("tag", &self.tag()); - ds.field("unk_1", &self.unk_1()); - ds.field("unk_2", &self.unk_2()); - ds.field("unk_3", &self.unk_3()); - ds.field("role_icon_name", &self.role_icon_name()); - ds.field("unk_4", &self.unk_4()); - ds.field("unk_5", &self.unk_5()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("PostGirlConfigTemplate"); + ds.field("id", &self.id()); + ds.field("name", &self.name()); + ds.field("tag", &self.tag()); + ds.field("unk_1", &self.unk_1()); + ds.field("unk_2", &self.unk_2()); + ds.field("unk_3", &self.unk_3()); + ds.field("role_icon_name", &self.role_icon_name()); + ds.field("unk_4", &self.unk_4()); + ds.field("unk_5", &self.unk_5()); + ds.finish() + } } pub enum ArchiveFileQuestTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct ArchiveFileQuestTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for ArchiveFileQuestTemplate<'a> { - type Inner = ArchiveFileQuestTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = ArchiveFileQuestTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> ArchiveFileQuestTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_ARCHIVE_ID: flatbuffers::VOffsetT = 6; - pub const VT_ARCHIVE_NAME: flatbuffers::VOffsetT = 8; - pub const VT_DIFFICULTY_LV: flatbuffers::VOffsetT = 10; - pub const VT_SHOW_TYPE: flatbuffers::VOffsetT = 12; - pub const VT_RECOMMENDED_HIT_TYPES: flatbuffers::VOffsetT = 14; - pub const VT_VIDEO: flatbuffers::VOffsetT = 16; - pub const VT_ARCHIVE_FILE_NAME: flatbuffers::VOffsetT = 18; - pub const VT_ARCHIVE_FILE_NUM: flatbuffers::VOffsetT = 20; - pub const VT_ARCHIVE_FILE_NI_IDS: flatbuffers::VOffsetT = 22; - pub const VT_AUTO_DISTRIBUTION: flatbuffers::VOffsetT = 24; - pub const VT_UNK_1: flatbuffers::VOffsetT = 26; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_ARCHIVE_ID: flatbuffers::VOffsetT = 6; + pub const VT_ARCHIVE_NAME: flatbuffers::VOffsetT = 8; + pub const VT_DIFFICULTY_LV: flatbuffers::VOffsetT = 10; + pub const VT_SHOW_TYPE: flatbuffers::VOffsetT = 12; + pub const VT_RECOMMENDED_HIT_TYPES: flatbuffers::VOffsetT = 14; + pub const VT_VIDEO: flatbuffers::VOffsetT = 16; + pub const VT_ARCHIVE_FILE_NAME: flatbuffers::VOffsetT = 18; + pub const VT_ARCHIVE_FILE_NUM: flatbuffers::VOffsetT = 20; + pub const VT_ARCHIVE_FILE_NI_IDS: flatbuffers::VOffsetT = 22; + pub const VT_AUTO_DISTRIBUTION: flatbuffers::VOffsetT = 24; + pub const VT_UNK_1: flatbuffers::VOffsetT = 26; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ArchiveFileQuestTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args ArchiveFileQuestTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = ArchiveFileQuestTemplateBuilder::new(_fbb); - if let Some(x) = args.archive_file_ni_ids { builder.add_archive_file_ni_ids(x); } - if let Some(x) = args.archive_file_num { builder.add_archive_file_num(x); } - if let Some(x) = args.archive_file_name { builder.add_archive_file_name(x); } - if let Some(x) = args.video { builder.add_video(x); } - if let Some(x) = args.recommended_hit_types { builder.add_recommended_hit_types(x); } - builder.add_show_type(args.show_type); - builder.add_difficulty_lv(args.difficulty_lv); - if let Some(x) = args.archive_name { builder.add_archive_name(x); } - builder.add_archive_id(args.archive_id); - builder.add_id(args.id); - builder.add_unk_1(args.unk_1); - builder.add_auto_distribution(args.auto_distribution); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ArchiveFileQuestTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args ArchiveFileQuestTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = ArchiveFileQuestTemplateBuilder::new(_fbb); + if let Some(x) = args.archive_file_ni_ids { + builder.add_archive_file_ni_ids(x); + } + if let Some(x) = args.archive_file_num { + builder.add_archive_file_num(x); + } + if let Some(x) = args.archive_file_name { + builder.add_archive_file_name(x); + } + if let Some(x) = args.video { + builder.add_video(x); + } + if let Some(x) = args.recommended_hit_types { + builder.add_recommended_hit_types(x); + } + builder.add_show_type(args.show_type); + builder.add_difficulty_lv(args.difficulty_lv); + if let Some(x) = args.archive_name { + builder.add_archive_name(x); + } + builder.add_archive_id(args.archive_id); + builder.add_id(args.id); + builder.add_unk_1(args.unk_1); + builder.add_auto_distribution(args.auto_distribution); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveFileQuestTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn archive_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveFileQuestTemplate::VT_ARCHIVE_ID, Some(0)).unwrap()} - } - #[inline] - pub fn archive_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ArchiveFileQuestTemplate::VT_ARCHIVE_NAME, None)} - } - #[inline] - pub fn difficulty_lv(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveFileQuestTemplate::VT_DIFFICULTY_LV, Some(0)).unwrap()} - } - #[inline] - pub fn show_type(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveFileQuestTemplate::VT_SHOW_TYPE, Some(0)).unwrap()} - } - #[inline] - pub fn recommended_hit_types(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(ArchiveFileQuestTemplate::VT_RECOMMENDED_HIT_TYPES, None)} - } - #[inline] - pub fn video(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ArchiveFileQuestTemplate::VT_VIDEO, None)} - } - #[inline] - pub fn archive_file_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NAME, None)} - } - #[inline] - pub fn archive_file_num(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NUM, None)} - } - #[inline] - pub fn archive_file_ni_ids(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NI_IDS, None)} - } - #[inline] - pub fn auto_distribution(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveFileQuestTemplate::VT_AUTO_DISTRIBUTION, Some(false)).unwrap()} - } - #[inline] - pub fn unk_1(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveFileQuestTemplate::VT_UNK_1, Some(false)).unwrap()} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveFileQuestTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn archive_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveFileQuestTemplate::VT_ARCHIVE_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn archive_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + ArchiveFileQuestTemplate::VT_ARCHIVE_NAME, + None, + ) + } + } + #[inline] + pub fn difficulty_lv(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveFileQuestTemplate::VT_DIFFICULTY_LV, Some(0)) + .unwrap() + } + } + #[inline] + pub fn show_type(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveFileQuestTemplate::VT_SHOW_TYPE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn recommended_hit_types(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + ArchiveFileQuestTemplate::VT_RECOMMENDED_HIT_TYPES, + None, + ) + } + } + #[inline] + pub fn video(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(ArchiveFileQuestTemplate::VT_VIDEO, None) + } + } + #[inline] + pub fn archive_file_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NAME, + None, + ) + } + } + #[inline] + pub fn archive_file_num(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NUM, + None, + ) + } + } + #[inline] + pub fn archive_file_ni_ids(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NI_IDS, + None, + ) + } + } + #[inline] + pub fn auto_distribution(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveFileQuestTemplate::VT_AUTO_DISTRIBUTION, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_1(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveFileQuestTemplate::VT_UNK_1, Some(false)) + .unwrap() + } + } } impl flatbuffers::Verifiable for ArchiveFileQuestTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::("archive_id", Self::VT_ARCHIVE_ID, false)? - .visit_field::>("archive_name", Self::VT_ARCHIVE_NAME, false)? - .visit_field::("difficulty_lv", Self::VT_DIFFICULTY_LV, false)? - .visit_field::("show_type", Self::VT_SHOW_TYPE, false)? - .visit_field::>>("recommended_hit_types", Self::VT_RECOMMENDED_HIT_TYPES, false)? - .visit_field::>("video", Self::VT_VIDEO, false)? - .visit_field::>("archive_file_name", Self::VT_ARCHIVE_FILE_NAME, false)? - .visit_field::>("archive_file_num", Self::VT_ARCHIVE_FILE_NUM, false)? - .visit_field::>>("archive_file_ni_ids", Self::VT_ARCHIVE_FILE_NI_IDS, false)? - .visit_field::("auto_distribution", Self::VT_AUTO_DISTRIBUTION, false)? - .visit_field::("unk_1", Self::VT_UNK_1, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::("archive_id", Self::VT_ARCHIVE_ID, false)? + .visit_field::>( + "archive_name", + Self::VT_ARCHIVE_NAME, + false, + )? + .visit_field::("difficulty_lv", Self::VT_DIFFICULTY_LV, false)? + .visit_field::("show_type", Self::VT_SHOW_TYPE, false)? + .visit_field::>>( + "recommended_hit_types", + Self::VT_RECOMMENDED_HIT_TYPES, + false, + )? + .visit_field::>("video", Self::VT_VIDEO, false)? + .visit_field::>( + "archive_file_name", + Self::VT_ARCHIVE_FILE_NAME, + false, + )? + .visit_field::>( + "archive_file_num", + Self::VT_ARCHIVE_FILE_NUM, + false, + )? + .visit_field::>>( + "archive_file_ni_ids", + Self::VT_ARCHIVE_FILE_NI_IDS, + false, + )? + .visit_field::("auto_distribution", Self::VT_AUTO_DISTRIBUTION, false)? + .visit_field::("unk_1", Self::VT_UNK_1, false)? + .finish(); + Ok(()) + } } pub struct ArchiveFileQuestTemplateArgs<'a> { pub id: i32, @@ -2005,474 +2698,683 @@ pub struct ArchiveFileQuestTemplateArgs<'a> { pub unk_1: bool, } impl<'a> Default for ArchiveFileQuestTemplateArgs<'a> { - #[inline] - fn default() -> Self { - ArchiveFileQuestTemplateArgs { - id: 0, - archive_id: 0, - archive_name: None, - difficulty_lv: 0, - show_type: 0, - recommended_hit_types: None, - video: None, - archive_file_name: None, - archive_file_num: None, - archive_file_ni_ids: None, - auto_distribution: false, - unk_1: false, + #[inline] + fn default() -> Self { + ArchiveFileQuestTemplateArgs { + id: 0, + archive_id: 0, + archive_name: None, + difficulty_lv: 0, + show_type: 0, + recommended_hit_types: None, + video: None, + archive_file_name: None, + archive_file_num: None, + archive_file_ni_ids: None, + auto_distribution: false, + unk_1: false, + } } - } } pub struct ArchiveFileQuestTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ArchiveFileQuestTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(ArchiveFileQuestTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_archive_id(&mut self, archive_id: i32) { - self.fbb_.push_slot::(ArchiveFileQuestTemplate::VT_ARCHIVE_ID, archive_id, 0); - } - #[inline] - pub fn add_archive_name(&mut self, archive_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ArchiveFileQuestTemplate::VT_ARCHIVE_NAME, archive_name); - } - #[inline] - pub fn add_difficulty_lv(&mut self, difficulty_lv: i32) { - self.fbb_.push_slot::(ArchiveFileQuestTemplate::VT_DIFFICULTY_LV, difficulty_lv, 0); - } - #[inline] - pub fn add_show_type(&mut self, show_type: i32) { - self.fbb_.push_slot::(ArchiveFileQuestTemplate::VT_SHOW_TYPE, show_type, 0); - } - #[inline] - pub fn add_recommended_hit_types(&mut self, recommended_hit_types: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ArchiveFileQuestTemplate::VT_RECOMMENDED_HIT_TYPES, recommended_hit_types); - } - #[inline] - pub fn add_video(&mut self, video: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ArchiveFileQuestTemplate::VT_VIDEO, video); - } - #[inline] - pub fn add_archive_file_name(&mut self, archive_file_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NAME, archive_file_name); - } - #[inline] - pub fn add_archive_file_num(&mut self, archive_file_num: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NUM, archive_file_num); - } - #[inline] - pub fn add_archive_file_ni_ids(&mut self, archive_file_ni_ids: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NI_IDS, archive_file_ni_ids); - } - #[inline] - pub fn add_auto_distribution(&mut self, auto_distribution: bool) { - self.fbb_.push_slot::(ArchiveFileQuestTemplate::VT_AUTO_DISTRIBUTION, auto_distribution, false); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: bool) { - self.fbb_.push_slot::(ArchiveFileQuestTemplate::VT_UNK_1, unk_1, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ArchiveFileQuestTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - ArchiveFileQuestTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_ + .push_slot::(ArchiveFileQuestTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_archive_id(&mut self, archive_id: i32) { + self.fbb_ + .push_slot::(ArchiveFileQuestTemplate::VT_ARCHIVE_ID, archive_id, 0); + } + #[inline] + pub fn add_archive_name(&mut self, archive_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + ArchiveFileQuestTemplate::VT_ARCHIVE_NAME, + archive_name, + ); + } + #[inline] + pub fn add_difficulty_lv(&mut self, difficulty_lv: i32) { + self.fbb_ + .push_slot::(ArchiveFileQuestTemplate::VT_DIFFICULTY_LV, difficulty_lv, 0); + } + #[inline] + pub fn add_show_type(&mut self, show_type: i32) { + self.fbb_ + .push_slot::(ArchiveFileQuestTemplate::VT_SHOW_TYPE, show_type, 0); + } + #[inline] + pub fn add_recommended_hit_types( + &mut self, + recommended_hit_types: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + ArchiveFileQuestTemplate::VT_RECOMMENDED_HIT_TYPES, + recommended_hit_types, + ); + } + #[inline] + pub fn add_video(&mut self, video: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + ArchiveFileQuestTemplate::VT_VIDEO, + video, + ); + } + #[inline] + pub fn add_archive_file_name(&mut self, archive_file_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NAME, + archive_file_name, + ); + } + #[inline] + pub fn add_archive_file_num(&mut self, archive_file_num: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NUM, + archive_file_num, + ); + } + #[inline] + pub fn add_archive_file_ni_ids( + &mut self, + archive_file_ni_ids: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NI_IDS, + archive_file_ni_ids, + ); + } + #[inline] + pub fn add_auto_distribution(&mut self, auto_distribution: bool) { + self.fbb_.push_slot::( + ArchiveFileQuestTemplate::VT_AUTO_DISTRIBUTION, + auto_distribution, + false, + ); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: bool) { + self.fbb_ + .push_slot::(ArchiveFileQuestTemplate::VT_UNK_1, unk_1, false); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> ArchiveFileQuestTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + ArchiveFileQuestTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for ArchiveFileQuestTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ArchiveFileQuestTemplate"); - ds.field("id", &self.id()); - ds.field("archive_id", &self.archive_id()); - ds.field("archive_name", &self.archive_name()); - ds.field("difficulty_lv", &self.difficulty_lv()); - ds.field("show_type", &self.show_type()); - ds.field("recommended_hit_types", &self.recommended_hit_types()); - ds.field("video", &self.video()); - ds.field("archive_file_name", &self.archive_file_name()); - ds.field("archive_file_num", &self.archive_file_num()); - ds.field("archive_file_ni_ids", &self.archive_file_ni_ids()); - ds.field("auto_distribution", &self.auto_distribution()); - ds.field("unk_1", &self.unk_1()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ArchiveFileQuestTemplate"); + ds.field("id", &self.id()); + ds.field("archive_id", &self.archive_id()); + ds.field("archive_name", &self.archive_name()); + ds.field("difficulty_lv", &self.difficulty_lv()); + ds.field("show_type", &self.show_type()); + ds.field("recommended_hit_types", &self.recommended_hit_types()); + ds.field("video", &self.video()); + ds.field("archive_file_name", &self.archive_file_name()); + ds.field("archive_file_num", &self.archive_file_num()); + ds.field("archive_file_ni_ids", &self.archive_file_ni_ids()); + ds.field("auto_distribution", &self.auto_distribution()); + ds.field("unk_1", &self.unk_1()); + ds.finish() + } } pub enum ArchiveBattleQuestTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct ArchiveBattleQuestTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for ArchiveBattleQuestTemplate<'a> { - type Inner = ArchiveBattleQuestTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = ArchiveBattleQuestTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> ArchiveBattleQuestTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_QUEST_NAME: flatbuffers::VOffsetT = 6; - pub const VT_QUEST_DESC: flatbuffers::VOffsetT = 8; - pub const VT_TARGET: flatbuffers::VOffsetT = 10; - pub const VT_QUEST_TYPE: flatbuffers::VOffsetT = 12; - pub const VT_CHAPTER: flatbuffers::VOffsetT = 14; - pub const VT_DIFFICULTY: flatbuffers::VOffsetT = 16; - pub const VT_MONSTER_LEVEL: flatbuffers::VOffsetT = 18; - pub const VT_RECOMMENDED_LEVEL: flatbuffers::VOffsetT = 20; - pub const VT_UNK_1: flatbuffers::VOffsetT = 22; - pub const VT_UNK_2: flatbuffers::VOffsetT = 24; - pub const VT_HOLLOW_ID: flatbuffers::VOffsetT = 26; - pub const VT_FIRST_BATTLE_EVENT_ID: flatbuffers::VOffsetT = 28; - pub const VT_BATTLE_EVENT_ID: flatbuffers::VOffsetT = 30; - pub const VT_UNK_3: flatbuffers::VOffsetT = 32; - pub const VT_BATTLE_RANK: flatbuffers::VOffsetT = 34; - pub const VT_SLOT_1_AVATAR: flatbuffers::VOffsetT = 36; - pub const VT_SLOT_2_AVATAR: flatbuffers::VOffsetT = 38; - pub const VT_SLOT_3_AVATAR: flatbuffers::VOffsetT = 40; - pub const VT_BUDDY: flatbuffers::VOffsetT = 42; - pub const VT_UNK_4: flatbuffers::VOffsetT = 44; - pub const VT_UNK_5: flatbuffers::VOffsetT = 46; - pub const VT_UNK_6: flatbuffers::VOffsetT = 48; - pub const VT_CHAPTER_NAME: flatbuffers::VOffsetT = 50; - pub const VT_QUEST_IMAGE: flatbuffers::VOffsetT = 52; - pub const VT_UNK_7: flatbuffers::VOffsetT = 54; - pub const VT_UNK_8: flatbuffers::VOffsetT = 56; - pub const VT_UNK_9: flatbuffers::VOffsetT = 58; - pub const VT_UNK_10: flatbuffers::VOffsetT = 60; - pub const VT_UNK_11: flatbuffers::VOffsetT = 62; - pub const VT_UNK_12: flatbuffers::VOffsetT = 64; - pub const VT_UNK_13: flatbuffers::VOffsetT = 66; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_QUEST_NAME: flatbuffers::VOffsetT = 6; + pub const VT_QUEST_DESC: flatbuffers::VOffsetT = 8; + pub const VT_TARGET: flatbuffers::VOffsetT = 10; + pub const VT_QUEST_TYPE: flatbuffers::VOffsetT = 12; + pub const VT_CHAPTER: flatbuffers::VOffsetT = 14; + pub const VT_DIFFICULTY: flatbuffers::VOffsetT = 16; + pub const VT_MONSTER_LEVEL: flatbuffers::VOffsetT = 18; + pub const VT_RECOMMENDED_LEVEL: flatbuffers::VOffsetT = 20; + pub const VT_UNK_1: flatbuffers::VOffsetT = 22; + pub const VT_UNK_2: flatbuffers::VOffsetT = 24; + pub const VT_HOLLOW_ID: flatbuffers::VOffsetT = 26; + pub const VT_FIRST_BATTLE_EVENT_ID: flatbuffers::VOffsetT = 28; + pub const VT_BATTLE_EVENT_ID: flatbuffers::VOffsetT = 30; + pub const VT_UNK_3: flatbuffers::VOffsetT = 32; + pub const VT_BATTLE_RANK: flatbuffers::VOffsetT = 34; + pub const VT_SLOT_1_AVATAR: flatbuffers::VOffsetT = 36; + pub const VT_SLOT_2_AVATAR: flatbuffers::VOffsetT = 38; + pub const VT_SLOT_3_AVATAR: flatbuffers::VOffsetT = 40; + pub const VT_BUDDY: flatbuffers::VOffsetT = 42; + pub const VT_UNK_4: flatbuffers::VOffsetT = 44; + pub const VT_UNK_5: flatbuffers::VOffsetT = 46; + pub const VT_UNK_6: flatbuffers::VOffsetT = 48; + pub const VT_CHAPTER_NAME: flatbuffers::VOffsetT = 50; + pub const VT_QUEST_IMAGE: flatbuffers::VOffsetT = 52; + pub const VT_UNK_7: flatbuffers::VOffsetT = 54; + pub const VT_UNK_8: flatbuffers::VOffsetT = 56; + pub const VT_UNK_9: flatbuffers::VOffsetT = 58; + pub const VT_UNK_10: flatbuffers::VOffsetT = 60; + pub const VT_UNK_11: flatbuffers::VOffsetT = 62; + pub const VT_UNK_12: flatbuffers::VOffsetT = 64; + pub const VT_UNK_13: flatbuffers::VOffsetT = 66; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ArchiveBattleQuestTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args ArchiveBattleQuestTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = ArchiveBattleQuestTemplateBuilder::new(_fbb); - builder.add_unk_13(args.unk_13); - if let Some(x) = args.unk_12 { builder.add_unk_12(x); } - builder.add_unk_11(args.unk_11); - builder.add_unk_9(args.unk_9); - if let Some(x) = args.unk_7 { builder.add_unk_7(x); } - builder.add_quest_image(args.quest_image); - if let Some(x) = args.chapter_name { builder.add_chapter_name(x); } - builder.add_unk_5(args.unk_5); - builder.add_buddy(args.buddy); - builder.add_slot_3_avatar(args.slot_3_avatar); - builder.add_slot_2_avatar(args.slot_2_avatar); - builder.add_slot_1_avatar(args.slot_1_avatar); - if let Some(x) = args.battle_rank { builder.add_battle_rank(x); } - builder.add_unk_3(args.unk_3); - builder.add_battle_event_id(args.battle_event_id); - builder.add_first_battle_event_id(args.first_battle_event_id); - builder.add_hollow_id(args.hollow_id); - builder.add_unk_2(args.unk_2); - builder.add_unk_1(args.unk_1); - builder.add_recommended_level(args.recommended_level); - builder.add_monster_level(args.monster_level); - builder.add_difficulty(args.difficulty); - builder.add_chapter(args.chapter); - builder.add_quest_type(args.quest_type); - if let Some(x) = args.target { builder.add_target(x); } - if let Some(x) = args.quest_desc { builder.add_quest_desc(x); } - if let Some(x) = args.quest_name { builder.add_quest_name(x); } - builder.add_id(args.id); - builder.add_unk_10(args.unk_10); - builder.add_unk_8(args.unk_8); - builder.add_unk_6(args.unk_6); - builder.add_unk_4(args.unk_4); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ArchiveBattleQuestTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args ArchiveBattleQuestTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = ArchiveBattleQuestTemplateBuilder::new(_fbb); + builder.add_unk_13(args.unk_13); + if let Some(x) = args.unk_12 { + builder.add_unk_12(x); + } + builder.add_unk_11(args.unk_11); + builder.add_unk_9(args.unk_9); + if let Some(x) = args.unk_7 { + builder.add_unk_7(x); + } + builder.add_quest_image(args.quest_image); + if let Some(x) = args.chapter_name { + builder.add_chapter_name(x); + } + builder.add_unk_5(args.unk_5); + builder.add_buddy(args.buddy); + builder.add_slot_3_avatar(args.slot_3_avatar); + builder.add_slot_2_avatar(args.slot_2_avatar); + builder.add_slot_1_avatar(args.slot_1_avatar); + if let Some(x) = args.battle_rank { + builder.add_battle_rank(x); + } + builder.add_unk_3(args.unk_3); + builder.add_battle_event_id(args.battle_event_id); + builder.add_first_battle_event_id(args.first_battle_event_id); + builder.add_hollow_id(args.hollow_id); + builder.add_unk_2(args.unk_2); + builder.add_unk_1(args.unk_1); + builder.add_recommended_level(args.recommended_level); + builder.add_monster_level(args.monster_level); + builder.add_difficulty(args.difficulty); + builder.add_chapter(args.chapter); + builder.add_quest_type(args.quest_type); + if let Some(x) = args.target { + builder.add_target(x); + } + if let Some(x) = args.quest_desc { + builder.add_quest_desc(x); + } + if let Some(x) = args.quest_name { + builder.add_quest_name(x); + } + builder.add_id(args.id); + builder.add_unk_10(args.unk_10); + builder.add_unk_8(args.unk_8); + builder.add_unk_6(args.unk_6); + builder.add_unk_4(args.unk_4); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn quest_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ArchiveBattleQuestTemplate::VT_QUEST_NAME, None)} - } - #[inline] - pub fn quest_desc(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ArchiveBattleQuestTemplate::VT_QUEST_DESC, None)} - } - #[inline] - pub fn target(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ArchiveBattleQuestTemplate::VT_TARGET, None)} - } - #[inline] - pub fn quest_type(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_QUEST_TYPE, Some(0)).unwrap()} - } - #[inline] - pub fn chapter(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_CHAPTER, Some(0)).unwrap()} - } - #[inline] - pub fn difficulty(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_DIFFICULTY, Some(0)).unwrap()} - } - #[inline] - pub fn monster_level(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_MONSTER_LEVEL, Some(0)).unwrap()} - } - #[inline] - pub fn recommended_level(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_RECOMMENDED_LEVEL, Some(0)).unwrap()} - } - #[inline] - pub fn unk_1(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_UNK_1, Some(0)).unwrap()} - } - #[inline] - pub fn unk_2(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_UNK_2, Some(0)).unwrap()} - } - #[inline] - pub fn hollow_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_HOLLOW_ID, Some(0)).unwrap()} - } - #[inline] - pub fn first_battle_event_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_FIRST_BATTLE_EVENT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn battle_event_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_BATTLE_EVENT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn unk_3(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_UNK_3, Some(0)).unwrap()} - } - #[inline] - pub fn battle_rank(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ArchiveBattleQuestTemplate::VT_BATTLE_RANK, None)} - } - #[inline] - pub fn slot_1_avatar(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_SLOT_1_AVATAR, Some(0)).unwrap()} - } - #[inline] - pub fn slot_2_avatar(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_SLOT_2_AVATAR, Some(0)).unwrap()} - } - #[inline] - pub fn slot_3_avatar(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_SLOT_3_AVATAR, Some(0)).unwrap()} - } - #[inline] - pub fn buddy(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_BUDDY, Some(0)).unwrap()} - } - #[inline] - pub fn unk_4(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_UNK_4, Some(false)).unwrap()} - } - #[inline] - pub fn unk_5(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_UNK_5, Some(0)).unwrap()} - } - #[inline] - pub fn unk_6(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_UNK_6, Some(false)).unwrap()} - } - #[inline] - pub fn chapter_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ArchiveBattleQuestTemplate::VT_CHAPTER_NAME, None)} - } - #[inline] - pub fn quest_image(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_QUEST_IMAGE, Some(0)).unwrap()} - } - #[inline] - pub fn unk_7(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ArchiveBattleQuestTemplate::VT_UNK_7, None)} - } - #[inline] - pub fn unk_8(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_UNK_8, Some(false)).unwrap()} - } - #[inline] - pub fn unk_9(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_UNK_9, Some(0)).unwrap()} - } - #[inline] - pub fn unk_10(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_UNK_10, Some(false)).unwrap()} - } - #[inline] - pub fn unk_11(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_UNK_11, Some(0)).unwrap()} - } - #[inline] - pub fn unk_12(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ArchiveBattleQuestTemplate::VT_UNK_12, None)} - } - #[inline] - pub fn unk_13(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ArchiveBattleQuestTemplate::VT_UNK_13, Some(0)).unwrap()} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn quest_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + ArchiveBattleQuestTemplate::VT_QUEST_NAME, + None, + ) + } + } + #[inline] + pub fn quest_desc(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + ArchiveBattleQuestTemplate::VT_QUEST_DESC, + None, + ) + } + } + #[inline] + pub fn target(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + ArchiveBattleQuestTemplate::VT_TARGET, + None, + ) + } + } + #[inline] + pub fn quest_type(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_QUEST_TYPE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn chapter(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_CHAPTER, Some(0)) + .unwrap() + } + } + #[inline] + pub fn difficulty(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_DIFFICULTY, Some(0)) + .unwrap() + } + } + #[inline] + pub fn monster_level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_MONSTER_LEVEL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn recommended_level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_RECOMMENDED_LEVEL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_1(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_UNK_1, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_2(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_UNK_2, Some(0)) + .unwrap() + } + } + #[inline] + pub fn hollow_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_HOLLOW_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn first_battle_event_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::( + ArchiveBattleQuestTemplate::VT_FIRST_BATTLE_EVENT_ID, + Some(0), + ) + .unwrap() + } + } + #[inline] + pub fn battle_event_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_BATTLE_EVENT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_UNK_3, Some(0)) + .unwrap() + } + } + #[inline] + pub fn battle_rank(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + ArchiveBattleQuestTemplate::VT_BATTLE_RANK, + None, + ) + } + } + #[inline] + pub fn slot_1_avatar(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_SLOT_1_AVATAR, Some(0)) + .unwrap() + } + } + #[inline] + pub fn slot_2_avatar(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_SLOT_2_AVATAR, Some(0)) + .unwrap() + } + } + #[inline] + pub fn slot_3_avatar(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_SLOT_3_AVATAR, Some(0)) + .unwrap() + } + } + #[inline] + pub fn buddy(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_BUDDY, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_4(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_UNK_4, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_5(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_UNK_5, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_6(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_UNK_6, Some(false)) + .unwrap() + } + } + #[inline] + pub fn chapter_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + ArchiveBattleQuestTemplate::VT_CHAPTER_NAME, + None, + ) + } + } + #[inline] + pub fn quest_image(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_QUEST_IMAGE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_7(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + ArchiveBattleQuestTemplate::VT_UNK_7, + None, + ) + } + } + #[inline] + pub fn unk_8(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_UNK_8, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_9(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_UNK_9, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_10(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_UNK_10, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_11(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_UNK_11, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_12(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + ArchiveBattleQuestTemplate::VT_UNK_12, + None, + ) + } + } + #[inline] + pub fn unk_13(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ArchiveBattleQuestTemplate::VT_UNK_13, Some(0)) + .unwrap() + } + } } impl flatbuffers::Verifiable for ArchiveBattleQuestTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::>("quest_name", Self::VT_QUEST_NAME, false)? - .visit_field::>("quest_desc", Self::VT_QUEST_DESC, false)? - .visit_field::>("target", Self::VT_TARGET, false)? - .visit_field::("quest_type", Self::VT_QUEST_TYPE, false)? - .visit_field::("chapter", Self::VT_CHAPTER, false)? - .visit_field::("difficulty", Self::VT_DIFFICULTY, false)? - .visit_field::("monster_level", Self::VT_MONSTER_LEVEL, false)? - .visit_field::("recommended_level", Self::VT_RECOMMENDED_LEVEL, false)? - .visit_field::("unk_1", Self::VT_UNK_1, false)? - .visit_field::("unk_2", Self::VT_UNK_2, false)? - .visit_field::("hollow_id", Self::VT_HOLLOW_ID, false)? - .visit_field::("first_battle_event_id", Self::VT_FIRST_BATTLE_EVENT_ID, false)? - .visit_field::("battle_event_id", Self::VT_BATTLE_EVENT_ID, false)? - .visit_field::("unk_3", Self::VT_UNK_3, false)? - .visit_field::>("battle_rank", Self::VT_BATTLE_RANK, false)? - .visit_field::("slot_1_avatar", Self::VT_SLOT_1_AVATAR, false)? - .visit_field::("slot_2_avatar", Self::VT_SLOT_2_AVATAR, false)? - .visit_field::("slot_3_avatar", Self::VT_SLOT_3_AVATAR, false)? - .visit_field::("buddy", Self::VT_BUDDY, false)? - .visit_field::("unk_4", Self::VT_UNK_4, false)? - .visit_field::("unk_5", Self::VT_UNK_5, false)? - .visit_field::("unk_6", Self::VT_UNK_6, false)? - .visit_field::>("chapter_name", Self::VT_CHAPTER_NAME, false)? - .visit_field::("quest_image", Self::VT_QUEST_IMAGE, false)? - .visit_field::>("unk_7", Self::VT_UNK_7, false)? - .visit_field::("unk_8", Self::VT_UNK_8, false)? - .visit_field::("unk_9", Self::VT_UNK_9, false)? - .visit_field::("unk_10", Self::VT_UNK_10, false)? - .visit_field::("unk_11", Self::VT_UNK_11, false)? - .visit_field::>("unk_12", Self::VT_UNK_12, false)? - .visit_field::("unk_13", Self::VT_UNK_13, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::>( + "quest_name", + Self::VT_QUEST_NAME, + false, + )? + .visit_field::>( + "quest_desc", + Self::VT_QUEST_DESC, + false, + )? + .visit_field::>("target", Self::VT_TARGET, false)? + .visit_field::("quest_type", Self::VT_QUEST_TYPE, false)? + .visit_field::("chapter", Self::VT_CHAPTER, false)? + .visit_field::("difficulty", Self::VT_DIFFICULTY, false)? + .visit_field::("monster_level", Self::VT_MONSTER_LEVEL, false)? + .visit_field::("recommended_level", Self::VT_RECOMMENDED_LEVEL, false)? + .visit_field::("unk_1", Self::VT_UNK_1, false)? + .visit_field::("unk_2", Self::VT_UNK_2, false)? + .visit_field::("hollow_id", Self::VT_HOLLOW_ID, false)? + .visit_field::( + "first_battle_event_id", + Self::VT_FIRST_BATTLE_EVENT_ID, + false, + )? + .visit_field::("battle_event_id", Self::VT_BATTLE_EVENT_ID, false)? + .visit_field::("unk_3", Self::VT_UNK_3, false)? + .visit_field::>( + "battle_rank", + Self::VT_BATTLE_RANK, + false, + )? + .visit_field::("slot_1_avatar", Self::VT_SLOT_1_AVATAR, false)? + .visit_field::("slot_2_avatar", Self::VT_SLOT_2_AVATAR, false)? + .visit_field::("slot_3_avatar", Self::VT_SLOT_3_AVATAR, false)? + .visit_field::("buddy", Self::VT_BUDDY, false)? + .visit_field::("unk_4", Self::VT_UNK_4, false)? + .visit_field::("unk_5", Self::VT_UNK_5, false)? + .visit_field::("unk_6", Self::VT_UNK_6, false)? + .visit_field::>( + "chapter_name", + Self::VT_CHAPTER_NAME, + false, + )? + .visit_field::("quest_image", Self::VT_QUEST_IMAGE, false)? + .visit_field::>("unk_7", Self::VT_UNK_7, false)? + .visit_field::("unk_8", Self::VT_UNK_8, false)? + .visit_field::("unk_9", Self::VT_UNK_9, false)? + .visit_field::("unk_10", Self::VT_UNK_10, false)? + .visit_field::("unk_11", Self::VT_UNK_11, false)? + .visit_field::>("unk_12", Self::VT_UNK_12, false)? + .visit_field::("unk_13", Self::VT_UNK_13, false)? + .finish(); + Ok(()) + } } pub struct ArchiveBattleQuestTemplateArgs<'a> { pub id: i32, @@ -2509,344 +3411,472 @@ pub struct ArchiveBattleQuestTemplateArgs<'a> { pub unk_13: i32, } impl<'a> Default for ArchiveBattleQuestTemplateArgs<'a> { - #[inline] - fn default() -> Self { - ArchiveBattleQuestTemplateArgs { - id: 0, - quest_name: None, - quest_desc: None, - target: None, - quest_type: 0, - chapter: 0, - difficulty: 0, - monster_level: 0, - recommended_level: 0, - unk_1: 0, - unk_2: 0, - hollow_id: 0, - first_battle_event_id: 0, - battle_event_id: 0, - unk_3: 0, - battle_rank: None, - slot_1_avatar: 0, - slot_2_avatar: 0, - slot_3_avatar: 0, - buddy: 0, - unk_4: false, - unk_5: 0, - unk_6: false, - chapter_name: None, - quest_image: 0, - unk_7: None, - unk_8: false, - unk_9: 0, - unk_10: false, - unk_11: 0, - unk_12: None, - unk_13: 0, + #[inline] + fn default() -> Self { + ArchiveBattleQuestTemplateArgs { + id: 0, + quest_name: None, + quest_desc: None, + target: None, + quest_type: 0, + chapter: 0, + difficulty: 0, + monster_level: 0, + recommended_level: 0, + unk_1: 0, + unk_2: 0, + hollow_id: 0, + first_battle_event_id: 0, + battle_event_id: 0, + unk_3: 0, + battle_rank: None, + slot_1_avatar: 0, + slot_2_avatar: 0, + slot_3_avatar: 0, + buddy: 0, + unk_4: false, + unk_5: 0, + unk_6: false, + chapter_name: None, + quest_image: 0, + unk_7: None, + unk_8: false, + unk_9: 0, + unk_10: false, + unk_11: 0, + unk_12: None, + unk_13: 0, + } } - } } pub struct ArchiveBattleQuestTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ArchiveBattleQuestTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_quest_name(&mut self, quest_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ArchiveBattleQuestTemplate::VT_QUEST_NAME, quest_name); - } - #[inline] - pub fn add_quest_desc(&mut self, quest_desc: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ArchiveBattleQuestTemplate::VT_QUEST_DESC, quest_desc); - } - #[inline] - pub fn add_target(&mut self, target: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ArchiveBattleQuestTemplate::VT_TARGET, target); - } - #[inline] - pub fn add_quest_type(&mut self, quest_type: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_QUEST_TYPE, quest_type, 0); - } - #[inline] - pub fn add_chapter(&mut self, chapter: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_CHAPTER, chapter, 0); - } - #[inline] - pub fn add_difficulty(&mut self, difficulty: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_DIFFICULTY, difficulty, 0); - } - #[inline] - pub fn add_monster_level(&mut self, monster_level: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_MONSTER_LEVEL, monster_level, 0); - } - #[inline] - pub fn add_recommended_level(&mut self, recommended_level: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_RECOMMENDED_LEVEL, recommended_level, 0); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_UNK_1, unk_1, 0); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_UNK_2, unk_2, 0); - } - #[inline] - pub fn add_hollow_id(&mut self, hollow_id: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_HOLLOW_ID, hollow_id, 0); - } - #[inline] - pub fn add_first_battle_event_id(&mut self, first_battle_event_id: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_FIRST_BATTLE_EVENT_ID, first_battle_event_id, 0); - } - #[inline] - pub fn add_battle_event_id(&mut self, battle_event_id: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_BATTLE_EVENT_ID, battle_event_id, 0); - } - #[inline] - pub fn add_unk_3(&mut self, unk_3: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_UNK_3, unk_3, 0); - } - #[inline] - pub fn add_battle_rank(&mut self, battle_rank: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ArchiveBattleQuestTemplate::VT_BATTLE_RANK, battle_rank); - } - #[inline] - pub fn add_slot_1_avatar(&mut self, slot_1_avatar: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_SLOT_1_AVATAR, slot_1_avatar, 0); - } - #[inline] - pub fn add_slot_2_avatar(&mut self, slot_2_avatar: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_SLOT_2_AVATAR, slot_2_avatar, 0); - } - #[inline] - pub fn add_slot_3_avatar(&mut self, slot_3_avatar: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_SLOT_3_AVATAR, slot_3_avatar, 0); - } - #[inline] - pub fn add_buddy(&mut self, buddy: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_BUDDY, buddy, 0); - } - #[inline] - pub fn add_unk_4(&mut self, unk_4: bool) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_UNK_4, unk_4, false); - } - #[inline] - pub fn add_unk_5(&mut self, unk_5: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_UNK_5, unk_5, 0); - } - #[inline] - pub fn add_unk_6(&mut self, unk_6: bool) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_UNK_6, unk_6, false); - } - #[inline] - pub fn add_chapter_name(&mut self, chapter_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ArchiveBattleQuestTemplate::VT_CHAPTER_NAME, chapter_name); - } - #[inline] - pub fn add_quest_image(&mut self, quest_image: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_QUEST_IMAGE, quest_image, 0); - } - #[inline] - pub fn add_unk_7(&mut self, unk_7: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ArchiveBattleQuestTemplate::VT_UNK_7, unk_7); - } - #[inline] - pub fn add_unk_8(&mut self, unk_8: bool) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_UNK_8, unk_8, false); - } - #[inline] - pub fn add_unk_9(&mut self, unk_9: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_UNK_9, unk_9, 0); - } - #[inline] - pub fn add_unk_10(&mut self, unk_10: bool) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_UNK_10, unk_10, false); - } - #[inline] - pub fn add_unk_11(&mut self, unk_11: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_UNK_11, unk_11, 0); - } - #[inline] - pub fn add_unk_12(&mut self, unk_12: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ArchiveBattleQuestTemplate::VT_UNK_12, unk_12); - } - #[inline] - pub fn add_unk_13(&mut self, unk_13: i32) { - self.fbb_.push_slot::(ArchiveBattleQuestTemplate::VT_UNK_13, unk_13, 0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ArchiveBattleQuestTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - ArchiveBattleQuestTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_quest_name(&mut self, quest_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + ArchiveBattleQuestTemplate::VT_QUEST_NAME, + quest_name, + ); + } + #[inline] + pub fn add_quest_desc(&mut self, quest_desc: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + ArchiveBattleQuestTemplate::VT_QUEST_DESC, + quest_desc, + ); + } + #[inline] + pub fn add_target(&mut self, target: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + ArchiveBattleQuestTemplate::VT_TARGET, + target, + ); + } + #[inline] + pub fn add_quest_type(&mut self, quest_type: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_QUEST_TYPE, quest_type, 0); + } + #[inline] + pub fn add_chapter(&mut self, chapter: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_CHAPTER, chapter, 0); + } + #[inline] + pub fn add_difficulty(&mut self, difficulty: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_DIFFICULTY, difficulty, 0); + } + #[inline] + pub fn add_monster_level(&mut self, monster_level: i32) { + self.fbb_.push_slot::( + ArchiveBattleQuestTemplate::VT_MONSTER_LEVEL, + monster_level, + 0, + ); + } + #[inline] + pub fn add_recommended_level(&mut self, recommended_level: i32) { + self.fbb_.push_slot::( + ArchiveBattleQuestTemplate::VT_RECOMMENDED_LEVEL, + recommended_level, + 0, + ); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_UNK_1, unk_1, 0); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_UNK_2, unk_2, 0); + } + #[inline] + pub fn add_hollow_id(&mut self, hollow_id: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_HOLLOW_ID, hollow_id, 0); + } + #[inline] + pub fn add_first_battle_event_id(&mut self, first_battle_event_id: i32) { + self.fbb_.push_slot::( + ArchiveBattleQuestTemplate::VT_FIRST_BATTLE_EVENT_ID, + first_battle_event_id, + 0, + ); + } + #[inline] + pub fn add_battle_event_id(&mut self, battle_event_id: i32) { + self.fbb_.push_slot::( + ArchiveBattleQuestTemplate::VT_BATTLE_EVENT_ID, + battle_event_id, + 0, + ); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_UNK_3, unk_3, 0); + } + #[inline] + pub fn add_battle_rank(&mut self, battle_rank: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + ArchiveBattleQuestTemplate::VT_BATTLE_RANK, + battle_rank, + ); + } + #[inline] + pub fn add_slot_1_avatar(&mut self, slot_1_avatar: i32) { + self.fbb_.push_slot::( + ArchiveBattleQuestTemplate::VT_SLOT_1_AVATAR, + slot_1_avatar, + 0, + ); + } + #[inline] + pub fn add_slot_2_avatar(&mut self, slot_2_avatar: i32) { + self.fbb_.push_slot::( + ArchiveBattleQuestTemplate::VT_SLOT_2_AVATAR, + slot_2_avatar, + 0, + ); + } + #[inline] + pub fn add_slot_3_avatar(&mut self, slot_3_avatar: i32) { + self.fbb_.push_slot::( + ArchiveBattleQuestTemplate::VT_SLOT_3_AVATAR, + slot_3_avatar, + 0, + ); + } + #[inline] + pub fn add_buddy(&mut self, buddy: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_BUDDY, buddy, 0); + } + #[inline] + pub fn add_unk_4(&mut self, unk_4: bool) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_UNK_4, unk_4, false); + } + #[inline] + pub fn add_unk_5(&mut self, unk_5: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_UNK_5, unk_5, 0); + } + #[inline] + pub fn add_unk_6(&mut self, unk_6: bool) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_UNK_6, unk_6, false); + } + #[inline] + pub fn add_chapter_name(&mut self, chapter_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + ArchiveBattleQuestTemplate::VT_CHAPTER_NAME, + chapter_name, + ); + } + #[inline] + pub fn add_quest_image(&mut self, quest_image: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_QUEST_IMAGE, quest_image, 0); + } + #[inline] + pub fn add_unk_7(&mut self, unk_7: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + ArchiveBattleQuestTemplate::VT_UNK_7, + unk_7, + ); + } + #[inline] + pub fn add_unk_8(&mut self, unk_8: bool) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_UNK_8, unk_8, false); + } + #[inline] + pub fn add_unk_9(&mut self, unk_9: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_UNK_9, unk_9, 0); + } + #[inline] + pub fn add_unk_10(&mut self, unk_10: bool) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_UNK_10, unk_10, false); + } + #[inline] + pub fn add_unk_11(&mut self, unk_11: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_UNK_11, unk_11, 0); + } + #[inline] + pub fn add_unk_12(&mut self, unk_12: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + ArchiveBattleQuestTemplate::VT_UNK_12, + unk_12, + ); + } + #[inline] + pub fn add_unk_13(&mut self, unk_13: i32) { + self.fbb_ + .push_slot::(ArchiveBattleQuestTemplate::VT_UNK_13, unk_13, 0); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> ArchiveBattleQuestTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + ArchiveBattleQuestTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for ArchiveBattleQuestTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ArchiveBattleQuestTemplate"); - ds.field("id", &self.id()); - ds.field("quest_name", &self.quest_name()); - ds.field("quest_desc", &self.quest_desc()); - ds.field("target", &self.target()); - ds.field("quest_type", &self.quest_type()); - ds.field("chapter", &self.chapter()); - ds.field("difficulty", &self.difficulty()); - ds.field("monster_level", &self.monster_level()); - ds.field("recommended_level", &self.recommended_level()); - ds.field("unk_1", &self.unk_1()); - ds.field("unk_2", &self.unk_2()); - ds.field("hollow_id", &self.hollow_id()); - ds.field("first_battle_event_id", &self.first_battle_event_id()); - ds.field("battle_event_id", &self.battle_event_id()); - ds.field("unk_3", &self.unk_3()); - ds.field("battle_rank", &self.battle_rank()); - ds.field("slot_1_avatar", &self.slot_1_avatar()); - ds.field("slot_2_avatar", &self.slot_2_avatar()); - ds.field("slot_3_avatar", &self.slot_3_avatar()); - ds.field("buddy", &self.buddy()); - ds.field("unk_4", &self.unk_4()); - ds.field("unk_5", &self.unk_5()); - ds.field("unk_6", &self.unk_6()); - ds.field("chapter_name", &self.chapter_name()); - ds.field("quest_image", &self.quest_image()); - ds.field("unk_7", &self.unk_7()); - ds.field("unk_8", &self.unk_8()); - ds.field("unk_9", &self.unk_9()); - ds.field("unk_10", &self.unk_10()); - ds.field("unk_11", &self.unk_11()); - ds.field("unk_12", &self.unk_12()); - ds.field("unk_13", &self.unk_13()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ArchiveBattleQuestTemplate"); + ds.field("id", &self.id()); + ds.field("quest_name", &self.quest_name()); + ds.field("quest_desc", &self.quest_desc()); + ds.field("target", &self.target()); + ds.field("quest_type", &self.quest_type()); + ds.field("chapter", &self.chapter()); + ds.field("difficulty", &self.difficulty()); + ds.field("monster_level", &self.monster_level()); + ds.field("recommended_level", &self.recommended_level()); + ds.field("unk_1", &self.unk_1()); + ds.field("unk_2", &self.unk_2()); + ds.field("hollow_id", &self.hollow_id()); + ds.field("first_battle_event_id", &self.first_battle_event_id()); + ds.field("battle_event_id", &self.battle_event_id()); + ds.field("unk_3", &self.unk_3()); + ds.field("battle_rank", &self.battle_rank()); + ds.field("slot_1_avatar", &self.slot_1_avatar()); + ds.field("slot_2_avatar", &self.slot_2_avatar()); + ds.field("slot_3_avatar", &self.slot_3_avatar()); + ds.field("buddy", &self.buddy()); + ds.field("unk_4", &self.unk_4()); + ds.field("unk_5", &self.unk_5()); + ds.field("unk_6", &self.unk_6()); + ds.field("chapter_name", &self.chapter_name()); + ds.field("quest_image", &self.quest_image()); + ds.field("unk_7", &self.unk_7()); + ds.field("unk_8", &self.unk_8()); + ds.field("unk_9", &self.unk_9()); + ds.field("unk_10", &self.unk_10()); + ds.field("unk_11", &self.unk_11()); + ds.field("unk_12", &self.unk_12()); + ds.field("unk_13", &self.unk_13()); + ds.finish() + } } pub enum SectionConfigTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct SectionConfigTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for SectionConfigTemplate<'a> { - type Inner = SectionConfigTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = SectionConfigTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> SectionConfigTemplate<'a> { - pub const VT_SECTION_ID: flatbuffers::VOffsetT = 4; - pub const VT_SECTION_PHOTO: flatbuffers::VOffsetT = 6; - pub const VT_NAME: flatbuffers::VOffsetT = 8; - pub const VT_BORN_TRANSFORM: flatbuffers::VOffsetT = 10; - pub const VT_ALTERNATIVE_BORN_TRANSFORM: flatbuffers::VOffsetT = 12; - pub const VT_UNK_3: flatbuffers::VOffsetT = 14; - pub const VT_SECTION_NAME: flatbuffers::VOffsetT = 16; + pub const VT_SECTION_ID: flatbuffers::VOffsetT = 4; + pub const VT_SECTION_PHOTO: flatbuffers::VOffsetT = 6; + pub const VT_NAME: flatbuffers::VOffsetT = 8; + pub const VT_BORN_TRANSFORM: flatbuffers::VOffsetT = 10; + pub const VT_ALTERNATIVE_BORN_TRANSFORM: flatbuffers::VOffsetT = 12; + pub const VT_UNK_3: flatbuffers::VOffsetT = 14; + pub const VT_SECTION_NAME: flatbuffers::VOffsetT = 16; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SectionConfigTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args SectionConfigTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = SectionConfigTemplateBuilder::new(_fbb); - if let Some(x) = args.section_name { builder.add_section_name(x); } - builder.add_unk_3(args.unk_3); - if let Some(x) = args.alternative_born_transform { builder.add_alternative_born_transform(x); } - if let Some(x) = args.born_transform { builder.add_born_transform(x); } - if let Some(x) = args.name { builder.add_name(x); } - if let Some(x) = args.section_photo { builder.add_section_photo(x); } - builder.add_section_id(args.section_id); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SectionConfigTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args SectionConfigTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = SectionConfigTemplateBuilder::new(_fbb); + if let Some(x) = args.section_name { + builder.add_section_name(x); + } + builder.add_unk_3(args.unk_3); + if let Some(x) = args.alternative_born_transform { + builder.add_alternative_born_transform(x); + } + if let Some(x) = args.born_transform { + builder.add_born_transform(x); + } + if let Some(x) = args.name { + builder.add_name(x); + } + if let Some(x) = args.section_photo { + builder.add_section_photo(x); + } + builder.add_section_id(args.section_id); + builder.finish() + } - - #[inline] - pub fn section_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SectionConfigTemplate::VT_SECTION_ID, Some(0)).unwrap()} - } - #[inline] - pub fn section_photo(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SectionConfigTemplate::VT_SECTION_PHOTO, None)} - } - #[inline] - pub fn name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SectionConfigTemplate::VT_NAME, None)} - } - #[inline] - pub fn born_transform(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SectionConfigTemplate::VT_BORN_TRANSFORM, None)} - } - #[inline] - pub fn alternative_born_transform(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SectionConfigTemplate::VT_ALTERNATIVE_BORN_TRANSFORM, None)} - } - #[inline] - pub fn unk_3(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SectionConfigTemplate::VT_UNK_3, Some(0)).unwrap()} - } - #[inline] - pub fn section_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SectionConfigTemplate::VT_SECTION_NAME, None)} - } + #[inline] + pub fn section_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(SectionConfigTemplate::VT_SECTION_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn section_photo(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + SectionConfigTemplate::VT_SECTION_PHOTO, + None, + ) + } + } + #[inline] + pub fn name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(SectionConfigTemplate::VT_NAME, None) + } + } + #[inline] + pub fn born_transform(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + SectionConfigTemplate::VT_BORN_TRANSFORM, + None, + ) + } + } + #[inline] + pub fn alternative_born_transform(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + SectionConfigTemplate::VT_ALTERNATIVE_BORN_TRANSFORM, + None, + ) + } + } + #[inline] + pub fn unk_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(SectionConfigTemplate::VT_UNK_3, Some(0)) + .unwrap() + } + } + #[inline] + pub fn section_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + SectionConfigTemplate::VT_SECTION_NAME, + None, + ) + } + } } impl flatbuffers::Verifiable for SectionConfigTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("section_id", Self::VT_SECTION_ID, false)? - .visit_field::>("section_photo", Self::VT_SECTION_PHOTO, false)? - .visit_field::>("name", Self::VT_NAME, false)? - .visit_field::>("born_transform", Self::VT_BORN_TRANSFORM, false)? - .visit_field::>("alternative_born_transform", Self::VT_ALTERNATIVE_BORN_TRANSFORM, false)? - .visit_field::("unk_3", Self::VT_UNK_3, false)? - .visit_field::>("section_name", Self::VT_SECTION_NAME, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("section_id", Self::VT_SECTION_ID, false)? + .visit_field::>( + "section_photo", + Self::VT_SECTION_PHOTO, + false, + )? + .visit_field::>("name", Self::VT_NAME, false)? + .visit_field::>( + "born_transform", + Self::VT_BORN_TRANSFORM, + false, + )? + .visit_field::>( + "alternative_born_transform", + Self::VT_ALTERNATIVE_BORN_TRANSFORM, + false, + )? + .visit_field::("unk_3", Self::VT_UNK_3, false)? + .visit_field::>( + "section_name", + Self::VT_SECTION_NAME, + false, + )? + .finish(); + Ok(()) + } } pub struct SectionConfigTemplateArgs<'a> { pub section_id: i32, @@ -2858,154 +3888,205 @@ pub struct SectionConfigTemplateArgs<'a> { pub section_name: Option>, } impl<'a> Default for SectionConfigTemplateArgs<'a> { - #[inline] - fn default() -> Self { - SectionConfigTemplateArgs { - section_id: 0, - section_photo: None, - name: None, - born_transform: None, - alternative_born_transform: None, - unk_3: 0, - section_name: None, + #[inline] + fn default() -> Self { + SectionConfigTemplateArgs { + section_id: 0, + section_photo: None, + name: None, + born_transform: None, + alternative_born_transform: None, + unk_3: 0, + section_name: None, + } } - } } pub struct SectionConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SectionConfigTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_section_id(&mut self, section_id: i32) { - self.fbb_.push_slot::(SectionConfigTemplate::VT_SECTION_ID, section_id, 0); - } - #[inline] - pub fn add_section_photo(&mut self, section_photo: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SectionConfigTemplate::VT_SECTION_PHOTO, section_photo); - } - #[inline] - pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SectionConfigTemplate::VT_NAME, name); - } - #[inline] - pub fn add_born_transform(&mut self, born_transform: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SectionConfigTemplate::VT_BORN_TRANSFORM, born_transform); - } - #[inline] - pub fn add_alternative_born_transform(&mut self, alternative_born_transform: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SectionConfigTemplate::VT_ALTERNATIVE_BORN_TRANSFORM, alternative_born_transform); - } - #[inline] - pub fn add_unk_3(&mut self, unk_3: i32) { - self.fbb_.push_slot::(SectionConfigTemplate::VT_UNK_3, unk_3, 0); - } - #[inline] - pub fn add_section_name(&mut self, section_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SectionConfigTemplate::VT_SECTION_NAME, section_name); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SectionConfigTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - SectionConfigTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_section_id(&mut self, section_id: i32) { + self.fbb_ + .push_slot::(SectionConfigTemplate::VT_SECTION_ID, section_id, 0); + } + #[inline] + pub fn add_section_photo(&mut self, section_photo: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + SectionConfigTemplate::VT_SECTION_PHOTO, + section_photo, + ); + } + #[inline] + pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(SectionConfigTemplate::VT_NAME, name); + } + #[inline] + pub fn add_born_transform(&mut self, born_transform: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + SectionConfigTemplate::VT_BORN_TRANSFORM, + born_transform, + ); + } + #[inline] + pub fn add_alternative_born_transform( + &mut self, + alternative_born_transform: flatbuffers::WIPOffset<&'b str>, + ) { + self.fbb_.push_slot_always::>( + SectionConfigTemplate::VT_ALTERNATIVE_BORN_TRANSFORM, + alternative_born_transform, + ); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: i32) { + self.fbb_ + .push_slot::(SectionConfigTemplate::VT_UNK_3, unk_3, 0); + } + #[inline] + pub fn add_section_name(&mut self, section_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + SectionConfigTemplate::VT_SECTION_NAME, + section_name, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> SectionConfigTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + SectionConfigTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for SectionConfigTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SectionConfigTemplate"); - ds.field("section_id", &self.section_id()); - ds.field("section_photo", &self.section_photo()); - ds.field("name", &self.name()); - ds.field("born_transform", &self.born_transform()); - ds.field("alternative_born_transform", &self.alternative_born_transform()); - ds.field("unk_3", &self.unk_3()); - ds.field("section_name", &self.section_name()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SectionConfigTemplate"); + ds.field("section_id", &self.section_id()); + ds.field("section_photo", &self.section_photo()); + ds.field("name", &self.name()); + ds.field("born_transform", &self.born_transform()); + ds.field( + "alternative_born_transform", + &self.alternative_born_transform(), + ); + ds.field("unk_3", &self.unk_3()); + ds.field("section_name", &self.section_name()); + ds.finish() + } } pub enum MainCityBGMConfigTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct MainCityBGMConfigTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for MainCityBGMConfigTemplate<'a> { - type Inner = MainCityBGMConfigTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = MainCityBGMConfigTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> MainCityBGMConfigTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_PLAY_EVENT_NAME: flatbuffers::VOffsetT = 6; - pub const VT_STATE_NAME: flatbuffers::VOffsetT = 8; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_PLAY_EVENT_NAME: flatbuffers::VOffsetT = 6; + pub const VT_STATE_NAME: flatbuffers::VOffsetT = 8; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - MainCityBGMConfigTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args MainCityBGMConfigTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = MainCityBGMConfigTemplateBuilder::new(_fbb); - if let Some(x) = args.state_name { builder.add_state_name(x); } - if let Some(x) = args.play_event_name { builder.add_play_event_name(x); } - builder.add_id(args.id); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + MainCityBGMConfigTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args MainCityBGMConfigTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = MainCityBGMConfigTemplateBuilder::new(_fbb); + if let Some(x) = args.state_name { + builder.add_state_name(x); + } + if let Some(x) = args.play_event_name { + builder.add_play_event_name(x); + } + builder.add_id(args.id); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(MainCityBGMConfigTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn play_event_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MainCityBGMConfigTemplate::VT_PLAY_EVENT_NAME, None)} - } - #[inline] - pub fn state_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MainCityBGMConfigTemplate::VT_STATE_NAME, None)} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(MainCityBGMConfigTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn play_event_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MainCityBGMConfigTemplate::VT_PLAY_EVENT_NAME, + None, + ) + } + } + #[inline] + pub fn state_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MainCityBGMConfigTemplate::VT_STATE_NAME, + None, + ) + } + } } impl flatbuffers::Verifiable for MainCityBGMConfigTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::>("play_event_name", Self::VT_PLAY_EVENT_NAME, false)? - .visit_field::>("state_name", Self::VT_STATE_NAME, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::>( + "play_event_name", + Self::VT_PLAY_EVENT_NAME, + false, + )? + .visit_field::>( + "state_name", + Self::VT_STATE_NAME, + false, + )? + .finish(); + Ok(()) + } } pub struct MainCityBGMConfigTemplateArgs<'a> { pub id: i32, @@ -3013,270 +4094,398 @@ pub struct MainCityBGMConfigTemplateArgs<'a> { pub state_name: Option>, } impl<'a> Default for MainCityBGMConfigTemplateArgs<'a> { - #[inline] - fn default() -> Self { - MainCityBGMConfigTemplateArgs { - id: 0, - play_event_name: None, - state_name: None, + #[inline] + fn default() -> Self { + MainCityBGMConfigTemplateArgs { + id: 0, + play_event_name: None, + state_name: None, + } } - } } pub struct MainCityBGMConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MainCityBGMConfigTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(MainCityBGMConfigTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_play_event_name(&mut self, play_event_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MainCityBGMConfigTemplate::VT_PLAY_EVENT_NAME, play_event_name); - } - #[inline] - pub fn add_state_name(&mut self, state_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MainCityBGMConfigTemplate::VT_STATE_NAME, state_name); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MainCityBGMConfigTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - MainCityBGMConfigTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_ + .push_slot::(MainCityBGMConfigTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_play_event_name(&mut self, play_event_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MainCityBGMConfigTemplate::VT_PLAY_EVENT_NAME, + play_event_name, + ); + } + #[inline] + pub fn add_state_name(&mut self, state_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MainCityBGMConfigTemplate::VT_STATE_NAME, + state_name, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> MainCityBGMConfigTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + MainCityBGMConfigTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for MainCityBGMConfigTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("MainCityBGMConfigTemplate"); - ds.field("id", &self.id()); - ds.field("play_event_name", &self.play_event_name()); - ds.field("state_name", &self.state_name()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("MainCityBGMConfigTemplate"); + ds.field("id", &self.id()); + ds.field("play_event_name", &self.play_event_name()); + ds.field("state_name", &self.state_name()); + ds.finish() + } } pub enum HollowBuffTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct HollowBuffTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for HollowBuffTemplate<'a> { - type Inner = HollowBuffTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = HollowBuffTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> HollowBuffTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_BUFF_NAME: flatbuffers::VOffsetT = 6; - pub const VT_MENU_NAME: flatbuffers::VOffsetT = 8; - pub const VT_MINI_ICONS: flatbuffers::VOffsetT = 10; - pub const VT_DECORATED_ICONS: flatbuffers::VOffsetT = 12; - pub const VT_UNK_1: flatbuffers::VOffsetT = 14; - pub const VT_PRICE: flatbuffers::VOffsetT = 16; - pub const VT_UNLOCK_CONDITION: flatbuffers::VOffsetT = 18; - pub const VT_UNK_2: flatbuffers::VOffsetT = 20; - pub const VT_CLIENT_ABILITY: flatbuffers::VOffsetT = 22; - pub const VT_TARGETS: flatbuffers::VOffsetT = 24; - pub const VT_UNK_3: flatbuffers::VOffsetT = 26; - pub const VT_MAX_TIMES: flatbuffers::VOffsetT = 28; - pub const VT_UNK_4: flatbuffers::VOffsetT = 30; - pub const VT_DESCRIPTION_TEXT: flatbuffers::VOffsetT = 32; - pub const VT_PREFAB: flatbuffers::VOffsetT = 34; - pub const VT_ICON: flatbuffers::VOffsetT = 36; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_BUFF_NAME: flatbuffers::VOffsetT = 6; + pub const VT_MENU_NAME: flatbuffers::VOffsetT = 8; + pub const VT_MINI_ICONS: flatbuffers::VOffsetT = 10; + pub const VT_DECORATED_ICONS: flatbuffers::VOffsetT = 12; + pub const VT_UNK_1: flatbuffers::VOffsetT = 14; + pub const VT_PRICE: flatbuffers::VOffsetT = 16; + pub const VT_UNLOCK_CONDITION: flatbuffers::VOffsetT = 18; + pub const VT_UNK_2: flatbuffers::VOffsetT = 20; + pub const VT_CLIENT_ABILITY: flatbuffers::VOffsetT = 22; + pub const VT_TARGETS: flatbuffers::VOffsetT = 24; + pub const VT_UNK_3: flatbuffers::VOffsetT = 26; + pub const VT_MAX_TIMES: flatbuffers::VOffsetT = 28; + pub const VT_UNK_4: flatbuffers::VOffsetT = 30; + pub const VT_DESCRIPTION_TEXT: flatbuffers::VOffsetT = 32; + pub const VT_PREFAB: flatbuffers::VOffsetT = 34; + pub const VT_ICON: flatbuffers::VOffsetT = 36; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - HollowBuffTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args HollowBuffTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = HollowBuffTemplateBuilder::new(_fbb); - if let Some(x) = args.icon { builder.add_icon(x); } - if let Some(x) = args.prefab { builder.add_prefab(x); } - if let Some(x) = args.description_text { builder.add_description_text(x); } - if let Some(x) = args.unk_4 { builder.add_unk_4(x); } - builder.add_max_times(args.max_times); - builder.add_unk_3(args.unk_3); - if let Some(x) = args.targets { builder.add_targets(x); } - builder.add_client_ability(args.client_ability); - if let Some(x) = args.unlock_condition { builder.add_unlock_condition(x); } - builder.add_price(args.price); - builder.add_unk_1(args.unk_1); - if let Some(x) = args.decorated_icons { builder.add_decorated_icons(x); } - if let Some(x) = args.mini_icons { builder.add_mini_icons(x); } - if let Some(x) = args.menu_name { builder.add_menu_name(x); } - if let Some(x) = args.buff_name { builder.add_buff_name(x); } - builder.add_id(args.id); - builder.add_unk_2(args.unk_2); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + HollowBuffTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args HollowBuffTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = HollowBuffTemplateBuilder::new(_fbb); + if let Some(x) = args.icon { + builder.add_icon(x); + } + if let Some(x) = args.prefab { + builder.add_prefab(x); + } + if let Some(x) = args.description_text { + builder.add_description_text(x); + } + if let Some(x) = args.unk_4 { + builder.add_unk_4(x); + } + builder.add_max_times(args.max_times); + builder.add_unk_3(args.unk_3); + if let Some(x) = args.targets { + builder.add_targets(x); + } + builder.add_client_ability(args.client_ability); + if let Some(x) = args.unlock_condition { + builder.add_unlock_condition(x); + } + builder.add_price(args.price); + builder.add_unk_1(args.unk_1); + if let Some(x) = args.decorated_icons { + builder.add_decorated_icons(x); + } + if let Some(x) = args.mini_icons { + builder.add_mini_icons(x); + } + if let Some(x) = args.menu_name { + builder.add_menu_name(x); + } + if let Some(x) = args.buff_name { + builder.add_buff_name(x); + } + builder.add_id(args.id); + builder.add_unk_2(args.unk_2); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowBuffTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn buff_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowBuffTemplate::VT_BUFF_NAME, None)} - } - #[inline] - pub fn menu_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowBuffTemplate::VT_MENU_NAME, None)} - } - #[inline] - pub fn mini_icons(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(HollowBuffTemplate::VT_MINI_ICONS, None)} - } - #[inline] - pub fn decorated_icons(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(HollowBuffTemplate::VT_DECORATED_ICONS, None)} - } - #[inline] - pub fn unk_1(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowBuffTemplate::VT_UNK_1, Some(0)).unwrap()} - } - #[inline] - pub fn price(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowBuffTemplate::VT_PRICE, Some(0)).unwrap()} - } - #[inline] - pub fn unlock_condition(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowBuffTemplate::VT_UNLOCK_CONDITION, None)} - } - #[inline] - pub fn unk_2(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowBuffTemplate::VT_UNK_2, Some(false)).unwrap()} - } - #[inline] - pub fn client_ability(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowBuffTemplate::VT_CLIENT_ABILITY, Some(0)).unwrap()} - } - #[inline] - pub fn targets(&self) -> Option>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(HollowBuffTemplate::VT_TARGETS, None)} - } - #[inline] - pub fn unk_3(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowBuffTemplate::VT_UNK_3, Some(0)).unwrap()} - } - #[inline] - pub fn max_times(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowBuffTemplate::VT_MAX_TIMES, Some(0)).unwrap()} - } - #[inline] - pub fn unk_4(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowBuffTemplate::VT_UNK_4, None)} - } - #[inline] - pub fn description_text(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowBuffTemplate::VT_DESCRIPTION_TEXT, None)} - } - #[inline] - pub fn prefab(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowBuffTemplate::VT_PREFAB, None)} - } - #[inline] - pub fn icon(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowBuffTemplate::VT_ICON, None)} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowBuffTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn buff_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowBuffTemplate::VT_BUFF_NAME, None) + } + } + #[inline] + pub fn menu_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowBuffTemplate::VT_MENU_NAME, None) + } + } + #[inline] + pub fn mini_icons(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + HollowBuffTemplate::VT_MINI_ICONS, + None, + ) + } + } + #[inline] + pub fn decorated_icons(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + HollowBuffTemplate::VT_DECORATED_ICONS, + None, + ) + } + } + #[inline] + pub fn unk_1(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowBuffTemplate::VT_UNK_1, Some(0)) + .unwrap() + } + } + #[inline] + pub fn price(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowBuffTemplate::VT_PRICE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unlock_condition(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + HollowBuffTemplate::VT_UNLOCK_CONDITION, + None, + ) + } + } + #[inline] + pub fn unk_2(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowBuffTemplate::VT_UNK_2, Some(false)) + .unwrap() + } + } + #[inline] + pub fn client_ability(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowBuffTemplate::VT_CLIENT_ABILITY, Some(0)) + .unwrap() + } + } + #[inline] + pub fn targets( + &self, + ) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(HollowBuffTemplate::VT_TARGETS, None) + } + } + #[inline] + pub fn unk_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowBuffTemplate::VT_UNK_3, Some(0)) + .unwrap() + } + } + #[inline] + pub fn max_times(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowBuffTemplate::VT_MAX_TIMES, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_4(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowBuffTemplate::VT_UNK_4, None) + } + } + #[inline] + pub fn description_text(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + HollowBuffTemplate::VT_DESCRIPTION_TEXT, + None, + ) + } + } + #[inline] + pub fn prefab(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowBuffTemplate::VT_PREFAB, None) + } + } + #[inline] + pub fn icon(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowBuffTemplate::VT_ICON, None) + } + } } impl flatbuffers::Verifiable for HollowBuffTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::>("buff_name", Self::VT_BUFF_NAME, false)? - .visit_field::>("menu_name", Self::VT_MENU_NAME, false)? - .visit_field::>>("mini_icons", Self::VT_MINI_ICONS, false)? - .visit_field::>>("decorated_icons", Self::VT_DECORATED_ICONS, false)? - .visit_field::("unk_1", Self::VT_UNK_1, false)? - .visit_field::("price", Self::VT_PRICE, false)? - .visit_field::>("unlock_condition", Self::VT_UNLOCK_CONDITION, false)? - .visit_field::("unk_2", Self::VT_UNK_2, false)? - .visit_field::("client_ability", Self::VT_CLIENT_ABILITY, false)? - .visit_field::>>>("targets", Self::VT_TARGETS, false)? - .visit_field::("unk_3", Self::VT_UNK_3, false)? - .visit_field::("max_times", Self::VT_MAX_TIMES, false)? - .visit_field::>("unk_4", Self::VT_UNK_4, false)? - .visit_field::>("description_text", Self::VT_DESCRIPTION_TEXT, false)? - .visit_field::>("prefab", Self::VT_PREFAB, false)? - .visit_field::>("icon", Self::VT_ICON, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::>( + "buff_name", + Self::VT_BUFF_NAME, + false, + )? + .visit_field::>( + "menu_name", + Self::VT_MENU_NAME, + false, + )? + .visit_field::>>( + "mini_icons", + Self::VT_MINI_ICONS, + false, + )? + .visit_field::>>( + "decorated_icons", + Self::VT_DECORATED_ICONS, + false, + )? + .visit_field::("unk_1", Self::VT_UNK_1, false)? + .visit_field::("price", Self::VT_PRICE, false)? + .visit_field::>( + "unlock_condition", + Self::VT_UNLOCK_CONDITION, + false, + )? + .visit_field::("unk_2", Self::VT_UNK_2, false)? + .visit_field::("client_ability", Self::VT_CLIENT_ABILITY, false)? + .visit_field::>, + >>("targets", Self::VT_TARGETS, false)? + .visit_field::("unk_3", Self::VT_UNK_3, false)? + .visit_field::("max_times", Self::VT_MAX_TIMES, false)? + .visit_field::>("unk_4", Self::VT_UNK_4, false)? + .visit_field::>( + "description_text", + Self::VT_DESCRIPTION_TEXT, + false, + )? + .visit_field::>("prefab", Self::VT_PREFAB, false)? + .visit_field::>("icon", Self::VT_ICON, false)? + .finish(); + Ok(()) + } } pub struct HollowBuffTemplateArgs<'a> { pub id: i32, @@ -3289,7 +4498,9 @@ pub struct HollowBuffTemplateArgs<'a> { pub unlock_condition: Option>, pub unk_2: bool, pub client_ability: i32, - pub targets: Option>>>, + pub targets: Option< + flatbuffers::WIPOffset>>, + >, pub unk_3: i32, pub max_times: i32, pub unk_4: Option>, @@ -3298,344 +4509,483 @@ pub struct HollowBuffTemplateArgs<'a> { pub icon: Option>, } impl<'a> Default for HollowBuffTemplateArgs<'a> { - #[inline] - fn default() -> Self { - HollowBuffTemplateArgs { - id: 0, - buff_name: None, - menu_name: None, - mini_icons: None, - decorated_icons: None, - unk_1: 0, - price: 0, - unlock_condition: None, - unk_2: false, - client_ability: 0, - targets: None, - unk_3: 0, - max_times: 0, - unk_4: None, - description_text: None, - prefab: None, - icon: None, + #[inline] + fn default() -> Self { + HollowBuffTemplateArgs { + id: 0, + buff_name: None, + menu_name: None, + mini_icons: None, + decorated_icons: None, + unk_1: 0, + price: 0, + unlock_condition: None, + unk_2: false, + client_ability: 0, + targets: None, + unk_3: 0, + max_times: 0, + unk_4: None, + description_text: None, + prefab: None, + icon: None, + } } - } } pub struct HollowBuffTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> HollowBuffTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(HollowBuffTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_buff_name(&mut self, buff_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowBuffTemplate::VT_BUFF_NAME, buff_name); - } - #[inline] - pub fn add_menu_name(&mut self, menu_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowBuffTemplate::VT_MENU_NAME, menu_name); - } - #[inline] - pub fn add_mini_icons(&mut self, mini_icons: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(HollowBuffTemplate::VT_MINI_ICONS, mini_icons); - } - #[inline] - pub fn add_decorated_icons(&mut self, decorated_icons: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(HollowBuffTemplate::VT_DECORATED_ICONS, decorated_icons); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: i32) { - self.fbb_.push_slot::(HollowBuffTemplate::VT_UNK_1, unk_1, 0); - } - #[inline] - pub fn add_price(&mut self, price: i32) { - self.fbb_.push_slot::(HollowBuffTemplate::VT_PRICE, price, 0); - } - #[inline] - pub fn add_unlock_condition(&mut self, unlock_condition: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowBuffTemplate::VT_UNLOCK_CONDITION, unlock_condition); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: bool) { - self.fbb_.push_slot::(HollowBuffTemplate::VT_UNK_2, unk_2, false); - } - #[inline] - pub fn add_client_ability(&mut self, client_ability: i32) { - self.fbb_.push_slot::(HollowBuffTemplate::VT_CLIENT_ABILITY, client_ability, 0); - } - #[inline] - pub fn add_targets(&mut self, targets: flatbuffers::WIPOffset>>) { - self.fbb_.push_slot_always::>(HollowBuffTemplate::VT_TARGETS, targets); - } - #[inline] - pub fn add_unk_3(&mut self, unk_3: i32) { - self.fbb_.push_slot::(HollowBuffTemplate::VT_UNK_3, unk_3, 0); - } - #[inline] - pub fn add_max_times(&mut self, max_times: i32) { - self.fbb_.push_slot::(HollowBuffTemplate::VT_MAX_TIMES, max_times, 0); - } - #[inline] - pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowBuffTemplate::VT_UNK_4, unk_4); - } - #[inline] - pub fn add_description_text(&mut self, description_text: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowBuffTemplate::VT_DESCRIPTION_TEXT, description_text); - } - #[inline] - pub fn add_prefab(&mut self, prefab: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowBuffTemplate::VT_PREFAB, prefab); - } - #[inline] - pub fn add_icon(&mut self, icon: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowBuffTemplate::VT_ICON, icon); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> HollowBuffTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - HollowBuffTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_.push_slot::(HollowBuffTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_buff_name(&mut self, buff_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowBuffTemplate::VT_BUFF_NAME, + buff_name, + ); + } + #[inline] + pub fn add_menu_name(&mut self, menu_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowBuffTemplate::VT_MENU_NAME, + menu_name, + ); + } + #[inline] + pub fn add_mini_icons( + &mut self, + mini_icons: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + HollowBuffTemplate::VT_MINI_ICONS, + mini_icons, + ); + } + #[inline] + pub fn add_decorated_icons( + &mut self, + decorated_icons: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + HollowBuffTemplate::VT_DECORATED_ICONS, + decorated_icons, + ); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: i32) { + self.fbb_ + .push_slot::(HollowBuffTemplate::VT_UNK_1, unk_1, 0); + } + #[inline] + pub fn add_price(&mut self, price: i32) { + self.fbb_ + .push_slot::(HollowBuffTemplate::VT_PRICE, price, 0); + } + #[inline] + pub fn add_unlock_condition(&mut self, unlock_condition: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowBuffTemplate::VT_UNLOCK_CONDITION, + unlock_condition, + ); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: bool) { + self.fbb_ + .push_slot::(HollowBuffTemplate::VT_UNK_2, unk_2, false); + } + #[inline] + pub fn add_client_ability(&mut self, client_ability: i32) { + self.fbb_ + .push_slot::(HollowBuffTemplate::VT_CLIENT_ABILITY, client_ability, 0); + } + #[inline] + pub fn add_targets( + &mut self, + targets: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_ + .push_slot_always::>(HollowBuffTemplate::VT_TARGETS, targets); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: i32) { + self.fbb_ + .push_slot::(HollowBuffTemplate::VT_UNK_3, unk_3, 0); + } + #[inline] + pub fn add_max_times(&mut self, max_times: i32) { + self.fbb_ + .push_slot::(HollowBuffTemplate::VT_MAX_TIMES, max_times, 0); + } + #[inline] + pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(HollowBuffTemplate::VT_UNK_4, unk_4); + } + #[inline] + pub fn add_description_text(&mut self, description_text: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowBuffTemplate::VT_DESCRIPTION_TEXT, + description_text, + ); + } + #[inline] + pub fn add_prefab(&mut self, prefab: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(HollowBuffTemplate::VT_PREFAB, prefab); + } + #[inline] + pub fn add_icon(&mut self, icon: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(HollowBuffTemplate::VT_ICON, icon); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> HollowBuffTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + HollowBuffTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for HollowBuffTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("HollowBuffTemplate"); - ds.field("id", &self.id()); - ds.field("buff_name", &self.buff_name()); - ds.field("menu_name", &self.menu_name()); - ds.field("mini_icons", &self.mini_icons()); - ds.field("decorated_icons", &self.decorated_icons()); - ds.field("unk_1", &self.unk_1()); - ds.field("price", &self.price()); - ds.field("unlock_condition", &self.unlock_condition()); - ds.field("unk_2", &self.unk_2()); - ds.field("client_ability", &self.client_ability()); - ds.field("targets", &self.targets()); - ds.field("unk_3", &self.unk_3()); - ds.field("max_times", &self.max_times()); - ds.field("unk_4", &self.unk_4()); - ds.field("description_text", &self.description_text()); - ds.field("prefab", &self.prefab()); - ds.field("icon", &self.icon()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("HollowBuffTemplate"); + ds.field("id", &self.id()); + ds.field("buff_name", &self.buff_name()); + ds.field("menu_name", &self.menu_name()); + ds.field("mini_icons", &self.mini_icons()); + ds.field("decorated_icons", &self.decorated_icons()); + ds.field("unk_1", &self.unk_1()); + ds.field("price", &self.price()); + ds.field("unlock_condition", &self.unlock_condition()); + ds.field("unk_2", &self.unk_2()); + ds.field("client_ability", &self.client_ability()); + ds.field("targets", &self.targets()); + ds.field("unk_3", &self.unk_3()); + ds.field("max_times", &self.max_times()); + ds.field("unk_4", &self.unk_4()); + ds.field("description_text", &self.description_text()); + ds.field("prefab", &self.prefab()); + ds.field("icon", &self.icon()); + ds.finish() + } } pub enum CafeConfigTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct CafeConfigTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for CafeConfigTemplate<'a> { - type Inner = CafeConfigTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = CafeConfigTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> CafeConfigTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_MENU_NAME: flatbuffers::VOffsetT = 6; - pub const VT_UNK_1: flatbuffers::VOffsetT = 8; - pub const VT_PRICE: flatbuffers::VOffsetT = 10; - pub const VT_UNLOCK_CONDITION: flatbuffers::VOffsetT = 12; - pub const VT_UNK_2: flatbuffers::VOffsetT = 14; - pub const VT_DESCRIPTION_TEXT: flatbuffers::VOffsetT = 16; - pub const VT_ICON: flatbuffers::VOffsetT = 18; - pub const VT_CAFE_PREFAB: flatbuffers::VOffsetT = 20; - pub const VT_REWARD_BUFF_ID: flatbuffers::VOffsetT = 22; - pub const VT_UNK_3: flatbuffers::VOffsetT = 24; - pub const VT_UNK_4: flatbuffers::VOffsetT = 26; - pub const VT_UNK_5: flatbuffers::VOffsetT = 28; - pub const VT_ENERGY_AMOUNT: flatbuffers::VOffsetT = 30; - pub const VT_UNK_7: flatbuffers::VOffsetT = 32; - pub const VT_UNK_8: flatbuffers::VOffsetT = 34; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_MENU_NAME: flatbuffers::VOffsetT = 6; + pub const VT_UNK_1: flatbuffers::VOffsetT = 8; + pub const VT_PRICE: flatbuffers::VOffsetT = 10; + pub const VT_UNLOCK_CONDITION: flatbuffers::VOffsetT = 12; + pub const VT_UNK_2: flatbuffers::VOffsetT = 14; + pub const VT_DESCRIPTION_TEXT: flatbuffers::VOffsetT = 16; + pub const VT_ICON: flatbuffers::VOffsetT = 18; + pub const VT_CAFE_PREFAB: flatbuffers::VOffsetT = 20; + pub const VT_REWARD_BUFF_ID: flatbuffers::VOffsetT = 22; + pub const VT_UNK_3: flatbuffers::VOffsetT = 24; + pub const VT_UNK_4: flatbuffers::VOffsetT = 26; + pub const VT_UNK_5: flatbuffers::VOffsetT = 28; + pub const VT_ENERGY_AMOUNT: flatbuffers::VOffsetT = 30; + pub const VT_UNK_7: flatbuffers::VOffsetT = 32; + pub const VT_UNK_8: flatbuffers::VOffsetT = 34; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - CafeConfigTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args CafeConfigTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = CafeConfigTemplateBuilder::new(_fbb); - builder.add_unk_8(args.unk_8); - builder.add_unk_7(args.unk_7); - builder.add_energy_amount(args.energy_amount); - if let Some(x) = args.unk_5 { builder.add_unk_5(x); } - builder.add_unk_4(args.unk_4); - builder.add_unk_3(args.unk_3); - builder.add_reward_buff_id(args.reward_buff_id); - if let Some(x) = args.cafe_prefab { builder.add_cafe_prefab(x); } - builder.add_icon(args.icon); - if let Some(x) = args.description_text { builder.add_description_text(x); } - if let Some(x) = args.unlock_condition { builder.add_unlock_condition(x); } - builder.add_price(args.price); - builder.add_unk_1(args.unk_1); - if let Some(x) = args.menu_name { builder.add_menu_name(x); } - builder.add_id(args.id); - builder.add_unk_2(args.unk_2); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + CafeConfigTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args CafeConfigTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = CafeConfigTemplateBuilder::new(_fbb); + builder.add_unk_8(args.unk_8); + builder.add_unk_7(args.unk_7); + builder.add_energy_amount(args.energy_amount); + if let Some(x) = args.unk_5 { + builder.add_unk_5(x); + } + builder.add_unk_4(args.unk_4); + builder.add_unk_3(args.unk_3); + builder.add_reward_buff_id(args.reward_buff_id); + if let Some(x) = args.cafe_prefab { + builder.add_cafe_prefab(x); + } + builder.add_icon(args.icon); + if let Some(x) = args.description_text { + builder.add_description_text(x); + } + if let Some(x) = args.unlock_condition { + builder.add_unlock_condition(x); + } + builder.add_price(args.price); + builder.add_unk_1(args.unk_1); + if let Some(x) = args.menu_name { + builder.add_menu_name(x); + } + builder.add_id(args.id); + builder.add_unk_2(args.unk_2); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(CafeConfigTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn menu_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(CafeConfigTemplate::VT_MENU_NAME, None)} - } - #[inline] - pub fn unk_1(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(CafeConfigTemplate::VT_UNK_1, Some(0)).unwrap()} - } - #[inline] - pub fn price(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(CafeConfigTemplate::VT_PRICE, Some(0)).unwrap()} - } - #[inline] - pub fn unlock_condition(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(CafeConfigTemplate::VT_UNLOCK_CONDITION, None)} - } - #[inline] - pub fn unk_2(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(CafeConfigTemplate::VT_UNK_2, Some(false)).unwrap()} - } - #[inline] - pub fn description_text(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(CafeConfigTemplate::VT_DESCRIPTION_TEXT, None)} - } - #[inline] - pub fn icon(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(CafeConfigTemplate::VT_ICON, Some(0)).unwrap()} - } - #[inline] - pub fn cafe_prefab(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(CafeConfigTemplate::VT_CAFE_PREFAB, None)} - } - #[inline] - pub fn reward_buff_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(CafeConfigTemplate::VT_REWARD_BUFF_ID, Some(0)).unwrap()} - } - #[inline] - pub fn unk_3(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(CafeConfigTemplate::VT_UNK_3, Some(0)).unwrap()} - } - #[inline] - pub fn unk_4(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(CafeConfigTemplate::VT_UNK_4, Some(0)).unwrap()} - } - #[inline] - pub fn unk_5(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(CafeConfigTemplate::VT_UNK_5, None)} - } - #[inline] - pub fn energy_amount(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(CafeConfigTemplate::VT_ENERGY_AMOUNT, Some(0)).unwrap()} - } - #[inline] - pub fn unk_7(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(CafeConfigTemplate::VT_UNK_7, Some(0)).unwrap()} - } - #[inline] - pub fn unk_8(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(CafeConfigTemplate::VT_UNK_8, Some(0)).unwrap()} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(CafeConfigTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn menu_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(CafeConfigTemplate::VT_MENU_NAME, None) + } + } + #[inline] + pub fn unk_1(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(CafeConfigTemplate::VT_UNK_1, Some(0)) + .unwrap() + } + } + #[inline] + pub fn price(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(CafeConfigTemplate::VT_PRICE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unlock_condition(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + CafeConfigTemplate::VT_UNLOCK_CONDITION, + None, + ) + } + } + #[inline] + pub fn unk_2(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(CafeConfigTemplate::VT_UNK_2, Some(false)) + .unwrap() + } + } + #[inline] + pub fn description_text(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + CafeConfigTemplate::VT_DESCRIPTION_TEXT, + None, + ) + } + } + #[inline] + pub fn icon(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(CafeConfigTemplate::VT_ICON, Some(0)) + .unwrap() + } + } + #[inline] + pub fn cafe_prefab(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(CafeConfigTemplate::VT_CAFE_PREFAB, None) + } + } + #[inline] + pub fn reward_buff_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(CafeConfigTemplate::VT_REWARD_BUFF_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(CafeConfigTemplate::VT_UNK_3, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_4(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(CafeConfigTemplate::VT_UNK_4, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_5(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + CafeConfigTemplate::VT_UNK_5, + None, + ) + } + } + #[inline] + pub fn energy_amount(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(CafeConfigTemplate::VT_ENERGY_AMOUNT, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_7(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(CafeConfigTemplate::VT_UNK_7, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_8(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(CafeConfigTemplate::VT_UNK_8, Some(0)) + .unwrap() + } + } } impl flatbuffers::Verifiable for CafeConfigTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::>("menu_name", Self::VT_MENU_NAME, false)? - .visit_field::("unk_1", Self::VT_UNK_1, false)? - .visit_field::("price", Self::VT_PRICE, false)? - .visit_field::>("unlock_condition", Self::VT_UNLOCK_CONDITION, false)? - .visit_field::("unk_2", Self::VT_UNK_2, false)? - .visit_field::>("description_text", Self::VT_DESCRIPTION_TEXT, false)? - .visit_field::("icon", Self::VT_ICON, false)? - .visit_field::>("cafe_prefab", Self::VT_CAFE_PREFAB, false)? - .visit_field::("reward_buff_id", Self::VT_REWARD_BUFF_ID, false)? - .visit_field::("unk_3", Self::VT_UNK_3, false)? - .visit_field::("unk_4", Self::VT_UNK_4, false)? - .visit_field::>>("unk_5", Self::VT_UNK_5, false)? - .visit_field::("energy_amount", Self::VT_ENERGY_AMOUNT, false)? - .visit_field::("unk_7", Self::VT_UNK_7, false)? - .visit_field::("unk_8", Self::VT_UNK_8, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::>( + "menu_name", + Self::VT_MENU_NAME, + false, + )? + .visit_field::("unk_1", Self::VT_UNK_1, false)? + .visit_field::("price", Self::VT_PRICE, false)? + .visit_field::>( + "unlock_condition", + Self::VT_UNLOCK_CONDITION, + false, + )? + .visit_field::("unk_2", Self::VT_UNK_2, false)? + .visit_field::>( + "description_text", + Self::VT_DESCRIPTION_TEXT, + false, + )? + .visit_field::("icon", Self::VT_ICON, false)? + .visit_field::>( + "cafe_prefab", + Self::VT_CAFE_PREFAB, + false, + )? + .visit_field::("reward_buff_id", Self::VT_REWARD_BUFF_ID, false)? + .visit_field::("unk_3", Self::VT_UNK_3, false)? + .visit_field::("unk_4", Self::VT_UNK_4, false)? + .visit_field::>>( + "unk_5", + Self::VT_UNK_5, + false, + )? + .visit_field::("energy_amount", Self::VT_ENERGY_AMOUNT, false)? + .visit_field::("unk_7", Self::VT_UNK_7, false)? + .visit_field::("unk_8", Self::VT_UNK_8, false)? + .finish(); + Ok(()) + } } pub struct CafeConfigTemplateArgs<'a> { pub id: i32, @@ -3656,278 +5006,392 @@ pub struct CafeConfigTemplateArgs<'a> { pub unk_8: i32, } impl<'a> Default for CafeConfigTemplateArgs<'a> { - #[inline] - fn default() -> Self { - CafeConfigTemplateArgs { - id: 0, - menu_name: None, - unk_1: 0, - price: 0, - unlock_condition: None, - unk_2: false, - description_text: None, - icon: 0, - cafe_prefab: None, - reward_buff_id: 0, - unk_3: 0, - unk_4: 0, - unk_5: None, - energy_amount: 0, - unk_7: 0, - unk_8: 0, + #[inline] + fn default() -> Self { + CafeConfigTemplateArgs { + id: 0, + menu_name: None, + unk_1: 0, + price: 0, + unlock_condition: None, + unk_2: false, + description_text: None, + icon: 0, + cafe_prefab: None, + reward_buff_id: 0, + unk_3: 0, + unk_4: 0, + unk_5: None, + energy_amount: 0, + unk_7: 0, + unk_8: 0, + } } - } } pub struct CafeConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CafeConfigTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(CafeConfigTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_menu_name(&mut self, menu_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(CafeConfigTemplate::VT_MENU_NAME, menu_name); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: i32) { - self.fbb_.push_slot::(CafeConfigTemplate::VT_UNK_1, unk_1, 0); - } - #[inline] - pub fn add_price(&mut self, price: i32) { - self.fbb_.push_slot::(CafeConfigTemplate::VT_PRICE, price, 0); - } - #[inline] - pub fn add_unlock_condition(&mut self, unlock_condition: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(CafeConfigTemplate::VT_UNLOCK_CONDITION, unlock_condition); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: bool) { - self.fbb_.push_slot::(CafeConfigTemplate::VT_UNK_2, unk_2, false); - } - #[inline] - pub fn add_description_text(&mut self, description_text: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(CafeConfigTemplate::VT_DESCRIPTION_TEXT, description_text); - } - #[inline] - pub fn add_icon(&mut self, icon: i32) { - self.fbb_.push_slot::(CafeConfigTemplate::VT_ICON, icon, 0); - } - #[inline] - pub fn add_cafe_prefab(&mut self, cafe_prefab: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(CafeConfigTemplate::VT_CAFE_PREFAB, cafe_prefab); - } - #[inline] - pub fn add_reward_buff_id(&mut self, reward_buff_id: i32) { - self.fbb_.push_slot::(CafeConfigTemplate::VT_REWARD_BUFF_ID, reward_buff_id, 0); - } - #[inline] - pub fn add_unk_3(&mut self, unk_3: i32) { - self.fbb_.push_slot::(CafeConfigTemplate::VT_UNK_3, unk_3, 0); - } - #[inline] - pub fn add_unk_4(&mut self, unk_4: i32) { - self.fbb_.push_slot::(CafeConfigTemplate::VT_UNK_4, unk_4, 0); - } - #[inline] - pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(CafeConfigTemplate::VT_UNK_5, unk_5); - } - #[inline] - pub fn add_energy_amount(&mut self, energy_amount: i32) { - self.fbb_.push_slot::(CafeConfigTemplate::VT_ENERGY_AMOUNT, energy_amount, 0); - } - #[inline] - pub fn add_unk_7(&mut self, unk_7: i32) { - self.fbb_.push_slot::(CafeConfigTemplate::VT_UNK_7, unk_7, 0); - } - #[inline] - pub fn add_unk_8(&mut self, unk_8: i32) { - self.fbb_.push_slot::(CafeConfigTemplate::VT_UNK_8, unk_8, 0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CafeConfigTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - CafeConfigTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_.push_slot::(CafeConfigTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_menu_name(&mut self, menu_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + CafeConfigTemplate::VT_MENU_NAME, + menu_name, + ); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: i32) { + self.fbb_ + .push_slot::(CafeConfigTemplate::VT_UNK_1, unk_1, 0); + } + #[inline] + pub fn add_price(&mut self, price: i32) { + self.fbb_ + .push_slot::(CafeConfigTemplate::VT_PRICE, price, 0); + } + #[inline] + pub fn add_unlock_condition(&mut self, unlock_condition: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + CafeConfigTemplate::VT_UNLOCK_CONDITION, + unlock_condition, + ); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: bool) { + self.fbb_ + .push_slot::(CafeConfigTemplate::VT_UNK_2, unk_2, false); + } + #[inline] + pub fn add_description_text(&mut self, description_text: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + CafeConfigTemplate::VT_DESCRIPTION_TEXT, + description_text, + ); + } + #[inline] + pub fn add_icon(&mut self, icon: i32) { + self.fbb_ + .push_slot::(CafeConfigTemplate::VT_ICON, icon, 0); + } + #[inline] + pub fn add_cafe_prefab(&mut self, cafe_prefab: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + CafeConfigTemplate::VT_CAFE_PREFAB, + cafe_prefab, + ); + } + #[inline] + pub fn add_reward_buff_id(&mut self, reward_buff_id: i32) { + self.fbb_ + .push_slot::(CafeConfigTemplate::VT_REWARD_BUFF_ID, reward_buff_id, 0); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: i32) { + self.fbb_ + .push_slot::(CafeConfigTemplate::VT_UNK_3, unk_3, 0); + } + #[inline] + pub fn add_unk_4(&mut self, unk_4: i32) { + self.fbb_ + .push_slot::(CafeConfigTemplate::VT_UNK_4, unk_4, 0); + } + #[inline] + pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(CafeConfigTemplate::VT_UNK_5, unk_5); + } + #[inline] + pub fn add_energy_amount(&mut self, energy_amount: i32) { + self.fbb_ + .push_slot::(CafeConfigTemplate::VT_ENERGY_AMOUNT, energy_amount, 0); + } + #[inline] + pub fn add_unk_7(&mut self, unk_7: i32) { + self.fbb_ + .push_slot::(CafeConfigTemplate::VT_UNK_7, unk_7, 0); + } + #[inline] + pub fn add_unk_8(&mut self, unk_8: i32) { + self.fbb_ + .push_slot::(CafeConfigTemplate::VT_UNK_8, unk_8, 0); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> CafeConfigTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + CafeConfigTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for CafeConfigTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("CafeConfigTemplate"); - ds.field("id", &self.id()); - ds.field("menu_name", &self.menu_name()); - ds.field("unk_1", &self.unk_1()); - ds.field("price", &self.price()); - ds.field("unlock_condition", &self.unlock_condition()); - ds.field("unk_2", &self.unk_2()); - ds.field("description_text", &self.description_text()); - ds.field("icon", &self.icon()); - ds.field("cafe_prefab", &self.cafe_prefab()); - ds.field("reward_buff_id", &self.reward_buff_id()); - ds.field("unk_3", &self.unk_3()); - ds.field("unk_4", &self.unk_4()); - ds.field("unk_5", &self.unk_5()); - ds.field("energy_amount", &self.energy_amount()); - ds.field("unk_7", &self.unk_7()); - ds.field("unk_8", &self.unk_8()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("CafeConfigTemplate"); + ds.field("id", &self.id()); + ds.field("menu_name", &self.menu_name()); + ds.field("unk_1", &self.unk_1()); + ds.field("price", &self.price()); + ds.field("unlock_condition", &self.unlock_condition()); + ds.field("unk_2", &self.unk_2()); + ds.field("description_text", &self.description_text()); + ds.field("icon", &self.icon()); + ds.field("cafe_prefab", &self.cafe_prefab()); + ds.field("reward_buff_id", &self.reward_buff_id()); + ds.field("unk_3", &self.unk_3()); + ds.field("unk_4", &self.unk_4()); + ds.field("unk_5", &self.unk_5()); + ds.field("energy_amount", &self.energy_amount()); + ds.field("unk_7", &self.unk_7()); + ds.field("unk_8", &self.unk_8()); + ds.finish() + } } pub enum EquipmentTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct EquipmentTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for EquipmentTemplate<'a> { - type Inner = EquipmentTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = EquipmentTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> EquipmentTemplate<'a> { - pub const VT_ITEM_ID: flatbuffers::VOffsetT = 4; - pub const VT_EQUIPMENT_TYPE: flatbuffers::VOffsetT = 6; - pub const VT_SUIT_TYPE: flatbuffers::VOffsetT = 8; - pub const VT_DISK_ICON_PATH: flatbuffers::VOffsetT = 10; - pub const VT_DRAWING_PATH: flatbuffers::VOffsetT = 12; - pub const VT_FRONT_LABEL_TEXTURE_PATH: flatbuffers::VOffsetT = 14; - pub const VT_BACK_LABEL_TEXTURE_PATH: flatbuffers::VOffsetT = 16; - pub const VT_DISK_TEXTURE_PATH: flatbuffers::VOffsetT = 18; - pub const VT_PLAY_MUSIC_TAG: flatbuffers::VOffsetT = 20; - pub const VT_PAUSE_MUSIC_TAG: flatbuffers::VOffsetT = 22; + pub const VT_ITEM_ID: flatbuffers::VOffsetT = 4; + pub const VT_EQUIPMENT_TYPE: flatbuffers::VOffsetT = 6; + pub const VT_SUIT_TYPE: flatbuffers::VOffsetT = 8; + pub const VT_DISK_ICON_PATH: flatbuffers::VOffsetT = 10; + pub const VT_DRAWING_PATH: flatbuffers::VOffsetT = 12; + pub const VT_FRONT_LABEL_TEXTURE_PATH: flatbuffers::VOffsetT = 14; + pub const VT_BACK_LABEL_TEXTURE_PATH: flatbuffers::VOffsetT = 16; + pub const VT_DISK_TEXTURE_PATH: flatbuffers::VOffsetT = 18; + pub const VT_PLAY_MUSIC_TAG: flatbuffers::VOffsetT = 20; + pub const VT_PAUSE_MUSIC_TAG: flatbuffers::VOffsetT = 22; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - EquipmentTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args EquipmentTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = EquipmentTemplateBuilder::new(_fbb); - if let Some(x) = args.pause_music_tag { builder.add_pause_music_tag(x); } - if let Some(x) = args.play_music_tag { builder.add_play_music_tag(x); } - if let Some(x) = args.disk_texture_path { builder.add_disk_texture_path(x); } - if let Some(x) = args.back_label_texture_path { builder.add_back_label_texture_path(x); } - if let Some(x) = args.front_label_texture_path { builder.add_front_label_texture_path(x); } - if let Some(x) = args.drawing_path { builder.add_drawing_path(x); } - if let Some(x) = args.disk_icon_path { builder.add_disk_icon_path(x); } - builder.add_suit_type(args.suit_type); - builder.add_equipment_type(args.equipment_type); - builder.add_item_id(args.item_id); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + EquipmentTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args EquipmentTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = EquipmentTemplateBuilder::new(_fbb); + if let Some(x) = args.pause_music_tag { + builder.add_pause_music_tag(x); + } + if let Some(x) = args.play_music_tag { + builder.add_play_music_tag(x); + } + if let Some(x) = args.disk_texture_path { + builder.add_disk_texture_path(x); + } + if let Some(x) = args.back_label_texture_path { + builder.add_back_label_texture_path(x); + } + if let Some(x) = args.front_label_texture_path { + builder.add_front_label_texture_path(x); + } + if let Some(x) = args.drawing_path { + builder.add_drawing_path(x); + } + if let Some(x) = args.disk_icon_path { + builder.add_disk_icon_path(x); + } + builder.add_suit_type(args.suit_type); + builder.add_equipment_type(args.equipment_type); + builder.add_item_id(args.item_id); + builder.finish() + } - - #[inline] - pub fn item_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(EquipmentTemplate::VT_ITEM_ID, Some(0)).unwrap()} - } - #[inline] - pub fn equipment_type(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(EquipmentTemplate::VT_EQUIPMENT_TYPE, Some(0)).unwrap()} - } - #[inline] - pub fn suit_type(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(EquipmentTemplate::VT_SUIT_TYPE, Some(0)).unwrap()} - } - #[inline] - pub fn disk_icon_path(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentTemplate::VT_DISK_ICON_PATH, None)} - } - #[inline] - pub fn drawing_path(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentTemplate::VT_DRAWING_PATH, None)} - } - #[inline] - pub fn front_label_texture_path(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentTemplate::VT_FRONT_LABEL_TEXTURE_PATH, None)} - } - #[inline] - pub fn back_label_texture_path(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentTemplate::VT_BACK_LABEL_TEXTURE_PATH, None)} - } - #[inline] - pub fn disk_texture_path(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentTemplate::VT_DISK_TEXTURE_PATH, None)} - } - #[inline] - pub fn play_music_tag(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentTemplate::VT_PLAY_MUSIC_TAG, None)} - } - #[inline] - pub fn pause_music_tag(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentTemplate::VT_PAUSE_MUSIC_TAG, None)} - } + #[inline] + pub fn item_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentTemplate::VT_ITEM_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn equipment_type(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentTemplate::VT_EQUIPMENT_TYPE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn suit_type(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentTemplate::VT_SUIT_TYPE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn disk_icon_path(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + EquipmentTemplate::VT_DISK_ICON_PATH, + None, + ) + } + } + #[inline] + pub fn drawing_path(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(EquipmentTemplate::VT_DRAWING_PATH, None) + } + } + #[inline] + pub fn front_label_texture_path(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + EquipmentTemplate::VT_FRONT_LABEL_TEXTURE_PATH, + None, + ) + } + } + #[inline] + pub fn back_label_texture_path(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + EquipmentTemplate::VT_BACK_LABEL_TEXTURE_PATH, + None, + ) + } + } + #[inline] + pub fn disk_texture_path(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + EquipmentTemplate::VT_DISK_TEXTURE_PATH, + None, + ) + } + } + #[inline] + pub fn play_music_tag(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + EquipmentTemplate::VT_PLAY_MUSIC_TAG, + None, + ) + } + } + #[inline] + pub fn pause_music_tag(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + EquipmentTemplate::VT_PAUSE_MUSIC_TAG, + None, + ) + } + } } impl flatbuffers::Verifiable for EquipmentTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("item_id", Self::VT_ITEM_ID, false)? - .visit_field::("equipment_type", Self::VT_EQUIPMENT_TYPE, false)? - .visit_field::("suit_type", Self::VT_SUIT_TYPE, false)? - .visit_field::>("disk_icon_path", Self::VT_DISK_ICON_PATH, false)? - .visit_field::>("drawing_path", Self::VT_DRAWING_PATH, false)? - .visit_field::>("front_label_texture_path", Self::VT_FRONT_LABEL_TEXTURE_PATH, false)? - .visit_field::>("back_label_texture_path", Self::VT_BACK_LABEL_TEXTURE_PATH, false)? - .visit_field::>("disk_texture_path", Self::VT_DISK_TEXTURE_PATH, false)? - .visit_field::>("play_music_tag", Self::VT_PLAY_MUSIC_TAG, false)? - .visit_field::>("pause_music_tag", Self::VT_PAUSE_MUSIC_TAG, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("item_id", Self::VT_ITEM_ID, false)? + .visit_field::("equipment_type", Self::VT_EQUIPMENT_TYPE, false)? + .visit_field::("suit_type", Self::VT_SUIT_TYPE, false)? + .visit_field::>( + "disk_icon_path", + Self::VT_DISK_ICON_PATH, + false, + )? + .visit_field::>( + "drawing_path", + Self::VT_DRAWING_PATH, + false, + )? + .visit_field::>( + "front_label_texture_path", + Self::VT_FRONT_LABEL_TEXTURE_PATH, + false, + )? + .visit_field::>( + "back_label_texture_path", + Self::VT_BACK_LABEL_TEXTURE_PATH, + false, + )? + .visit_field::>( + "disk_texture_path", + Self::VT_DISK_TEXTURE_PATH, + false, + )? + .visit_field::>( + "play_music_tag", + Self::VT_PLAY_MUSIC_TAG, + false, + )? + .visit_field::>( + "pause_music_tag", + Self::VT_PAUSE_MUSIC_TAG, + false, + )? + .finish(); + Ok(()) + } } pub struct EquipmentTemplateArgs<'a> { pub item_id: i32, @@ -3942,580 +5406,1232 @@ pub struct EquipmentTemplateArgs<'a> { pub pause_music_tag: Option>, } impl<'a> Default for EquipmentTemplateArgs<'a> { - #[inline] - fn default() -> Self { - EquipmentTemplateArgs { - item_id: 0, - equipment_type: 0, - suit_type: 0, - disk_icon_path: None, - drawing_path: None, - front_label_texture_path: None, - back_label_texture_path: None, - disk_texture_path: None, - play_music_tag: None, - pause_music_tag: None, + #[inline] + fn default() -> Self { + EquipmentTemplateArgs { + item_id: 0, + equipment_type: 0, + suit_type: 0, + disk_icon_path: None, + drawing_path: None, + front_label_texture_path: None, + back_label_texture_path: None, + disk_texture_path: None, + play_music_tag: None, + pause_music_tag: None, + } } - } } pub struct EquipmentTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EquipmentTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_item_id(&mut self, item_id: i32) { - self.fbb_.push_slot::(EquipmentTemplate::VT_ITEM_ID, item_id, 0); - } - #[inline] - pub fn add_equipment_type(&mut self, equipment_type: i32) { - self.fbb_.push_slot::(EquipmentTemplate::VT_EQUIPMENT_TYPE, equipment_type, 0); - } - #[inline] - pub fn add_suit_type(&mut self, suit_type: i32) { - self.fbb_.push_slot::(EquipmentTemplate::VT_SUIT_TYPE, suit_type, 0); - } - #[inline] - pub fn add_disk_icon_path(&mut self, disk_icon_path: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentTemplate::VT_DISK_ICON_PATH, disk_icon_path); - } - #[inline] - pub fn add_drawing_path(&mut self, drawing_path: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentTemplate::VT_DRAWING_PATH, drawing_path); - } - #[inline] - pub fn add_front_label_texture_path(&mut self, front_label_texture_path: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentTemplate::VT_FRONT_LABEL_TEXTURE_PATH, front_label_texture_path); - } - #[inline] - pub fn add_back_label_texture_path(&mut self, back_label_texture_path: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentTemplate::VT_BACK_LABEL_TEXTURE_PATH, back_label_texture_path); - } - #[inline] - pub fn add_disk_texture_path(&mut self, disk_texture_path: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentTemplate::VT_DISK_TEXTURE_PATH, disk_texture_path); - } - #[inline] - pub fn add_play_music_tag(&mut self, play_music_tag: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentTemplate::VT_PLAY_MUSIC_TAG, play_music_tag); - } - #[inline] - pub fn add_pause_music_tag(&mut self, pause_music_tag: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentTemplate::VT_PAUSE_MUSIC_TAG, pause_music_tag); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EquipmentTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - EquipmentTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_item_id(&mut self, item_id: i32) { + self.fbb_ + .push_slot::(EquipmentTemplate::VT_ITEM_ID, item_id, 0); + } + #[inline] + pub fn add_equipment_type(&mut self, equipment_type: i32) { + self.fbb_ + .push_slot::(EquipmentTemplate::VT_EQUIPMENT_TYPE, equipment_type, 0); + } + #[inline] + pub fn add_suit_type(&mut self, suit_type: i32) { + self.fbb_ + .push_slot::(EquipmentTemplate::VT_SUIT_TYPE, suit_type, 0); + } + #[inline] + pub fn add_disk_icon_path(&mut self, disk_icon_path: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + EquipmentTemplate::VT_DISK_ICON_PATH, + disk_icon_path, + ); + } + #[inline] + pub fn add_drawing_path(&mut self, drawing_path: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + EquipmentTemplate::VT_DRAWING_PATH, + drawing_path, + ); + } + #[inline] + pub fn add_front_label_texture_path( + &mut self, + front_label_texture_path: flatbuffers::WIPOffset<&'b str>, + ) { + self.fbb_.push_slot_always::>( + EquipmentTemplate::VT_FRONT_LABEL_TEXTURE_PATH, + front_label_texture_path, + ); + } + #[inline] + pub fn add_back_label_texture_path( + &mut self, + back_label_texture_path: flatbuffers::WIPOffset<&'b str>, + ) { + self.fbb_.push_slot_always::>( + EquipmentTemplate::VT_BACK_LABEL_TEXTURE_PATH, + back_label_texture_path, + ); + } + #[inline] + pub fn add_disk_texture_path(&mut self, disk_texture_path: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + EquipmentTemplate::VT_DISK_TEXTURE_PATH, + disk_texture_path, + ); + } + #[inline] + pub fn add_play_music_tag(&mut self, play_music_tag: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + EquipmentTemplate::VT_PLAY_MUSIC_TAG, + play_music_tag, + ); + } + #[inline] + pub fn add_pause_music_tag(&mut self, pause_music_tag: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + EquipmentTemplate::VT_PAUSE_MUSIC_TAG, + pause_music_tag, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> EquipmentTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + EquipmentTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for EquipmentTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("EquipmentTemplate"); - ds.field("item_id", &self.item_id()); - ds.field("equipment_type", &self.equipment_type()); - ds.field("suit_type", &self.suit_type()); - ds.field("disk_icon_path", &self.disk_icon_path()); - ds.field("drawing_path", &self.drawing_path()); - ds.field("front_label_texture_path", &self.front_label_texture_path()); - ds.field("back_label_texture_path", &self.back_label_texture_path()); - ds.field("disk_texture_path", &self.disk_texture_path()); - ds.field("play_music_tag", &self.play_music_tag()); - ds.field("pause_music_tag", &self.pause_music_tag()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("EquipmentTemplate"); + ds.field("item_id", &self.item_id()); + ds.field("equipment_type", &self.equipment_type()); + ds.field("suit_type", &self.suit_type()); + ds.field("disk_icon_path", &self.disk_icon_path()); + ds.field("drawing_path", &self.drawing_path()); + ds.field("front_label_texture_path", &self.front_label_texture_path()); + ds.field("back_label_texture_path", &self.back_label_texture_path()); + ds.field("disk_texture_path", &self.disk_texture_path()); + ds.field("play_music_tag", &self.play_music_tag()); + ds.field("pause_music_tag", &self.pause_music_tag()); + ds.finish() + } } pub enum EquipmentSuitTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct EquipmentSuitTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for EquipmentSuitTemplate<'a> { - type Inner = EquipmentSuitTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = EquipmentSuitTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> EquipmentSuitTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_NAME: flatbuffers::VOffsetT = 6; - pub const VT_PRIMARY_CONDITION: flatbuffers::VOffsetT = 8; - pub const VT_PRIMARY_SUIT_PROPERTYS: flatbuffers::VOffsetT = 10; - pub const VT_PRIMARY_SUIT_ABILITY: flatbuffers::VOffsetT = 12; - pub const VT_PRIMARY_DESCRIPTION: flatbuffers::VOffsetT = 14; - pub const VT_SECONDARY_CONDITION: flatbuffers::VOffsetT = 16; - pub const VT_SECONDARY_SUIT_PROPERTYS: flatbuffers::VOffsetT = 18; - pub const VT_SECONDARY_SUIT_ABILITY: flatbuffers::VOffsetT = 20; - pub const VT_SECONDARY_DESCRIPTION: flatbuffers::VOffsetT = 22; - pub const VT_SUIT_ITEM_ICON: flatbuffers::VOffsetT = 24; - pub const VT_SUIT_STORY: flatbuffers::VOffsetT = 26; - pub const VT_SUIT_FILTER_OPTION: flatbuffers::VOffsetT = 28; - pub const VT_SUIT_ICON: flatbuffers::VOffsetT = 30; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_NAME: flatbuffers::VOffsetT = 6; + pub const VT_PRIMARY_CONDITION: flatbuffers::VOffsetT = 8; + pub const VT_UNK_3: flatbuffers::VOffsetT = 10; + pub const VT_PRIMARY_SUIT_ABILITY: flatbuffers::VOffsetT = 12; + pub const VT_PRIMARY_DESCRIPTION: flatbuffers::VOffsetT = 14; + pub const VT_SECONDARY_CONDITION: flatbuffers::VOffsetT = 16; + pub const VT_UNK_7: flatbuffers::VOffsetT = 18; + pub const VT_SECONDARY_SUIT_ABILITY: flatbuffers::VOffsetT = 20; + pub const VT_SECONDARY_DESCRIPTION: flatbuffers::VOffsetT = 22; + pub const VT_SUIT_ICON: flatbuffers::VOffsetT = 24; + pub const VT_SUIT_STORY: flatbuffers::VOffsetT = 26; + pub const VT_SUIT_FILTER_OPTION: flatbuffers::VOffsetT = 28; + pub const VT_SUIT_ITEM_ICON: flatbuffers::VOffsetT = 30; + pub const VT_UNK_14: flatbuffers::VOffsetT = 32; + pub const VT_ORDER: flatbuffers::VOffsetT = 34; + pub const VT_UNK_16: flatbuffers::VOffsetT = 36; + pub const VT_UNK_17: flatbuffers::VOffsetT = 38; + pub const VT_UNK_18: flatbuffers::VOffsetT = 40; + pub const VT_UNK_19: flatbuffers::VOffsetT = 42; + pub const VT_UNK_20: flatbuffers::VOffsetT = 44; + pub const VT_UNK_21: flatbuffers::VOffsetT = 46; + pub const VT_PRIMARY_SUIT_PROPERTYS: flatbuffers::VOffsetT = 48; + pub const VT_UNK_23: flatbuffers::VOffsetT = 50; + pub const VT_UNK_24: flatbuffers::VOffsetT = 52; + pub const VT_UNK_25: flatbuffers::VOffsetT = 54; + pub const VT_UNK_26: flatbuffers::VOffsetT = 56; + pub const VT_UNK_27: flatbuffers::VOffsetT = 58; + pub const VT_TAG: flatbuffers::VOffsetT = 60; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - EquipmentSuitTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args EquipmentSuitTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = EquipmentSuitTemplateBuilder::new(_fbb); - if let Some(x) = args.suit_icon { builder.add_suit_icon(x); } - if let Some(x) = args.suit_filter_option { builder.add_suit_filter_option(x); } - if let Some(x) = args.suit_story { builder.add_suit_story(x); } - if let Some(x) = args.suit_item_icon { builder.add_suit_item_icon(x); } - if let Some(x) = args.secondary_description { builder.add_secondary_description(x); } - builder.add_secondary_suit_ability(args.secondary_suit_ability); - if let Some(x) = args.secondary_suit_propertys { builder.add_secondary_suit_propertys(x); } - builder.add_secondary_condition(args.secondary_condition); - if let Some(x) = args.primary_description { builder.add_primary_description(x); } - builder.add_primary_suit_ability(args.primary_suit_ability); - if let Some(x) = args.primary_suit_propertys { builder.add_primary_suit_propertys(x); } - builder.add_primary_condition(args.primary_condition); - if let Some(x) = args.name { builder.add_name(x); } - builder.add_id(args.id); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + EquipmentSuitTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args EquipmentSuitTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = EquipmentSuitTemplateBuilder::new(_fbb); + if let Some(x) = args.tag { + builder.add_tag(x); + } + if let Some(x) = args.unk_27 { + builder.add_unk_27(x); + } + if let Some(x) = args.unk_26 { + builder.add_unk_26(x); + } + if let Some(x) = args.unk_25 { + builder.add_unk_25(x); + } + builder.add_unk_24(args.unk_24); + if let Some(x) = args.unk_23 { + builder.add_unk_23(x); + } + if let Some(x) = args.primary_suit_propertys { + builder.add_primary_suit_propertys(x); + } + builder.add_unk_21(args.unk_21); + builder.add_unk_20(args.unk_20); + builder.add_unk_19(args.unk_19); + builder.add_unk_18(args.unk_18); + builder.add_unk_17(args.unk_17); + builder.add_unk_16(args.unk_16); + builder.add_order(args.order); + builder.add_unk_14(args.unk_14); + if let Some(x) = args.suit_item_icon { + builder.add_suit_item_icon(x); + } + if let Some(x) = args.suit_filter_option { + builder.add_suit_filter_option(x); + } + if let Some(x) = args.suit_story { + builder.add_suit_story(x); + } + if let Some(x) = args.suit_icon { + builder.add_suit_icon(x); + } + if let Some(x) = args.secondary_description { + builder.add_secondary_description(x); + } + builder.add_secondary_suit_ability(args.secondary_suit_ability); + builder.add_unk_7(args.unk_7); + builder.add_secondary_condition(args.secondary_condition); + if let Some(x) = args.primary_description { + builder.add_primary_description(x); + } + builder.add_primary_suit_ability(args.primary_suit_ability); + builder.add_unk_3(args.unk_3); + builder.add_primary_condition(args.primary_condition); + if let Some(x) = args.name { + builder.add_name(x); + } + builder.add_id(args.id); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(EquipmentSuitTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentSuitTemplate::VT_NAME, None)} - } - #[inline] - pub fn primary_condition(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(EquipmentSuitTemplate::VT_PRIMARY_CONDITION, Some(0)).unwrap()} - } - #[inline] - pub fn primary_suit_propertys(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(EquipmentSuitTemplate::VT_PRIMARY_SUIT_PROPERTYS, None)} - } - #[inline] - pub fn primary_suit_ability(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(EquipmentSuitTemplate::VT_PRIMARY_SUIT_ABILITY, Some(0)).unwrap()} - } - #[inline] - pub fn primary_description(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentSuitTemplate::VT_PRIMARY_DESCRIPTION, None)} - } - #[inline] - pub fn secondary_condition(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(EquipmentSuitTemplate::VT_SECONDARY_CONDITION, Some(0)).unwrap()} - } - #[inline] - pub fn secondary_suit_propertys(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(EquipmentSuitTemplate::VT_SECONDARY_SUIT_PROPERTYS, None)} - } - #[inline] - pub fn secondary_suit_ability(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(EquipmentSuitTemplate::VT_SECONDARY_SUIT_ABILITY, Some(0)).unwrap()} - } - #[inline] - pub fn secondary_description(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentSuitTemplate::VT_SECONDARY_DESCRIPTION, None)} - } - #[inline] - pub fn suit_item_icon(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentSuitTemplate::VT_SUIT_ITEM_ICON, None)} - } - #[inline] - pub fn suit_story(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentSuitTemplate::VT_SUIT_STORY, None)} - } - #[inline] - pub fn suit_filter_option(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentSuitTemplate::VT_SUIT_FILTER_OPTION, None)} - } - #[inline] - pub fn suit_icon(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(EquipmentSuitTemplate::VT_SUIT_ICON, None)} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(EquipmentSuitTemplate::VT_NAME, None) + } + } + #[inline] + pub fn primary_condition(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_PRIMARY_CONDITION, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_UNK_3, Some(0)) + .unwrap() + } + } + #[inline] + pub fn primary_suit_ability(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_PRIMARY_SUIT_ABILITY, Some(0)) + .unwrap() + } + } + #[inline] + pub fn primary_description(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + EquipmentSuitTemplate::VT_PRIMARY_DESCRIPTION, + None, + ) + } + } + #[inline] + pub fn secondary_condition(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_SECONDARY_CONDITION, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_7(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_UNK_7, Some(0)) + .unwrap() + } + } + #[inline] + pub fn secondary_suit_ability(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_SECONDARY_SUIT_ABILITY, Some(0)) + .unwrap() + } + } + #[inline] + pub fn secondary_description(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + EquipmentSuitTemplate::VT_SECONDARY_DESCRIPTION, + None, + ) + } + } + #[inline] + pub fn suit_icon(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + EquipmentSuitTemplate::VT_SUIT_ICON, + None, + ) + } + } + #[inline] + pub fn suit_story(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + EquipmentSuitTemplate::VT_SUIT_STORY, + None, + ) + } + } + #[inline] + pub fn suit_filter_option(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + EquipmentSuitTemplate::VT_SUIT_FILTER_OPTION, + None, + ) + } + } + #[inline] + pub fn suit_item_icon(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + EquipmentSuitTemplate::VT_SUIT_ITEM_ICON, + None, + ) + } + } + #[inline] + pub fn unk_14(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_UNK_14, Some(0)) + .unwrap() + } + } + #[inline] + pub fn order(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_ORDER, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_16(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_UNK_16, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_17(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_UNK_17, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_18(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_UNK_18, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_19(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_UNK_19, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_20(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_UNK_20, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_21(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_UNK_21, Some(0)) + .unwrap() + } + } + #[inline] + pub fn primary_suit_propertys(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + EquipmentSuitTemplate::VT_PRIMARY_SUIT_PROPERTYS, + None, + ) + } + } + #[inline] + pub fn unk_23(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + EquipmentSuitTemplate::VT_UNK_23, + None, + ) + } + } + #[inline] + pub fn unk_24(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentSuitTemplate::VT_UNK_24, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_25(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + EquipmentSuitTemplate::VT_UNK_25, + None, + ) + } + } + #[inline] + pub fn unk_26(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + EquipmentSuitTemplate::VT_UNK_26, + None, + ) + } + } + #[inline] + pub fn unk_27(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + EquipmentSuitTemplate::VT_UNK_27, + None, + ) + } + } + #[inline] + pub fn tag(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(EquipmentSuitTemplate::VT_TAG, None) + } + } } impl flatbuffers::Verifiable for EquipmentSuitTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::>("name", Self::VT_NAME, false)? - .visit_field::("primary_condition", Self::VT_PRIMARY_CONDITION, false)? - .visit_field::>>("primary_suit_propertys", Self::VT_PRIMARY_SUIT_PROPERTYS, false)? - .visit_field::("primary_suit_ability", Self::VT_PRIMARY_SUIT_ABILITY, false)? - .visit_field::>("primary_description", Self::VT_PRIMARY_DESCRIPTION, false)? - .visit_field::("secondary_condition", Self::VT_SECONDARY_CONDITION, false)? - .visit_field::>>("secondary_suit_propertys", Self::VT_SECONDARY_SUIT_PROPERTYS, false)? - .visit_field::("secondary_suit_ability", Self::VT_SECONDARY_SUIT_ABILITY, false)? - .visit_field::>("secondary_description", Self::VT_SECONDARY_DESCRIPTION, false)? - .visit_field::>("suit_item_icon", Self::VT_SUIT_ITEM_ICON, false)? - .visit_field::>("suit_story", Self::VT_SUIT_STORY, false)? - .visit_field::>("suit_filter_option", Self::VT_SUIT_FILTER_OPTION, false)? - .visit_field::>("suit_icon", Self::VT_SUIT_ICON, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::>("name", Self::VT_NAME, false)? + .visit_field::("primary_condition", Self::VT_PRIMARY_CONDITION, false)? + .visit_field::("unk_3", Self::VT_UNK_3, false)? + .visit_field::("primary_suit_ability", Self::VT_PRIMARY_SUIT_ABILITY, false)? + .visit_field::>( + "primary_description", + Self::VT_PRIMARY_DESCRIPTION, + false, + )? + .visit_field::("secondary_condition", Self::VT_SECONDARY_CONDITION, false)? + .visit_field::("unk_7", Self::VT_UNK_7, false)? + .visit_field::( + "secondary_suit_ability", + Self::VT_SECONDARY_SUIT_ABILITY, + false, + )? + .visit_field::>( + "secondary_description", + Self::VT_SECONDARY_DESCRIPTION, + false, + )? + .visit_field::>( + "suit_icon", + Self::VT_SUIT_ICON, + false, + )? + .visit_field::>( + "suit_story", + Self::VT_SUIT_STORY, + false, + )? + .visit_field::>( + "suit_filter_option", + Self::VT_SUIT_FILTER_OPTION, + false, + )? + .visit_field::>( + "suit_item_icon", + Self::VT_SUIT_ITEM_ICON, + false, + )? + .visit_field::("unk_14", Self::VT_UNK_14, false)? + .visit_field::("order", Self::VT_ORDER, false)? + .visit_field::("unk_16", Self::VT_UNK_16, false)? + .visit_field::("unk_17", Self::VT_UNK_17, false)? + .visit_field::("unk_18", Self::VT_UNK_18, false)? + .visit_field::("unk_19", Self::VT_UNK_19, false)? + .visit_field::("unk_20", Self::VT_UNK_20, false)? + .visit_field::("unk_21", Self::VT_UNK_21, false)? + .visit_field::>>( + "primary_suit_propertys", + Self::VT_PRIMARY_SUIT_PROPERTYS, + false, + )? + .visit_field::>>( + "unk_23", + Self::VT_UNK_23, + false, + )? + .visit_field::("unk_24", Self::VT_UNK_24, false)? + .visit_field::>>( + "unk_25", + Self::VT_UNK_25, + false, + )? + .visit_field::>>( + "unk_26", + Self::VT_UNK_26, + false, + )? + .visit_field::>>( + "unk_27", + Self::VT_UNK_27, + false, + )? + .visit_field::>("tag", Self::VT_TAG, false)? + .finish(); + Ok(()) + } } pub struct EquipmentSuitTemplateArgs<'a> { pub id: i32, pub name: Option>, pub primary_condition: i32, - pub primary_suit_propertys: Option>>, + pub unk_3: i32, pub primary_suit_ability: i32, pub primary_description: Option>, pub secondary_condition: i32, - pub secondary_suit_propertys: Option>>, + pub unk_7: i32, pub secondary_suit_ability: i32, pub secondary_description: Option>, - pub suit_item_icon: Option>, + pub suit_icon: Option>, pub suit_story: Option>, pub suit_filter_option: Option>, - pub suit_icon: Option>, + pub suit_item_icon: Option>, + pub unk_14: i32, + pub order: i32, + pub unk_16: i32, + pub unk_17: i32, + pub unk_18: i32, + pub unk_19: i32, + pub unk_20: i32, + pub unk_21: i32, + pub primary_suit_propertys: Option>>, + pub unk_23: Option>>, + pub unk_24: i32, + pub unk_25: Option>>, + pub unk_26: Option>>, + pub unk_27: Option>>, + pub tag: Option>, } impl<'a> Default for EquipmentSuitTemplateArgs<'a> { - #[inline] - fn default() -> Self { - EquipmentSuitTemplateArgs { - id: 0, - name: None, - primary_condition: 0, - primary_suit_propertys: None, - primary_suit_ability: 0, - primary_description: None, - secondary_condition: 0, - secondary_suit_propertys: None, - secondary_suit_ability: 0, - secondary_description: None, - suit_item_icon: None, - suit_story: None, - suit_filter_option: None, - suit_icon: None, + #[inline] + fn default() -> Self { + EquipmentSuitTemplateArgs { + id: 0, + name: None, + primary_condition: 0, + unk_3: 0, + primary_suit_ability: 0, + primary_description: None, + secondary_condition: 0, + unk_7: 0, + secondary_suit_ability: 0, + secondary_description: None, + suit_icon: None, + suit_story: None, + suit_filter_option: None, + suit_item_icon: None, + unk_14: 0, + order: 0, + unk_16: 0, + unk_17: 0, + unk_18: 0, + unk_19: 0, + unk_20: 0, + unk_21: 0, + primary_suit_propertys: None, + unk_23: None, + unk_24: 0, + unk_25: None, + unk_26: None, + unk_27: None, + tag: None, + } } - } } pub struct EquipmentSuitTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EquipmentSuitTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(EquipmentSuitTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentSuitTemplate::VT_NAME, name); - } - #[inline] - pub fn add_primary_condition(&mut self, primary_condition: i32) { - self.fbb_.push_slot::(EquipmentSuitTemplate::VT_PRIMARY_CONDITION, primary_condition, 0); - } - #[inline] - pub fn add_primary_suit_propertys(&mut self, primary_suit_propertys: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(EquipmentSuitTemplate::VT_PRIMARY_SUIT_PROPERTYS, primary_suit_propertys); - } - #[inline] - pub fn add_primary_suit_ability(&mut self, primary_suit_ability: i32) { - self.fbb_.push_slot::(EquipmentSuitTemplate::VT_PRIMARY_SUIT_ABILITY, primary_suit_ability, 0); - } - #[inline] - pub fn add_primary_description(&mut self, primary_description: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentSuitTemplate::VT_PRIMARY_DESCRIPTION, primary_description); - } - #[inline] - pub fn add_secondary_condition(&mut self, secondary_condition: i32) { - self.fbb_.push_slot::(EquipmentSuitTemplate::VT_SECONDARY_CONDITION, secondary_condition, 0); - } - #[inline] - pub fn add_secondary_suit_propertys(&mut self, secondary_suit_propertys: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(EquipmentSuitTemplate::VT_SECONDARY_SUIT_PROPERTYS, secondary_suit_propertys); - } - #[inline] - pub fn add_secondary_suit_ability(&mut self, secondary_suit_ability: i32) { - self.fbb_.push_slot::(EquipmentSuitTemplate::VT_SECONDARY_SUIT_ABILITY, secondary_suit_ability, 0); - } - #[inline] - pub fn add_secondary_description(&mut self, secondary_description: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentSuitTemplate::VT_SECONDARY_DESCRIPTION, secondary_description); - } - #[inline] - pub fn add_suit_item_icon(&mut self, suit_item_icon: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentSuitTemplate::VT_SUIT_ITEM_ICON, suit_item_icon); - } - #[inline] - pub fn add_suit_story(&mut self, suit_story: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentSuitTemplate::VT_SUIT_STORY, suit_story); - } - #[inline] - pub fn add_suit_filter_option(&mut self, suit_filter_option: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentSuitTemplate::VT_SUIT_FILTER_OPTION, suit_filter_option); - } - #[inline] - pub fn add_suit_icon(&mut self, suit_icon: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(EquipmentSuitTemplate::VT_SUIT_ICON, suit_icon); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EquipmentSuitTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - EquipmentSuitTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_ + .push_slot::(EquipmentSuitTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(EquipmentSuitTemplate::VT_NAME, name); + } + #[inline] + pub fn add_primary_condition(&mut self, primary_condition: i32) { + self.fbb_.push_slot::( + EquipmentSuitTemplate::VT_PRIMARY_CONDITION, + primary_condition, + 0, + ); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: i32) { + self.fbb_ + .push_slot::(EquipmentSuitTemplate::VT_UNK_3, unk_3, 0); + } + #[inline] + pub fn add_primary_suit_ability(&mut self, primary_suit_ability: i32) { + self.fbb_.push_slot::( + EquipmentSuitTemplate::VT_PRIMARY_SUIT_ABILITY, + primary_suit_ability, + 0, + ); + } + #[inline] + pub fn add_primary_description( + &mut self, + primary_description: flatbuffers::WIPOffset<&'b str>, + ) { + self.fbb_.push_slot_always::>( + EquipmentSuitTemplate::VT_PRIMARY_DESCRIPTION, + primary_description, + ); + } + #[inline] + pub fn add_secondary_condition(&mut self, secondary_condition: i32) { + self.fbb_.push_slot::( + EquipmentSuitTemplate::VT_SECONDARY_CONDITION, + secondary_condition, + 0, + ); + } + #[inline] + pub fn add_unk_7(&mut self, unk_7: i32) { + self.fbb_ + .push_slot::(EquipmentSuitTemplate::VT_UNK_7, unk_7, 0); + } + #[inline] + pub fn add_secondary_suit_ability(&mut self, secondary_suit_ability: i32) { + self.fbb_.push_slot::( + EquipmentSuitTemplate::VT_SECONDARY_SUIT_ABILITY, + secondary_suit_ability, + 0, + ); + } + #[inline] + pub fn add_secondary_description( + &mut self, + secondary_description: flatbuffers::WIPOffset<&'b str>, + ) { + self.fbb_.push_slot_always::>( + EquipmentSuitTemplate::VT_SECONDARY_DESCRIPTION, + secondary_description, + ); + } + #[inline] + pub fn add_suit_icon(&mut self, suit_icon: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + EquipmentSuitTemplate::VT_SUIT_ICON, + suit_icon, + ); + } + #[inline] + pub fn add_suit_story(&mut self, suit_story: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + EquipmentSuitTemplate::VT_SUIT_STORY, + suit_story, + ); + } + #[inline] + pub fn add_suit_filter_option(&mut self, suit_filter_option: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + EquipmentSuitTemplate::VT_SUIT_FILTER_OPTION, + suit_filter_option, + ); + } + #[inline] + pub fn add_suit_item_icon(&mut self, suit_item_icon: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + EquipmentSuitTemplate::VT_SUIT_ITEM_ICON, + suit_item_icon, + ); + } + #[inline] + pub fn add_unk_14(&mut self, unk_14: i32) { + self.fbb_ + .push_slot::(EquipmentSuitTemplate::VT_UNK_14, unk_14, 0); + } + #[inline] + pub fn add_order(&mut self, order: i32) { + self.fbb_ + .push_slot::(EquipmentSuitTemplate::VT_ORDER, order, 0); + } + #[inline] + pub fn add_unk_16(&mut self, unk_16: i32) { + self.fbb_ + .push_slot::(EquipmentSuitTemplate::VT_UNK_16, unk_16, 0); + } + #[inline] + pub fn add_unk_17(&mut self, unk_17: i32) { + self.fbb_ + .push_slot::(EquipmentSuitTemplate::VT_UNK_17, unk_17, 0); + } + #[inline] + pub fn add_unk_18(&mut self, unk_18: i32) { + self.fbb_ + .push_slot::(EquipmentSuitTemplate::VT_UNK_18, unk_18, 0); + } + #[inline] + pub fn add_unk_19(&mut self, unk_19: i32) { + self.fbb_ + .push_slot::(EquipmentSuitTemplate::VT_UNK_19, unk_19, 0); + } + #[inline] + pub fn add_unk_20(&mut self, unk_20: i32) { + self.fbb_ + .push_slot::(EquipmentSuitTemplate::VT_UNK_20, unk_20, 0); + } + #[inline] + pub fn add_unk_21(&mut self, unk_21: i32) { + self.fbb_ + .push_slot::(EquipmentSuitTemplate::VT_UNK_21, unk_21, 0); + } + #[inline] + pub fn add_primary_suit_propertys( + &mut self, + primary_suit_propertys: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + EquipmentSuitTemplate::VT_PRIMARY_SUIT_PROPERTYS, + primary_suit_propertys, + ); + } + #[inline] + pub fn add_unk_23(&mut self, unk_23: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( + EquipmentSuitTemplate::VT_UNK_23, + unk_23, + ); + } + #[inline] + pub fn add_unk_24(&mut self, unk_24: i32) { + self.fbb_ + .push_slot::(EquipmentSuitTemplate::VT_UNK_24, unk_24, 0); + } + #[inline] + pub fn add_unk_25(&mut self, unk_25: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( + EquipmentSuitTemplate::VT_UNK_25, + unk_25, + ); + } + #[inline] + pub fn add_unk_26(&mut self, unk_26: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( + EquipmentSuitTemplate::VT_UNK_26, + unk_26, + ); + } + #[inline] + pub fn add_unk_27(&mut self, unk_27: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( + EquipmentSuitTemplate::VT_UNK_27, + unk_27, + ); + } + #[inline] + pub fn add_tag(&mut self, tag: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(EquipmentSuitTemplate::VT_TAG, tag); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> EquipmentSuitTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + EquipmentSuitTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for EquipmentSuitTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("EquipmentSuitTemplate"); - ds.field("id", &self.id()); - ds.field("name", &self.name()); - ds.field("primary_condition", &self.primary_condition()); - ds.field("primary_suit_propertys", &self.primary_suit_propertys()); - ds.field("primary_suit_ability", &self.primary_suit_ability()); - ds.field("primary_description", &self.primary_description()); - ds.field("secondary_condition", &self.secondary_condition()); - ds.field("secondary_suit_propertys", &self.secondary_suit_propertys()); - ds.field("secondary_suit_ability", &self.secondary_suit_ability()); - ds.field("secondary_description", &self.secondary_description()); - ds.field("suit_item_icon", &self.suit_item_icon()); - ds.field("suit_story", &self.suit_story()); - ds.field("suit_filter_option", &self.suit_filter_option()); - ds.field("suit_icon", &self.suit_icon()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("EquipmentSuitTemplate"); + ds.field("id", &self.id()); + ds.field("name", &self.name()); + ds.field("primary_condition", &self.primary_condition()); + ds.field("unk_3", &self.unk_3()); + ds.field("primary_suit_ability", &self.primary_suit_ability()); + ds.field("primary_description", &self.primary_description()); + ds.field("secondary_condition", &self.secondary_condition()); + ds.field("unk_7", &self.unk_7()); + ds.field("secondary_suit_ability", &self.secondary_suit_ability()); + ds.field("secondary_description", &self.secondary_description()); + ds.field("suit_icon", &self.suit_icon()); + ds.field("suit_story", &self.suit_story()); + ds.field("suit_filter_option", &self.suit_filter_option()); + ds.field("suit_item_icon", &self.suit_item_icon()); + ds.field("unk_14", &self.unk_14()); + ds.field("order", &self.order()); + ds.field("unk_16", &self.unk_16()); + ds.field("unk_17", &self.unk_17()); + ds.field("unk_18", &self.unk_18()); + ds.field("unk_19", &self.unk_19()); + ds.field("unk_20", &self.unk_20()); + ds.field("unk_21", &self.unk_21()); + ds.field("primary_suit_propertys", &self.primary_suit_propertys()); + ds.field("unk_23", &self.unk_23()); + ds.field("unk_24", &self.unk_24()); + ds.field("unk_25", &self.unk_25()); + ds.field("unk_26", &self.unk_26()); + ds.field("unk_27", &self.unk_27()); + ds.field("tag", &self.tag()); + ds.finish() + } } pub enum HollowConfigTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct HollowConfigTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for HollowConfigTemplate<'a> { - type Inner = HollowConfigTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = HollowConfigTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> HollowConfigTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_HOLLOW_GROUP: flatbuffers::VOffsetT = 6; - pub const VT_NAME: flatbuffers::VOffsetT = 8; - pub const VT_UNLOCK_CONDITION: flatbuffers::VOffsetT = 10; - pub const VT_LOCK_HINT: flatbuffers::VOffsetT = 12; - pub const VT_PIC_RES: flatbuffers::VOffsetT = 14; - pub const VT_MODEL_RES: flatbuffers::VOffsetT = 16; - pub const VT_LOCKED_COLOR: flatbuffers::VOffsetT = 18; - pub const VT_UNLOCKED_COLOR: flatbuffers::VOffsetT = 20; - pub const VT_UNK_1: flatbuffers::VOffsetT = 22; - pub const VT_UNK_2: flatbuffers::VOffsetT = 24; - pub const VT_UNK_3: flatbuffers::VOffsetT = 26; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_HOLLOW_GROUP: flatbuffers::VOffsetT = 6; + pub const VT_NAME: flatbuffers::VOffsetT = 8; + pub const VT_UNLOCK_CONDITION: flatbuffers::VOffsetT = 10; + pub const VT_LOCK_HINT: flatbuffers::VOffsetT = 12; + pub const VT_PIC_RES: flatbuffers::VOffsetT = 14; + pub const VT_MODEL_RES: flatbuffers::VOffsetT = 16; + pub const VT_LOCKED_COLOR: flatbuffers::VOffsetT = 18; + pub const VT_UNLOCKED_COLOR: flatbuffers::VOffsetT = 20; + pub const VT_UNK_1: flatbuffers::VOffsetT = 22; + pub const VT_UNK_2: flatbuffers::VOffsetT = 24; + pub const VT_UNK_3: flatbuffers::VOffsetT = 26; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - HollowConfigTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args HollowConfigTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = HollowConfigTemplateBuilder::new(_fbb); - if let Some(x) = args.unk_3 { builder.add_unk_3(x); } - if let Some(x) = args.unk_2 { builder.add_unk_2(x); } - if let Some(x) = args.unlocked_color { builder.add_unlocked_color(x); } - if let Some(x) = args.locked_color { builder.add_locked_color(x); } - if let Some(x) = args.model_res { builder.add_model_res(x); } - if let Some(x) = args.pic_res { builder.add_pic_res(x); } - if let Some(x) = args.lock_hint { builder.add_lock_hint(x); } - if let Some(x) = args.unlock_condition { builder.add_unlock_condition(x); } - if let Some(x) = args.name { builder.add_name(x); } - builder.add_hollow_group(args.hollow_group); - builder.add_id(args.id); - builder.add_unk_1(args.unk_1); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + HollowConfigTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args HollowConfigTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = HollowConfigTemplateBuilder::new(_fbb); + if let Some(x) = args.unk_3 { + builder.add_unk_3(x); + } + if let Some(x) = args.unk_2 { + builder.add_unk_2(x); + } + if let Some(x) = args.unlocked_color { + builder.add_unlocked_color(x); + } + if let Some(x) = args.locked_color { + builder.add_locked_color(x); + } + if let Some(x) = args.model_res { + builder.add_model_res(x); + } + if let Some(x) = args.pic_res { + builder.add_pic_res(x); + } + if let Some(x) = args.lock_hint { + builder.add_lock_hint(x); + } + if let Some(x) = args.unlock_condition { + builder.add_unlock_condition(x); + } + if let Some(x) = args.name { + builder.add_name(x); + } + builder.add_hollow_group(args.hollow_group); + builder.add_id(args.id); + builder.add_unk_1(args.unk_1); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowConfigTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn hollow_group(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowConfigTemplate::VT_HOLLOW_GROUP, Some(0)).unwrap()} - } - #[inline] - pub fn name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowConfigTemplate::VT_NAME, None)} - } - #[inline] - pub fn unlock_condition(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowConfigTemplate::VT_UNLOCK_CONDITION, None)} - } - #[inline] - pub fn lock_hint(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowConfigTemplate::VT_LOCK_HINT, None)} - } - #[inline] - pub fn pic_res(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowConfigTemplate::VT_PIC_RES, None)} - } - #[inline] - pub fn model_res(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowConfigTemplate::VT_MODEL_RES, None)} - } - #[inline] - pub fn locked_color(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowConfigTemplate::VT_LOCKED_COLOR, None)} - } - #[inline] - pub fn unlocked_color(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowConfigTemplate::VT_UNLOCKED_COLOR, None)} - } - #[inline] - pub fn unk_1(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowConfigTemplate::VT_UNK_1, Some(false)).unwrap()} - } - #[inline] - pub fn unk_2(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowConfigTemplate::VT_UNK_2, None)} - } - #[inline] - pub fn unk_3(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowConfigTemplate::VT_UNK_3, None)} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowConfigTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn hollow_group(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowConfigTemplate::VT_HOLLOW_GROUP, Some(0)) + .unwrap() + } + } + #[inline] + pub fn name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowConfigTemplate::VT_NAME, None) + } + } + #[inline] + pub fn unlock_condition(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + HollowConfigTemplate::VT_UNLOCK_CONDITION, + None, + ) + } + } + #[inline] + pub fn lock_hint(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowConfigTemplate::VT_LOCK_HINT, None) + } + } + #[inline] + pub fn pic_res(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowConfigTemplate::VT_PIC_RES, None) + } + } + #[inline] + pub fn model_res(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowConfigTemplate::VT_MODEL_RES, None) + } + } + #[inline] + pub fn locked_color(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + HollowConfigTemplate::VT_LOCKED_COLOR, + None, + ) + } + } + #[inline] + pub fn unlocked_color(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + HollowConfigTemplate::VT_UNLOCKED_COLOR, + None, + ) + } + } + #[inline] + pub fn unk_1(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowConfigTemplate::VT_UNK_1, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_2(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowConfigTemplate::VT_UNK_2, None) + } + } + #[inline] + pub fn unk_3(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowConfigTemplate::VT_UNK_3, None) + } + } } impl flatbuffers::Verifiable for HollowConfigTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::("hollow_group", Self::VT_HOLLOW_GROUP, false)? - .visit_field::>("name", Self::VT_NAME, false)? - .visit_field::>("unlock_condition", Self::VT_UNLOCK_CONDITION, false)? - .visit_field::>("lock_hint", Self::VT_LOCK_HINT, false)? - .visit_field::>("pic_res", Self::VT_PIC_RES, false)? - .visit_field::>("model_res", Self::VT_MODEL_RES, false)? - .visit_field::>("locked_color", Self::VT_LOCKED_COLOR, false)? - .visit_field::>("unlocked_color", Self::VT_UNLOCKED_COLOR, false)? - .visit_field::("unk_1", Self::VT_UNK_1, false)? - .visit_field::>("unk_2", Self::VT_UNK_2, false)? - .visit_field::>("unk_3", Self::VT_UNK_3, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::("hollow_group", Self::VT_HOLLOW_GROUP, false)? + .visit_field::>("name", Self::VT_NAME, false)? + .visit_field::>( + "unlock_condition", + Self::VT_UNLOCK_CONDITION, + false, + )? + .visit_field::>( + "lock_hint", + Self::VT_LOCK_HINT, + false, + )? + .visit_field::>("pic_res", Self::VT_PIC_RES, false)? + .visit_field::>( + "model_res", + Self::VT_MODEL_RES, + false, + )? + .visit_field::>( + "locked_color", + Self::VT_LOCKED_COLOR, + false, + )? + .visit_field::>( + "unlocked_color", + Self::VT_UNLOCKED_COLOR, + false, + )? + .visit_field::("unk_1", Self::VT_UNK_1, false)? + .visit_field::>("unk_2", Self::VT_UNK_2, false)? + .visit_field::>("unk_3", Self::VT_UNK_3, false)? + .finish(); + Ok(()) + } } pub struct HollowConfigTemplateArgs<'a> { pub id: i32, @@ -4532,854 +6648,1283 @@ pub struct HollowConfigTemplateArgs<'a> { pub unk_3: Option>, } impl<'a> Default for HollowConfigTemplateArgs<'a> { - #[inline] - fn default() -> Self { - HollowConfigTemplateArgs { - id: 0, - hollow_group: 0, - name: None, - unlock_condition: None, - lock_hint: None, - pic_res: None, - model_res: None, - locked_color: None, - unlocked_color: None, - unk_1: false, - unk_2: None, - unk_3: None, + #[inline] + fn default() -> Self { + HollowConfigTemplateArgs { + id: 0, + hollow_group: 0, + name: None, + unlock_condition: None, + lock_hint: None, + pic_res: None, + model_res: None, + locked_color: None, + unlocked_color: None, + unk_1: false, + unk_2: None, + unk_3: None, + } } - } } pub struct HollowConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> HollowConfigTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(HollowConfigTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_hollow_group(&mut self, hollow_group: i32) { - self.fbb_.push_slot::(HollowConfigTemplate::VT_HOLLOW_GROUP, hollow_group, 0); - } - #[inline] - pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowConfigTemplate::VT_NAME, name); - } - #[inline] - pub fn add_unlock_condition(&mut self, unlock_condition: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowConfigTemplate::VT_UNLOCK_CONDITION, unlock_condition); - } - #[inline] - pub fn add_lock_hint(&mut self, lock_hint: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowConfigTemplate::VT_LOCK_HINT, lock_hint); - } - #[inline] - pub fn add_pic_res(&mut self, pic_res: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowConfigTemplate::VT_PIC_RES, pic_res); - } - #[inline] - pub fn add_model_res(&mut self, model_res: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowConfigTemplate::VT_MODEL_RES, model_res); - } - #[inline] - pub fn add_locked_color(&mut self, locked_color: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowConfigTemplate::VT_LOCKED_COLOR, locked_color); - } - #[inline] - pub fn add_unlocked_color(&mut self, unlocked_color: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowConfigTemplate::VT_UNLOCKED_COLOR, unlocked_color); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: bool) { - self.fbb_.push_slot::(HollowConfigTemplate::VT_UNK_1, unk_1, false); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowConfigTemplate::VT_UNK_2, unk_2); - } - #[inline] - pub fn add_unk_3(&mut self, unk_3: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowConfigTemplate::VT_UNK_3, unk_3); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> HollowConfigTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - HollowConfigTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_ + .push_slot::(HollowConfigTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_hollow_group(&mut self, hollow_group: i32) { + self.fbb_ + .push_slot::(HollowConfigTemplate::VT_HOLLOW_GROUP, hollow_group, 0); + } + #[inline] + pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(HollowConfigTemplate::VT_NAME, name); + } + #[inline] + pub fn add_unlock_condition(&mut self, unlock_condition: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowConfigTemplate::VT_UNLOCK_CONDITION, + unlock_condition, + ); + } + #[inline] + pub fn add_lock_hint(&mut self, lock_hint: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowConfigTemplate::VT_LOCK_HINT, + lock_hint, + ); + } + #[inline] + pub fn add_pic_res(&mut self, pic_res: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowConfigTemplate::VT_PIC_RES, + pic_res, + ); + } + #[inline] + pub fn add_model_res(&mut self, model_res: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowConfigTemplate::VT_MODEL_RES, + model_res, + ); + } + #[inline] + pub fn add_locked_color(&mut self, locked_color: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowConfigTemplate::VT_LOCKED_COLOR, + locked_color, + ); + } + #[inline] + pub fn add_unlocked_color(&mut self, unlocked_color: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowConfigTemplate::VT_UNLOCKED_COLOR, + unlocked_color, + ); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: bool) { + self.fbb_ + .push_slot::(HollowConfigTemplate::VT_UNK_1, unk_1, false); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(HollowConfigTemplate::VT_UNK_2, unk_2); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(HollowConfigTemplate::VT_UNK_3, unk_3); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> HollowConfigTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + HollowConfigTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for HollowConfigTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("HollowConfigTemplate"); - ds.field("id", &self.id()); - ds.field("hollow_group", &self.hollow_group()); - ds.field("name", &self.name()); - ds.field("unlock_condition", &self.unlock_condition()); - ds.field("lock_hint", &self.lock_hint()); - ds.field("pic_res", &self.pic_res()); - ds.field("model_res", &self.model_res()); - ds.field("locked_color", &self.locked_color()); - ds.field("unlocked_color", &self.unlocked_color()); - ds.field("unk_1", &self.unk_1()); - ds.field("unk_2", &self.unk_2()); - ds.field("unk_3", &self.unk_3()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("HollowConfigTemplate"); + ds.field("id", &self.id()); + ds.field("hollow_group", &self.hollow_group()); + ds.field("name", &self.name()); + ds.field("unlock_condition", &self.unlock_condition()); + ds.field("lock_hint", &self.lock_hint()); + ds.field("pic_res", &self.pic_res()); + ds.field("model_res", &self.model_res()); + ds.field("locked_color", &self.locked_color()); + ds.field("unlocked_color", &self.unlocked_color()); + ds.field("unk_1", &self.unk_1()); + ds.field("unk_2", &self.unk_2()); + ds.field("unk_3", &self.unk_3()); + ds.finish() + } } pub enum HollowQuestTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct HollowQuestTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for HollowQuestTemplate<'a> { - type Inner = HollowQuestTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = HollowQuestTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> HollowQuestTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_UNK_1: flatbuffers::VOffsetT = 6; - pub const VT_CHESSBOARD_ID: flatbuffers::VOffsetT = 8; - pub const VT_UNK_2: flatbuffers::VOffsetT = 10; - pub const VT_GROUP_ID: flatbuffers::VOffsetT = 12; - pub const VT_HOLLOW_QUEST_TYPE: flatbuffers::VOffsetT = 14; - pub const VT_UNK_3: flatbuffers::VOffsetT = 16; - pub const VT_DURATION: flatbuffers::VOffsetT = 18; - pub const VT_HAS_STAMINA: flatbuffers::VOffsetT = 20; - pub const VT_ENVIRONMENTS: flatbuffers::VOffsetT = 22; - pub const VT_MAIN_DIFFICULTY: flatbuffers::VOffsetT = 24; - pub const VT_DIFFICULTIES: flatbuffers::VOffsetT = 26; - pub const VT_RECOMMENDED_ELEMENTS: flatbuffers::VOffsetT = 28; - pub const VT_CLIENT: flatbuffers::VOffsetT = 30; - pub const VT_UNK_4: flatbuffers::VOffsetT = 32; - pub const VT_UNK_5: flatbuffers::VOffsetT = 34; - pub const VT_UNK_6: flatbuffers::VOffsetT = 36; - pub const VT_SCALE: flatbuffers::VOffsetT = 38; - pub const VT_SHOW_TIP: flatbuffers::VOffsetT = 40; - pub const VT_MONSTER_LEVEL: flatbuffers::VOffsetT = 42; - pub const VT_RECOMMENDED_LEVEL: flatbuffers::VOffsetT = 44; - pub const VT_AVERAGE_LEVEL_TIPS: flatbuffers::VOffsetT = 46; - pub const VT_RECOMMENDED_HIT_TYPES: flatbuffers::VOffsetT = 48; - pub const VT_UNK_7: flatbuffers::VOffsetT = 50; - pub const VT_UNK_8: flatbuffers::VOffsetT = 52; - pub const VT_UNK_9: flatbuffers::VOffsetT = 54; - pub const VT_UNK_10: flatbuffers::VOffsetT = 56; - pub const VT_UNK_11: flatbuffers::VOffsetT = 58; - pub const VT_UNK_12: flatbuffers::VOffsetT = 60; - pub const VT_UNK_13: flatbuffers::VOffsetT = 62; - pub const VT_SLOT_1_AVATAR: flatbuffers::VOffsetT = 64; - pub const VT_SLOT_2_AVATAR: flatbuffers::VOffsetT = 66; - pub const VT_SLOT_3_AVATAR: flatbuffers::VOffsetT = 68; - pub const VT_UNK_14: flatbuffers::VOffsetT = 70; - pub const VT_UNK_15: flatbuffers::VOffsetT = 72; - pub const VT_UNK_16: flatbuffers::VOffsetT = 74; - pub const VT_UNK_17: flatbuffers::VOffsetT = 76; - pub const VT_PREVIEW_RES_GROUP_ID: flatbuffers::VOffsetT = 78; - pub const VT_CHESSBOARD_RES_GROUP_ID: flatbuffers::VOffsetT = 80; - pub const VT_BGM_CHAPTER_STATE: flatbuffers::VOffsetT = 82; - pub const VT_UNK_18: flatbuffers::VOffsetT = 84; - pub const VT_UNK_19: flatbuffers::VOffsetT = 86; - pub const VT_UNK_20: flatbuffers::VOffsetT = 88; - pub const VT_UNK_21: flatbuffers::VOffsetT = 90; - pub const VT_UNK_22: flatbuffers::VOffsetT = 92; - pub const VT_UNK_23: flatbuffers::VOffsetT = 94; - pub const VT_UNK_24: flatbuffers::VOffsetT = 96; - pub const VT_UNK_25: flatbuffers::VOffsetT = 98; - pub const VT_UNK_26: flatbuffers::VOffsetT = 100; - pub const VT_TITLE: flatbuffers::VOffsetT = 102; - pub const VT_DIFFICULTY: flatbuffers::VOffsetT = 104; - pub const VT_TARGET: flatbuffers::VOffsetT = 106; - pub const VT_UNK_27: flatbuffers::VOffsetT = 108; - pub const VT_UNK_28: flatbuffers::VOffsetT = 110; - pub const VT_UNK_29: flatbuffers::VOffsetT = 112; - pub const VT_UNK_30: flatbuffers::VOffsetT = 114; - pub const VT_UNK_31: flatbuffers::VOffsetT = 116; - pub const VT_UNK_32: flatbuffers::VOffsetT = 118; - pub const VT_UNK_33: flatbuffers::VOffsetT = 120; - pub const VT_HOLLOW_ITEM_BAN_LISTS: flatbuffers::VOffsetT = 122; - pub const VT_UNK_34: flatbuffers::VOffsetT = 124; - pub const VT_ENEMY_TYPES: flatbuffers::VOffsetT = 126; - pub const VT_BACKGROUND: flatbuffers::VOffsetT = 128; - pub const VT_UNK_35: flatbuffers::VOffsetT = 130; - pub const VT_UNK_36: flatbuffers::VOffsetT = 132; - pub const VT_UNK_37: flatbuffers::VOffsetT = 134; - pub const VT_UNK_38: flatbuffers::VOffsetT = 136; - pub const VT_UNK_39: flatbuffers::VOffsetT = 138; - pub const VT_UNK_40: flatbuffers::VOffsetT = 140; - pub const VT_UNK_41: flatbuffers::VOffsetT = 142; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_UNK_1: flatbuffers::VOffsetT = 6; + pub const VT_CHESSBOARD_ID: flatbuffers::VOffsetT = 8; + pub const VT_UNK_2: flatbuffers::VOffsetT = 10; + pub const VT_GROUP_ID: flatbuffers::VOffsetT = 12; + pub const VT_HOLLOW_QUEST_TYPE: flatbuffers::VOffsetT = 14; + pub const VT_UNK_3: flatbuffers::VOffsetT = 16; + pub const VT_DURATION: flatbuffers::VOffsetT = 18; + pub const VT_HAS_STAMINA: flatbuffers::VOffsetT = 20; + pub const VT_ENVIRONMENTS: flatbuffers::VOffsetT = 22; + pub const VT_MAIN_DIFFICULTY: flatbuffers::VOffsetT = 24; + pub const VT_DIFFICULTIES: flatbuffers::VOffsetT = 26; + pub const VT_RECOMMENDED_ELEMENTS: flatbuffers::VOffsetT = 28; + pub const VT_CLIENT: flatbuffers::VOffsetT = 30; + pub const VT_UNK_4: flatbuffers::VOffsetT = 32; + pub const VT_UNK_5: flatbuffers::VOffsetT = 34; + pub const VT_UNK_6: flatbuffers::VOffsetT = 36; + pub const VT_SCALE: flatbuffers::VOffsetT = 38; + pub const VT_SHOW_TIP: flatbuffers::VOffsetT = 40; + pub const VT_MONSTER_LEVEL: flatbuffers::VOffsetT = 42; + pub const VT_RECOMMENDED_LEVEL: flatbuffers::VOffsetT = 44; + pub const VT_AVERAGE_LEVEL_TIPS: flatbuffers::VOffsetT = 46; + pub const VT_RECOMMENDED_HIT_TYPES: flatbuffers::VOffsetT = 48; + pub const VT_UNK_7: flatbuffers::VOffsetT = 50; + pub const VT_UNK_8: flatbuffers::VOffsetT = 52; + pub const VT_UNK_9: flatbuffers::VOffsetT = 54; + pub const VT_UNK_10: flatbuffers::VOffsetT = 56; + pub const VT_UNK_11: flatbuffers::VOffsetT = 58; + pub const VT_UNK_12: flatbuffers::VOffsetT = 60; + pub const VT_UNK_13: flatbuffers::VOffsetT = 62; + pub const VT_SLOT_1_AVATAR: flatbuffers::VOffsetT = 64; + pub const VT_SLOT_2_AVATAR: flatbuffers::VOffsetT = 66; + pub const VT_SLOT_3_AVATAR: flatbuffers::VOffsetT = 68; + pub const VT_UNK_14: flatbuffers::VOffsetT = 70; + pub const VT_UNK_15: flatbuffers::VOffsetT = 72; + pub const VT_UNK_16: flatbuffers::VOffsetT = 74; + pub const VT_UNK_17: flatbuffers::VOffsetT = 76; + pub const VT_PREVIEW_RES_GROUP_ID: flatbuffers::VOffsetT = 78; + pub const VT_CHESSBOARD_RES_GROUP_ID: flatbuffers::VOffsetT = 80; + pub const VT_BGM_CHAPTER_STATE: flatbuffers::VOffsetT = 82; + pub const VT_UNK_18: flatbuffers::VOffsetT = 84; + pub const VT_UNK_19: flatbuffers::VOffsetT = 86; + pub const VT_UNK_20: flatbuffers::VOffsetT = 88; + pub const VT_UNK_21: flatbuffers::VOffsetT = 90; + pub const VT_UNK_22: flatbuffers::VOffsetT = 92; + pub const VT_UNK_23: flatbuffers::VOffsetT = 94; + pub const VT_UNK_24: flatbuffers::VOffsetT = 96; + pub const VT_UNK_25: flatbuffers::VOffsetT = 98; + pub const VT_UNK_26: flatbuffers::VOffsetT = 100; + pub const VT_TITLE: flatbuffers::VOffsetT = 102; + pub const VT_DIFFICULTY: flatbuffers::VOffsetT = 104; + pub const VT_TARGET: flatbuffers::VOffsetT = 106; + pub const VT_UNK_27: flatbuffers::VOffsetT = 108; + pub const VT_UNK_28: flatbuffers::VOffsetT = 110; + pub const VT_UNK_29: flatbuffers::VOffsetT = 112; + pub const VT_UNK_30: flatbuffers::VOffsetT = 114; + pub const VT_UNK_31: flatbuffers::VOffsetT = 116; + pub const VT_UNK_32: flatbuffers::VOffsetT = 118; + pub const VT_UNK_33: flatbuffers::VOffsetT = 120; + pub const VT_HOLLOW_ITEM_BAN_LISTS: flatbuffers::VOffsetT = 122; + pub const VT_UNK_34: flatbuffers::VOffsetT = 124; + pub const VT_ENEMY_TYPES: flatbuffers::VOffsetT = 126; + pub const VT_BACKGROUND: flatbuffers::VOffsetT = 128; + pub const VT_UNK_35: flatbuffers::VOffsetT = 130; + pub const VT_UNK_36: flatbuffers::VOffsetT = 132; + pub const VT_UNK_37: flatbuffers::VOffsetT = 134; + pub const VT_UNK_38: flatbuffers::VOffsetT = 136; + pub const VT_UNK_39: flatbuffers::VOffsetT = 138; + pub const VT_UNK_40: flatbuffers::VOffsetT = 140; + pub const VT_UNK_41: flatbuffers::VOffsetT = 142; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - HollowQuestTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args HollowQuestTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = HollowQuestTemplateBuilder::new(_fbb); - builder.add_unk_41(args.unk_41); - builder.add_unk_40(args.unk_40); - builder.add_unk_39(args.unk_39); - builder.add_unk_38(args.unk_38); - if let Some(x) = args.unk_37 { builder.add_unk_37(x); } - if let Some(x) = args.unk_36 { builder.add_unk_36(x); } - builder.add_unk_35(args.unk_35); - if let Some(x) = args.background { builder.add_background(x); } - if let Some(x) = args.enemy_types { builder.add_enemy_types(x); } - if let Some(x) = args.hollow_item_ban_lists { builder.add_hollow_item_ban_lists(x); } - builder.add_unk_33(args.unk_33); - builder.add_unk_31(args.unk_31); - builder.add_unk_29(args.unk_29); - builder.add_unk_28(args.unk_28); - if let Some(x) = args.unk_27 { builder.add_unk_27(x); } - if let Some(x) = args.target { builder.add_target(x); } - if let Some(x) = args.difficulty { builder.add_difficulty(x); } - if let Some(x) = args.title { builder.add_title(x); } - builder.add_unk_26(args.unk_26); - builder.add_unk_24(args.unk_24); - builder.add_unk_23(args.unk_23); - builder.add_unk_22(args.unk_22); - if let Some(x) = args.unk_21 { builder.add_unk_21(x); } - builder.add_unk_20(args.unk_20); - if let Some(x) = args.unk_19 { builder.add_unk_19(x); } - builder.add_unk_18(args.unk_18); - if let Some(x) = args.bgm_chapter_state { builder.add_bgm_chapter_state(x); } - builder.add_chessboard_res_group_id(args.chessboard_res_group_id); - builder.add_preview_res_group_id(args.preview_res_group_id); - builder.add_unk_17(args.unk_17); - builder.add_unk_14(args.unk_14); - builder.add_slot_3_avatar(args.slot_3_avatar); - builder.add_slot_2_avatar(args.slot_2_avatar); - builder.add_slot_1_avatar(args.slot_1_avatar); - builder.add_unk_13(args.unk_13); - builder.add_unk_11(args.unk_11); - if let Some(x) = args.unk_10 { builder.add_unk_10(x); } - if let Some(x) = args.unk_7 { builder.add_unk_7(x); } - if let Some(x) = args.recommended_hit_types { builder.add_recommended_hit_types(x); } - builder.add_average_level_tips(args.average_level_tips); - builder.add_recommended_level(args.recommended_level); - builder.add_monster_level(args.monster_level); - builder.add_show_tip(args.show_tip); - builder.add_scale(args.scale); - builder.add_unk_6(args.unk_6); - builder.add_unk_4(args.unk_4); - if let Some(x) = args.client { builder.add_client(x); } - if let Some(x) = args.recommended_elements { builder.add_recommended_elements(x); } - if let Some(x) = args.difficulties { builder.add_difficulties(x); } - if let Some(x) = args.main_difficulty { builder.add_main_difficulty(x); } - if let Some(x) = args.environments { builder.add_environments(x); } - if let Some(x) = args.has_stamina { builder.add_has_stamina(x); } - if let Some(x) = args.duration { builder.add_duration(x); } - builder.add_unk_3(args.unk_3); - builder.add_hollow_quest_type(args.hollow_quest_type); - builder.add_group_id(args.group_id); - builder.add_unk_2(args.unk_2); - builder.add_chessboard_id(args.chessboard_id); - builder.add_unk_1(args.unk_1); - builder.add_id(args.id); - builder.add_unk_34(args.unk_34); - builder.add_unk_32(args.unk_32); - builder.add_unk_30(args.unk_30); - builder.add_unk_25(args.unk_25); - builder.add_unk_16(args.unk_16); - builder.add_unk_15(args.unk_15); - builder.add_unk_12(args.unk_12); - builder.add_unk_9(args.unk_9); - builder.add_unk_8(args.unk_8); - builder.add_unk_5(args.unk_5); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + HollowQuestTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args HollowQuestTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = HollowQuestTemplateBuilder::new(_fbb); + builder.add_unk_41(args.unk_41); + builder.add_unk_40(args.unk_40); + builder.add_unk_39(args.unk_39); + builder.add_unk_38(args.unk_38); + if let Some(x) = args.unk_37 { + builder.add_unk_37(x); + } + if let Some(x) = args.unk_36 { + builder.add_unk_36(x); + } + builder.add_unk_35(args.unk_35); + if let Some(x) = args.background { + builder.add_background(x); + } + if let Some(x) = args.enemy_types { + builder.add_enemy_types(x); + } + if let Some(x) = args.hollow_item_ban_lists { + builder.add_hollow_item_ban_lists(x); + } + builder.add_unk_33(args.unk_33); + builder.add_unk_31(args.unk_31); + builder.add_unk_29(args.unk_29); + builder.add_unk_28(args.unk_28); + if let Some(x) = args.unk_27 { + builder.add_unk_27(x); + } + if let Some(x) = args.target { + builder.add_target(x); + } + if let Some(x) = args.difficulty { + builder.add_difficulty(x); + } + if let Some(x) = args.title { + builder.add_title(x); + } + builder.add_unk_26(args.unk_26); + builder.add_unk_24(args.unk_24); + builder.add_unk_23(args.unk_23); + builder.add_unk_22(args.unk_22); + if let Some(x) = args.unk_21 { + builder.add_unk_21(x); + } + builder.add_unk_20(args.unk_20); + if let Some(x) = args.unk_19 { + builder.add_unk_19(x); + } + builder.add_unk_18(args.unk_18); + if let Some(x) = args.bgm_chapter_state { + builder.add_bgm_chapter_state(x); + } + builder.add_chessboard_res_group_id(args.chessboard_res_group_id); + builder.add_preview_res_group_id(args.preview_res_group_id); + builder.add_unk_17(args.unk_17); + builder.add_unk_14(args.unk_14); + builder.add_slot_3_avatar(args.slot_3_avatar); + builder.add_slot_2_avatar(args.slot_2_avatar); + builder.add_slot_1_avatar(args.slot_1_avatar); + builder.add_unk_13(args.unk_13); + builder.add_unk_11(args.unk_11); + if let Some(x) = args.unk_10 { + builder.add_unk_10(x); + } + if let Some(x) = args.unk_7 { + builder.add_unk_7(x); + } + if let Some(x) = args.recommended_hit_types { + builder.add_recommended_hit_types(x); + } + builder.add_average_level_tips(args.average_level_tips); + builder.add_recommended_level(args.recommended_level); + builder.add_monster_level(args.monster_level); + builder.add_show_tip(args.show_tip); + builder.add_scale(args.scale); + builder.add_unk_6(args.unk_6); + builder.add_unk_4(args.unk_4); + if let Some(x) = args.client { + builder.add_client(x); + } + if let Some(x) = args.recommended_elements { + builder.add_recommended_elements(x); + } + if let Some(x) = args.difficulties { + builder.add_difficulties(x); + } + if let Some(x) = args.main_difficulty { + builder.add_main_difficulty(x); + } + if let Some(x) = args.environments { + builder.add_environments(x); + } + if let Some(x) = args.has_stamina { + builder.add_has_stamina(x); + } + if let Some(x) = args.duration { + builder.add_duration(x); + } + builder.add_unk_3(args.unk_3); + builder.add_hollow_quest_type(args.hollow_quest_type); + builder.add_group_id(args.group_id); + builder.add_unk_2(args.unk_2); + builder.add_chessboard_id(args.chessboard_id); + builder.add_unk_1(args.unk_1); + builder.add_id(args.id); + builder.add_unk_34(args.unk_34); + builder.add_unk_32(args.unk_32); + builder.add_unk_30(args.unk_30); + builder.add_unk_25(args.unk_25); + builder.add_unk_16(args.unk_16); + builder.add_unk_15(args.unk_15); + builder.add_unk_12(args.unk_12); + builder.add_unk_9(args.unk_9); + builder.add_unk_8(args.unk_8); + builder.add_unk_5(args.unk_5); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn unk_1(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_1, Some(0)).unwrap()} - } - #[inline] - pub fn chessboard_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_CHESSBOARD_ID, Some(0)).unwrap()} - } - #[inline] - pub fn unk_2(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_2, Some(0)).unwrap()} - } - #[inline] - pub fn group_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_GROUP_ID, Some(0)).unwrap()} - } - #[inline] - pub fn hollow_quest_type(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_HOLLOW_QUEST_TYPE, Some(0)).unwrap()} - } - #[inline] - pub fn unk_3(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_3, Some(0)).unwrap()} - } - #[inline] - pub fn duration(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowQuestTemplate::VT_DURATION, None)} - } - #[inline] - pub fn has_stamina(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowQuestTemplate::VT_HAS_STAMINA, None)} - } - #[inline] - pub fn environments(&self) -> Option>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(HollowQuestTemplate::VT_ENVIRONMENTS, None)} - } - #[inline] - pub fn main_difficulty(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowQuestTemplate::VT_MAIN_DIFFICULTY, None)} - } - #[inline] - pub fn difficulties(&self) -> Option>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(HollowQuestTemplate::VT_DIFFICULTIES, None)} - } - #[inline] - pub fn recommended_elements(&self) -> Option>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(HollowQuestTemplate::VT_RECOMMENDED_ELEMENTS, None)} - } - #[inline] - pub fn client(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowQuestTemplate::VT_CLIENT, None)} - } - #[inline] - pub fn unk_4(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_4, Some(0)).unwrap()} - } - #[inline] - pub fn unk_5(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_5, Some(false)).unwrap()} - } - #[inline] - pub fn unk_6(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_6, Some(0)).unwrap()} - } - #[inline] - pub fn scale(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_SCALE, Some(0)).unwrap()} - } - #[inline] - pub fn show_tip(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_SHOW_TIP, Some(0)).unwrap()} - } - #[inline] - pub fn monster_level(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_MONSTER_LEVEL, Some(0)).unwrap()} - } - #[inline] - pub fn recommended_level(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_RECOMMENDED_LEVEL, Some(0)).unwrap()} - } - #[inline] - pub fn average_level_tips(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_AVERAGE_LEVEL_TIPS, Some(0)).unwrap()} - } - #[inline] - pub fn recommended_hit_types(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(HollowQuestTemplate::VT_RECOMMENDED_HIT_TYPES, None)} - } - #[inline] - pub fn unk_7(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(HollowQuestTemplate::VT_UNK_7, None)} - } - #[inline] - pub fn unk_8(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_8, Some(false)).unwrap()} - } - #[inline] - pub fn unk_9(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_9, Some(false)).unwrap()} - } - #[inline] - pub fn unk_10(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowQuestTemplate::VT_UNK_10, None)} - } - #[inline] - pub fn unk_11(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_11, Some(0)).unwrap()} - } - #[inline] - pub fn unk_12(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_12, Some(false)).unwrap()} - } - #[inline] - pub fn unk_13(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_13, Some(0)).unwrap()} - } - #[inline] - pub fn slot_1_avatar(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_SLOT_1_AVATAR, Some(0)).unwrap()} - } - #[inline] - pub fn slot_2_avatar(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_SLOT_2_AVATAR, Some(0)).unwrap()} - } - #[inline] - pub fn slot_3_avatar(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_SLOT_3_AVATAR, Some(0)).unwrap()} - } - #[inline] - pub fn unk_14(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_14, Some(0)).unwrap()} - } - #[inline] - pub fn unk_15(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_15, Some(false)).unwrap()} - } - #[inline] - pub fn unk_16(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_16, Some(false)).unwrap()} - } - #[inline] - pub fn unk_17(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_17, Some(0)).unwrap()} - } - #[inline] - pub fn preview_res_group_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_PREVIEW_RES_GROUP_ID, Some(0)).unwrap()} - } - #[inline] - pub fn chessboard_res_group_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_CHESSBOARD_RES_GROUP_ID, Some(0)).unwrap()} - } - #[inline] - pub fn bgm_chapter_state(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowQuestTemplate::VT_BGM_CHAPTER_STATE, None)} - } - #[inline] - pub fn unk_18(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_18, Some(0)).unwrap()} - } - #[inline] - pub fn unk_19(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowQuestTemplate::VT_UNK_19, None)} - } - #[inline] - pub fn unk_20(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_20, Some(0)).unwrap()} - } - #[inline] - pub fn unk_21(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(HollowQuestTemplate::VT_UNK_21, None)} - } - #[inline] - pub fn unk_22(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_22, Some(0)).unwrap()} - } - #[inline] - pub fn unk_23(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_23, Some(0)).unwrap()} - } - #[inline] - pub fn unk_24(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_24, Some(0)).unwrap()} - } - #[inline] - pub fn unk_25(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_25, Some(false)).unwrap()} - } - #[inline] - pub fn unk_26(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_26, Some(0)).unwrap()} - } - #[inline] - pub fn title(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowQuestTemplate::VT_TITLE, None)} - } - #[inline] - pub fn difficulty(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowQuestTemplate::VT_DIFFICULTY, None)} - } - #[inline] - pub fn target(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowQuestTemplate::VT_TARGET, None)} - } - #[inline] - pub fn unk_27(&self) -> Option>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(HollowQuestTemplate::VT_UNK_27, None)} - } - #[inline] - pub fn unk_28(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_28, Some(0)).unwrap()} - } - #[inline] - pub fn unk_29(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_29, Some(0)).unwrap()} - } - #[inline] - pub fn unk_30(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_30, Some(false)).unwrap()} - } - #[inline] - pub fn unk_31(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_31, Some(0)).unwrap()} - } - #[inline] - pub fn unk_32(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_32, Some(false)).unwrap()} - } - #[inline] - pub fn unk_33(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_33, Some(0)).unwrap()} - } - #[inline] - pub fn hollow_item_ban_lists(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(HollowQuestTemplate::VT_HOLLOW_ITEM_BAN_LISTS, None)} - } - #[inline] - pub fn unk_34(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_34, Some(false)).unwrap()} - } - #[inline] - pub fn enemy_types(&self) -> Option>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(HollowQuestTemplate::VT_ENEMY_TYPES, None)} - } - #[inline] - pub fn background(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(HollowQuestTemplate::VT_BACKGROUND, None)} - } - #[inline] - pub fn unk_35(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_35, Some(0)).unwrap()} - } - #[inline] - pub fn unk_36(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(HollowQuestTemplate::VT_UNK_36, None)} - } - #[inline] - pub fn unk_37(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(HollowQuestTemplate::VT_UNK_37, None)} - } - #[inline] - pub fn unk_38(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_38, Some(0)).unwrap()} - } - #[inline] - pub fn unk_39(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_39, Some(0)).unwrap()} - } - #[inline] - pub fn unk_40(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_40, Some(0)).unwrap()} - } - #[inline] - pub fn unk_41(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(HollowQuestTemplate::VT_UNK_41, Some(0)).unwrap()} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_1(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_1, Some(0)) + .unwrap() + } + } + #[inline] + pub fn chessboard_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_CHESSBOARD_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_2(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_2, Some(0)) + .unwrap() + } + } + #[inline] + pub fn group_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_GROUP_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn hollow_quest_type(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_HOLLOW_QUEST_TYPE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_3, Some(0)) + .unwrap() + } + } + #[inline] + pub fn duration(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowQuestTemplate::VT_DURATION, None) + } + } + #[inline] + pub fn has_stamina(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + HollowQuestTemplate::VT_HAS_STAMINA, + None, + ) + } + } + #[inline] + pub fn environments( + &self, + ) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(HollowQuestTemplate::VT_ENVIRONMENTS, None) + } + } + #[inline] + pub fn main_difficulty(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + HollowQuestTemplate::VT_MAIN_DIFFICULTY, + None, + ) + } + } + #[inline] + pub fn difficulties( + &self, + ) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(HollowQuestTemplate::VT_DIFFICULTIES, None) + } + } + #[inline] + pub fn recommended_elements( + &self, + ) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(HollowQuestTemplate::VT_RECOMMENDED_ELEMENTS, None) + } + } + #[inline] + pub fn client(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowQuestTemplate::VT_CLIENT, None) + } + } + #[inline] + pub fn unk_4(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_4, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_5(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_5, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_6(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_6, Some(0)) + .unwrap() + } + } + #[inline] + pub fn scale(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_SCALE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn show_tip(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_SHOW_TIP, Some(0)) + .unwrap() + } + } + #[inline] + pub fn monster_level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_MONSTER_LEVEL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn recommended_level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_RECOMMENDED_LEVEL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn average_level_tips(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_AVERAGE_LEVEL_TIPS, Some(0)) + .unwrap() + } + } + #[inline] + pub fn recommended_hit_types(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + HollowQuestTemplate::VT_RECOMMENDED_HIT_TYPES, + None, + ) + } + } + #[inline] + pub fn unk_7(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + HollowQuestTemplate::VT_UNK_7, + None, + ) + } + } + #[inline] + pub fn unk_8(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_8, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_9(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_9, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_10(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowQuestTemplate::VT_UNK_10, None) + } + } + #[inline] + pub fn unk_11(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_11, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_12(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_12, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_13(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_13, Some(0)) + .unwrap() + } + } + #[inline] + pub fn slot_1_avatar(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_SLOT_1_AVATAR, Some(0)) + .unwrap() + } + } + #[inline] + pub fn slot_2_avatar(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_SLOT_2_AVATAR, Some(0)) + .unwrap() + } + } + #[inline] + pub fn slot_3_avatar(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_SLOT_3_AVATAR, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_14(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_14, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_15(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_15, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_16(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_16, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_17(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_17, Some(0)) + .unwrap() + } + } + #[inline] + pub fn preview_res_group_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_PREVIEW_RES_GROUP_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn chessboard_res_group_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_CHESSBOARD_RES_GROUP_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn bgm_chapter_state(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + HollowQuestTemplate::VT_BGM_CHAPTER_STATE, + None, + ) + } + } + #[inline] + pub fn unk_18(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_18, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_19(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowQuestTemplate::VT_UNK_19, None) + } + } + #[inline] + pub fn unk_20(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_20, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_21(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + HollowQuestTemplate::VT_UNK_21, + None, + ) + } + } + #[inline] + pub fn unk_22(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_22, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_23(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_23, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_24(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_24, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_25(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_25, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_26(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_26, Some(0)) + .unwrap() + } + } + #[inline] + pub fn title(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowQuestTemplate::VT_TITLE, None) + } + } + #[inline] + pub fn difficulty(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowQuestTemplate::VT_DIFFICULTY, None) + } + } + #[inline] + pub fn target(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowQuestTemplate::VT_TARGET, None) + } + } + #[inline] + pub fn unk_27(&self) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(HollowQuestTemplate::VT_UNK_27, None) + } + } + #[inline] + pub fn unk_28(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_28, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_29(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_29, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_30(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_30, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_31(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_31, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_32(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_32, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_33(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_33, Some(0)) + .unwrap() + } + } + #[inline] + pub fn hollow_item_ban_lists(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + HollowQuestTemplate::VT_HOLLOW_ITEM_BAN_LISTS, + None, + ) + } + } + #[inline] + pub fn unk_34(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_34, Some(false)) + .unwrap() + } + } + #[inline] + pub fn enemy_types( + &self, + ) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(HollowQuestTemplate::VT_ENEMY_TYPES, None) + } + } + #[inline] + pub fn background(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(HollowQuestTemplate::VT_BACKGROUND, None) + } + } + #[inline] + pub fn unk_35(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_35, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_36(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + HollowQuestTemplate::VT_UNK_36, + None, + ) + } + } + #[inline] + pub fn unk_37(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + HollowQuestTemplate::VT_UNK_37, + None, + ) + } + } + #[inline] + pub fn unk_38(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_38, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_39(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_39, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_40(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_40, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_41(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(HollowQuestTemplate::VT_UNK_41, Some(0)) + .unwrap() + } + } } impl flatbuffers::Verifiable for HollowQuestTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::("unk_1", Self::VT_UNK_1, false)? - .visit_field::("chessboard_id", Self::VT_CHESSBOARD_ID, false)? - .visit_field::("unk_2", Self::VT_UNK_2, false)? - .visit_field::("group_id", Self::VT_GROUP_ID, false)? - .visit_field::("hollow_quest_type", Self::VT_HOLLOW_QUEST_TYPE, false)? - .visit_field::("unk_3", Self::VT_UNK_3, false)? - .visit_field::>("duration", Self::VT_DURATION, false)? - .visit_field::>("has_stamina", Self::VT_HAS_STAMINA, false)? - .visit_field::>>>("environments", Self::VT_ENVIRONMENTS, false)? - .visit_field::>("main_difficulty", Self::VT_MAIN_DIFFICULTY, false)? - .visit_field::>>>("difficulties", Self::VT_DIFFICULTIES, false)? - .visit_field::>>>("recommended_elements", Self::VT_RECOMMENDED_ELEMENTS, false)? - .visit_field::>("client", Self::VT_CLIENT, false)? - .visit_field::("unk_4", Self::VT_UNK_4, false)? - .visit_field::("unk_5", Self::VT_UNK_5, false)? - .visit_field::("unk_6", Self::VT_UNK_6, false)? - .visit_field::("scale", Self::VT_SCALE, false)? - .visit_field::("show_tip", Self::VT_SHOW_TIP, false)? - .visit_field::("monster_level", Self::VT_MONSTER_LEVEL, false)? - .visit_field::("recommended_level", Self::VT_RECOMMENDED_LEVEL, false)? - .visit_field::("average_level_tips", Self::VT_AVERAGE_LEVEL_TIPS, false)? - .visit_field::>>("recommended_hit_types", Self::VT_RECOMMENDED_HIT_TYPES, false)? - .visit_field::>>("unk_7", Self::VT_UNK_7, false)? - .visit_field::("unk_8", Self::VT_UNK_8, false)? - .visit_field::("unk_9", Self::VT_UNK_9, false)? - .visit_field::>("unk_10", Self::VT_UNK_10, false)? - .visit_field::("unk_11", Self::VT_UNK_11, false)? - .visit_field::("unk_12", Self::VT_UNK_12, false)? - .visit_field::("unk_13", Self::VT_UNK_13, false)? - .visit_field::("slot_1_avatar", Self::VT_SLOT_1_AVATAR, false)? - .visit_field::("slot_2_avatar", Self::VT_SLOT_2_AVATAR, false)? - .visit_field::("slot_3_avatar", Self::VT_SLOT_3_AVATAR, false)? - .visit_field::("unk_14", Self::VT_UNK_14, false)? - .visit_field::("unk_15", Self::VT_UNK_15, false)? - .visit_field::("unk_16", Self::VT_UNK_16, false)? - .visit_field::("unk_17", Self::VT_UNK_17, false)? - .visit_field::("preview_res_group_id", Self::VT_PREVIEW_RES_GROUP_ID, false)? - .visit_field::("chessboard_res_group_id", Self::VT_CHESSBOARD_RES_GROUP_ID, false)? - .visit_field::>("bgm_chapter_state", Self::VT_BGM_CHAPTER_STATE, false)? - .visit_field::("unk_18", Self::VT_UNK_18, false)? - .visit_field::>("unk_19", Self::VT_UNK_19, false)? - .visit_field::("unk_20", Self::VT_UNK_20, false)? - .visit_field::>>("unk_21", Self::VT_UNK_21, false)? - .visit_field::("unk_22", Self::VT_UNK_22, false)? - .visit_field::("unk_23", Self::VT_UNK_23, false)? - .visit_field::("unk_24", Self::VT_UNK_24, false)? - .visit_field::("unk_25", Self::VT_UNK_25, false)? - .visit_field::("unk_26", Self::VT_UNK_26, false)? - .visit_field::>("title", Self::VT_TITLE, false)? - .visit_field::>("difficulty", Self::VT_DIFFICULTY, false)? - .visit_field::>("target", Self::VT_TARGET, false)? - .visit_field::>>>("unk_27", Self::VT_UNK_27, false)? - .visit_field::("unk_28", Self::VT_UNK_28, false)? - .visit_field::("unk_29", Self::VT_UNK_29, false)? - .visit_field::("unk_30", Self::VT_UNK_30, false)? - .visit_field::("unk_31", Self::VT_UNK_31, false)? - .visit_field::("unk_32", Self::VT_UNK_32, false)? - .visit_field::("unk_33", Self::VT_UNK_33, false)? - .visit_field::>>("hollow_item_ban_lists", Self::VT_HOLLOW_ITEM_BAN_LISTS, false)? - .visit_field::("unk_34", Self::VT_UNK_34, false)? - .visit_field::>>>("enemy_types", Self::VT_ENEMY_TYPES, false)? - .visit_field::>("background", Self::VT_BACKGROUND, false)? - .visit_field::("unk_35", Self::VT_UNK_35, false)? - .visit_field::>>("unk_36", Self::VT_UNK_36, false)? - .visit_field::>>("unk_37", Self::VT_UNK_37, false)? - .visit_field::("unk_38", Self::VT_UNK_38, false)? - .visit_field::("unk_39", Self::VT_UNK_39, false)? - .visit_field::("unk_40", Self::VT_UNK_40, false)? - .visit_field::("unk_41", Self::VT_UNK_41, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::("unk_1", Self::VT_UNK_1, false)? + .visit_field::("chessboard_id", Self::VT_CHESSBOARD_ID, false)? + .visit_field::("unk_2", Self::VT_UNK_2, false)? + .visit_field::("group_id", Self::VT_GROUP_ID, false)? + .visit_field::("hollow_quest_type", Self::VT_HOLLOW_QUEST_TYPE, false)? + .visit_field::("unk_3", Self::VT_UNK_3, false)? + .visit_field::>( + "duration", + Self::VT_DURATION, + false, + )? + .visit_field::>( + "has_stamina", + Self::VT_HAS_STAMINA, + false, + )? + .visit_field::>, + >>("environments", Self::VT_ENVIRONMENTS, false)? + .visit_field::>( + "main_difficulty", + Self::VT_MAIN_DIFFICULTY, + false, + )? + .visit_field::>, + >>("difficulties", Self::VT_DIFFICULTIES, false)? + .visit_field::>, + >>("recommended_elements", Self::VT_RECOMMENDED_ELEMENTS, false)? + .visit_field::>("client", Self::VT_CLIENT, false)? + .visit_field::("unk_4", Self::VT_UNK_4, false)? + .visit_field::("unk_5", Self::VT_UNK_5, false)? + .visit_field::("unk_6", Self::VT_UNK_6, false)? + .visit_field::("scale", Self::VT_SCALE, false)? + .visit_field::("show_tip", Self::VT_SHOW_TIP, false)? + .visit_field::("monster_level", Self::VT_MONSTER_LEVEL, false)? + .visit_field::("recommended_level", Self::VT_RECOMMENDED_LEVEL, false)? + .visit_field::("average_level_tips", Self::VT_AVERAGE_LEVEL_TIPS, false)? + .visit_field::>>( + "recommended_hit_types", + Self::VT_RECOMMENDED_HIT_TYPES, + false, + )? + .visit_field::>>( + "unk_7", + Self::VT_UNK_7, + false, + )? + .visit_field::("unk_8", Self::VT_UNK_8, false)? + .visit_field::("unk_9", Self::VT_UNK_9, false)? + .visit_field::>("unk_10", Self::VT_UNK_10, false)? + .visit_field::("unk_11", Self::VT_UNK_11, false)? + .visit_field::("unk_12", Self::VT_UNK_12, false)? + .visit_field::("unk_13", Self::VT_UNK_13, false)? + .visit_field::("slot_1_avatar", Self::VT_SLOT_1_AVATAR, false)? + .visit_field::("slot_2_avatar", Self::VT_SLOT_2_AVATAR, false)? + .visit_field::("slot_3_avatar", Self::VT_SLOT_3_AVATAR, false)? + .visit_field::("unk_14", Self::VT_UNK_14, false)? + .visit_field::("unk_15", Self::VT_UNK_15, false)? + .visit_field::("unk_16", Self::VT_UNK_16, false)? + .visit_field::("unk_17", Self::VT_UNK_17, false)? + .visit_field::("preview_res_group_id", Self::VT_PREVIEW_RES_GROUP_ID, false)? + .visit_field::( + "chessboard_res_group_id", + Self::VT_CHESSBOARD_RES_GROUP_ID, + false, + )? + .visit_field::>( + "bgm_chapter_state", + Self::VT_BGM_CHAPTER_STATE, + false, + )? + .visit_field::("unk_18", Self::VT_UNK_18, false)? + .visit_field::>("unk_19", Self::VT_UNK_19, false)? + .visit_field::("unk_20", Self::VT_UNK_20, false)? + .visit_field::>>( + "unk_21", + Self::VT_UNK_21, + false, + )? + .visit_field::("unk_22", Self::VT_UNK_22, false)? + .visit_field::("unk_23", Self::VT_UNK_23, false)? + .visit_field::("unk_24", Self::VT_UNK_24, false)? + .visit_field::("unk_25", Self::VT_UNK_25, false)? + .visit_field::("unk_26", Self::VT_UNK_26, false)? + .visit_field::>("title", Self::VT_TITLE, false)? + .visit_field::>( + "difficulty", + Self::VT_DIFFICULTY, + false, + )? + .visit_field::>("target", Self::VT_TARGET, false)? + .visit_field::>, + >>("unk_27", Self::VT_UNK_27, false)? + .visit_field::("unk_28", Self::VT_UNK_28, false)? + .visit_field::("unk_29", Self::VT_UNK_29, false)? + .visit_field::("unk_30", Self::VT_UNK_30, false)? + .visit_field::("unk_31", Self::VT_UNK_31, false)? + .visit_field::("unk_32", Self::VT_UNK_32, false)? + .visit_field::("unk_33", Self::VT_UNK_33, false)? + .visit_field::>>( + "hollow_item_ban_lists", + Self::VT_HOLLOW_ITEM_BAN_LISTS, + false, + )? + .visit_field::("unk_34", Self::VT_UNK_34, false)? + .visit_field::>, + >>("enemy_types", Self::VT_ENEMY_TYPES, false)? + .visit_field::>( + "background", + Self::VT_BACKGROUND, + false, + )? + .visit_field::("unk_35", Self::VT_UNK_35, false)? + .visit_field::>>( + "unk_36", + Self::VT_UNK_36, + false, + )? + .visit_field::>>( + "unk_37", + Self::VT_UNK_37, + false, + )? + .visit_field::("unk_38", Self::VT_UNK_38, false)? + .visit_field::("unk_39", Self::VT_UNK_39, false)? + .visit_field::("unk_40", Self::VT_UNK_40, false)? + .visit_field::("unk_41", Self::VT_UNK_41, false)? + .finish(); + Ok(()) + } } pub struct HollowQuestTemplateArgs<'a> { pub id: i32, @@ -5391,10 +7936,16 @@ pub struct HollowQuestTemplateArgs<'a> { pub unk_3: i32, pub duration: Option>, pub has_stamina: Option>, - pub environments: Option>>>, + pub environments: Option< + flatbuffers::WIPOffset>>, + >, pub main_difficulty: Option>, - pub difficulties: Option>>>, - pub recommended_elements: Option>>>, + pub difficulties: Option< + flatbuffers::WIPOffset>>, + >, + pub recommended_elements: Option< + flatbuffers::WIPOffset>>, + >, pub client: Option>, pub unk_4: i32, pub unk_5: bool, @@ -5434,7 +7985,9 @@ pub struct HollowQuestTemplateArgs<'a> { pub title: Option>, pub difficulty: Option>, pub target: Option>, - pub unk_27: Option>>>, + pub unk_27: Option< + flatbuffers::WIPOffset>>, + >, pub unk_28: i32, pub unk_29: i32, pub unk_30: bool, @@ -5443,7 +7996,9 @@ pub struct HollowQuestTemplateArgs<'a> { pub unk_33: i32, pub hollow_item_ban_lists: Option>>, pub unk_34: bool, - pub enemy_types: Option>>>, + pub enemy_types: Option< + flatbuffers::WIPOffset>>, + >, pub background: Option>, pub unk_35: i32, pub unk_36: Option>>, @@ -5454,622 +8009,831 @@ pub struct HollowQuestTemplateArgs<'a> { pub unk_41: i32, } impl<'a> Default for HollowQuestTemplateArgs<'a> { - #[inline] - fn default() -> Self { - HollowQuestTemplateArgs { - id: 0, - unk_1: 0, - chessboard_id: 0, - unk_2: 0, - group_id: 0, - hollow_quest_type: 0, - unk_3: 0, - duration: None, - has_stamina: None, - environments: None, - main_difficulty: None, - difficulties: None, - recommended_elements: None, - client: None, - unk_4: 0, - unk_5: false, - unk_6: 0, - scale: 0, - show_tip: 0, - monster_level: 0, - recommended_level: 0, - average_level_tips: 0, - recommended_hit_types: None, - unk_7: None, - unk_8: false, - unk_9: false, - unk_10: None, - unk_11: 0, - unk_12: false, - unk_13: 0, - slot_1_avatar: 0, - slot_2_avatar: 0, - slot_3_avatar: 0, - unk_14: 0, - unk_15: false, - unk_16: false, - unk_17: 0, - preview_res_group_id: 0, - chessboard_res_group_id: 0, - bgm_chapter_state: None, - unk_18: 0, - unk_19: None, - unk_20: 0, - unk_21: None, - unk_22: 0, - unk_23: 0, - unk_24: 0, - unk_25: false, - unk_26: 0, - title: None, - difficulty: None, - target: None, - unk_27: None, - unk_28: 0, - unk_29: 0, - unk_30: false, - unk_31: 0, - unk_32: false, - unk_33: 0, - hollow_item_ban_lists: None, - unk_34: false, - enemy_types: None, - background: None, - unk_35: 0, - unk_36: None, - unk_37: None, - unk_38: 0, - unk_39: 0, - unk_40: 0, - unk_41: 0, + #[inline] + fn default() -> Self { + HollowQuestTemplateArgs { + id: 0, + unk_1: 0, + chessboard_id: 0, + unk_2: 0, + group_id: 0, + hollow_quest_type: 0, + unk_3: 0, + duration: None, + has_stamina: None, + environments: None, + main_difficulty: None, + difficulties: None, + recommended_elements: None, + client: None, + unk_4: 0, + unk_5: false, + unk_6: 0, + scale: 0, + show_tip: 0, + monster_level: 0, + recommended_level: 0, + average_level_tips: 0, + recommended_hit_types: None, + unk_7: None, + unk_8: false, + unk_9: false, + unk_10: None, + unk_11: 0, + unk_12: false, + unk_13: 0, + slot_1_avatar: 0, + slot_2_avatar: 0, + slot_3_avatar: 0, + unk_14: 0, + unk_15: false, + unk_16: false, + unk_17: 0, + preview_res_group_id: 0, + chessboard_res_group_id: 0, + bgm_chapter_state: None, + unk_18: 0, + unk_19: None, + unk_20: 0, + unk_21: None, + unk_22: 0, + unk_23: 0, + unk_24: 0, + unk_25: false, + unk_26: 0, + title: None, + difficulty: None, + target: None, + unk_27: None, + unk_28: 0, + unk_29: 0, + unk_30: false, + unk_31: 0, + unk_32: false, + unk_33: 0, + hollow_item_ban_lists: None, + unk_34: false, + enemy_types: None, + background: None, + unk_35: 0, + unk_36: None, + unk_37: None, + unk_38: 0, + unk_39: 0, + unk_40: 0, + unk_41: 0, + } } - } } pub struct HollowQuestTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> HollowQuestTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_1, unk_1, 0); - } - #[inline] - pub fn add_chessboard_id(&mut self, chessboard_id: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_CHESSBOARD_ID, chessboard_id, 0); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_2, unk_2, 0); - } - #[inline] - pub fn add_group_id(&mut self, group_id: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_GROUP_ID, group_id, 0); - } - #[inline] - pub fn add_hollow_quest_type(&mut self, hollow_quest_type: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_HOLLOW_QUEST_TYPE, hollow_quest_type, 0); - } - #[inline] - pub fn add_unk_3(&mut self, unk_3: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_3, unk_3, 0); - } - #[inline] - pub fn add_duration(&mut self, duration: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_DURATION, duration); - } - #[inline] - pub fn add_has_stamina(&mut self, has_stamina: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_HAS_STAMINA, has_stamina); - } - #[inline] - pub fn add_environments(&mut self, environments: flatbuffers::WIPOffset>>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_ENVIRONMENTS, environments); - } - #[inline] - pub fn add_main_difficulty(&mut self, main_difficulty: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_MAIN_DIFFICULTY, main_difficulty); - } - #[inline] - pub fn add_difficulties(&mut self, difficulties: flatbuffers::WIPOffset>>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_DIFFICULTIES, difficulties); - } - #[inline] - pub fn add_recommended_elements(&mut self, recommended_elements: flatbuffers::WIPOffset>>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_RECOMMENDED_ELEMENTS, recommended_elements); - } - #[inline] - pub fn add_client(&mut self, client: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_CLIENT, client); - } - #[inline] - pub fn add_unk_4(&mut self, unk_4: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_4, unk_4, 0); - } - #[inline] - pub fn add_unk_5(&mut self, unk_5: bool) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_5, unk_5, false); - } - #[inline] - pub fn add_unk_6(&mut self, unk_6: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_6, unk_6, 0); - } - #[inline] - pub fn add_scale(&mut self, scale: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_SCALE, scale, 0); - } - #[inline] - pub fn add_show_tip(&mut self, show_tip: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_SHOW_TIP, show_tip, 0); - } - #[inline] - pub fn add_monster_level(&mut self, monster_level: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_MONSTER_LEVEL, monster_level, 0); - } - #[inline] - pub fn add_recommended_level(&mut self, recommended_level: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_RECOMMENDED_LEVEL, recommended_level, 0); - } - #[inline] - pub fn add_average_level_tips(&mut self, average_level_tips: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_AVERAGE_LEVEL_TIPS, average_level_tips, 0); - } - #[inline] - pub fn add_recommended_hit_types(&mut self, recommended_hit_types: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_RECOMMENDED_HIT_TYPES, recommended_hit_types); - } - #[inline] - pub fn add_unk_7(&mut self, unk_7: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_UNK_7, unk_7); - } - #[inline] - pub fn add_unk_8(&mut self, unk_8: bool) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_8, unk_8, false); - } - #[inline] - pub fn add_unk_9(&mut self, unk_9: bool) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_9, unk_9, false); - } - #[inline] - pub fn add_unk_10(&mut self, unk_10: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_UNK_10, unk_10); - } - #[inline] - pub fn add_unk_11(&mut self, unk_11: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_11, unk_11, 0); - } - #[inline] - pub fn add_unk_12(&mut self, unk_12: bool) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_12, unk_12, false); - } - #[inline] - pub fn add_unk_13(&mut self, unk_13: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_13, unk_13, 0); - } - #[inline] - pub fn add_slot_1_avatar(&mut self, slot_1_avatar: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_SLOT_1_AVATAR, slot_1_avatar, 0); - } - #[inline] - pub fn add_slot_2_avatar(&mut self, slot_2_avatar: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_SLOT_2_AVATAR, slot_2_avatar, 0); - } - #[inline] - pub fn add_slot_3_avatar(&mut self, slot_3_avatar: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_SLOT_3_AVATAR, slot_3_avatar, 0); - } - #[inline] - pub fn add_unk_14(&mut self, unk_14: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_14, unk_14, 0); - } - #[inline] - pub fn add_unk_15(&mut self, unk_15: bool) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_15, unk_15, false); - } - #[inline] - pub fn add_unk_16(&mut self, unk_16: bool) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_16, unk_16, false); - } - #[inline] - pub fn add_unk_17(&mut self, unk_17: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_17, unk_17, 0); - } - #[inline] - pub fn add_preview_res_group_id(&mut self, preview_res_group_id: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_PREVIEW_RES_GROUP_ID, preview_res_group_id, 0); - } - #[inline] - pub fn add_chessboard_res_group_id(&mut self, chessboard_res_group_id: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_CHESSBOARD_RES_GROUP_ID, chessboard_res_group_id, 0); - } - #[inline] - pub fn add_bgm_chapter_state(&mut self, bgm_chapter_state: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_BGM_CHAPTER_STATE, bgm_chapter_state); - } - #[inline] - pub fn add_unk_18(&mut self, unk_18: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_18, unk_18, 0); - } - #[inline] - pub fn add_unk_19(&mut self, unk_19: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_UNK_19, unk_19); - } - #[inline] - pub fn add_unk_20(&mut self, unk_20: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_20, unk_20, 0); - } - #[inline] - pub fn add_unk_21(&mut self, unk_21: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_UNK_21, unk_21); - } - #[inline] - pub fn add_unk_22(&mut self, unk_22: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_22, unk_22, 0); - } - #[inline] - pub fn add_unk_23(&mut self, unk_23: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_23, unk_23, 0); - } - #[inline] - pub fn add_unk_24(&mut self, unk_24: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_24, unk_24, 0); - } - #[inline] - pub fn add_unk_25(&mut self, unk_25: bool) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_25, unk_25, false); - } - #[inline] - pub fn add_unk_26(&mut self, unk_26: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_26, unk_26, 0); - } - #[inline] - pub fn add_title(&mut self, title: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_TITLE, title); - } - #[inline] - pub fn add_difficulty(&mut self, difficulty: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_DIFFICULTY, difficulty); - } - #[inline] - pub fn add_target(&mut self, target: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_TARGET, target); - } - #[inline] - pub fn add_unk_27(&mut self, unk_27: flatbuffers::WIPOffset>>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_UNK_27, unk_27); - } - #[inline] - pub fn add_unk_28(&mut self, unk_28: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_28, unk_28, 0); - } - #[inline] - pub fn add_unk_29(&mut self, unk_29: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_29, unk_29, 0); - } - #[inline] - pub fn add_unk_30(&mut self, unk_30: bool) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_30, unk_30, false); - } - #[inline] - pub fn add_unk_31(&mut self, unk_31: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_31, unk_31, 0); - } - #[inline] - pub fn add_unk_32(&mut self, unk_32: bool) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_32, unk_32, false); - } - #[inline] - pub fn add_unk_33(&mut self, unk_33: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_33, unk_33, 0); - } - #[inline] - pub fn add_hollow_item_ban_lists(&mut self, hollow_item_ban_lists: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_HOLLOW_ITEM_BAN_LISTS, hollow_item_ban_lists); - } - #[inline] - pub fn add_unk_34(&mut self, unk_34: bool) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_34, unk_34, false); - } - #[inline] - pub fn add_enemy_types(&mut self, enemy_types: flatbuffers::WIPOffset>>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_ENEMY_TYPES, enemy_types); - } - #[inline] - pub fn add_background(&mut self, background: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_BACKGROUND, background); - } - #[inline] - pub fn add_unk_35(&mut self, unk_35: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_35, unk_35, 0); - } - #[inline] - pub fn add_unk_36(&mut self, unk_36: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_UNK_36, unk_36); - } - #[inline] - pub fn add_unk_37(&mut self, unk_37: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(HollowQuestTemplate::VT_UNK_37, unk_37); - } - #[inline] - pub fn add_unk_38(&mut self, unk_38: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_38, unk_38, 0); - } - #[inline] - pub fn add_unk_39(&mut self, unk_39: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_39, unk_39, 0); - } - #[inline] - pub fn add_unk_40(&mut self, unk_40: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_40, unk_40, 0); - } - #[inline] - pub fn add_unk_41(&mut self, unk_41: i32) { - self.fbb_.push_slot::(HollowQuestTemplate::VT_UNK_41, unk_41, 0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> HollowQuestTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - HollowQuestTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_1, unk_1, 0); + } + #[inline] + pub fn add_chessboard_id(&mut self, chessboard_id: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_CHESSBOARD_ID, chessboard_id, 0); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_2, unk_2, 0); + } + #[inline] + pub fn add_group_id(&mut self, group_id: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_GROUP_ID, group_id, 0); + } + #[inline] + pub fn add_hollow_quest_type(&mut self, hollow_quest_type: i32) { + self.fbb_.push_slot::( + HollowQuestTemplate::VT_HOLLOW_QUEST_TYPE, + hollow_quest_type, + 0, + ); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_3, unk_3, 0); + } + #[inline] + pub fn add_duration(&mut self, duration: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowQuestTemplate::VT_DURATION, + duration, + ); + } + #[inline] + pub fn add_has_stamina(&mut self, has_stamina: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowQuestTemplate::VT_HAS_STAMINA, + has_stamina, + ); + } + #[inline] + pub fn add_environments( + &mut self, + environments: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_.push_slot_always::>( + HollowQuestTemplate::VT_ENVIRONMENTS, + environments, + ); + } + #[inline] + pub fn add_main_difficulty(&mut self, main_difficulty: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowQuestTemplate::VT_MAIN_DIFFICULTY, + main_difficulty, + ); + } + #[inline] + pub fn add_difficulties( + &mut self, + difficulties: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_.push_slot_always::>( + HollowQuestTemplate::VT_DIFFICULTIES, + difficulties, + ); + } + #[inline] + pub fn add_recommended_elements( + &mut self, + recommended_elements: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_.push_slot_always::>( + HollowQuestTemplate::VT_RECOMMENDED_ELEMENTS, + recommended_elements, + ); + } + #[inline] + pub fn add_client(&mut self, client: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(HollowQuestTemplate::VT_CLIENT, client); + } + #[inline] + pub fn add_unk_4(&mut self, unk_4: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_4, unk_4, 0); + } + #[inline] + pub fn add_unk_5(&mut self, unk_5: bool) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_5, unk_5, false); + } + #[inline] + pub fn add_unk_6(&mut self, unk_6: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_6, unk_6, 0); + } + #[inline] + pub fn add_scale(&mut self, scale: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_SCALE, scale, 0); + } + #[inline] + pub fn add_show_tip(&mut self, show_tip: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_SHOW_TIP, show_tip, 0); + } + #[inline] + pub fn add_monster_level(&mut self, monster_level: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_MONSTER_LEVEL, monster_level, 0); + } + #[inline] + pub fn add_recommended_level(&mut self, recommended_level: i32) { + self.fbb_.push_slot::( + HollowQuestTemplate::VT_RECOMMENDED_LEVEL, + recommended_level, + 0, + ); + } + #[inline] + pub fn add_average_level_tips(&mut self, average_level_tips: i32) { + self.fbb_.push_slot::( + HollowQuestTemplate::VT_AVERAGE_LEVEL_TIPS, + average_level_tips, + 0, + ); + } + #[inline] + pub fn add_recommended_hit_types( + &mut self, + recommended_hit_types: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + HollowQuestTemplate::VT_RECOMMENDED_HIT_TYPES, + recommended_hit_types, + ); + } + #[inline] + pub fn add_unk_7(&mut self, unk_7: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(HollowQuestTemplate::VT_UNK_7, unk_7); + } + #[inline] + pub fn add_unk_8(&mut self, unk_8: bool) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_8, unk_8, false); + } + #[inline] + pub fn add_unk_9(&mut self, unk_9: bool) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_9, unk_9, false); + } + #[inline] + pub fn add_unk_10(&mut self, unk_10: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(HollowQuestTemplate::VT_UNK_10, unk_10); + } + #[inline] + pub fn add_unk_11(&mut self, unk_11: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_11, unk_11, 0); + } + #[inline] + pub fn add_unk_12(&mut self, unk_12: bool) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_12, unk_12, false); + } + #[inline] + pub fn add_unk_13(&mut self, unk_13: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_13, unk_13, 0); + } + #[inline] + pub fn add_slot_1_avatar(&mut self, slot_1_avatar: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_SLOT_1_AVATAR, slot_1_avatar, 0); + } + #[inline] + pub fn add_slot_2_avatar(&mut self, slot_2_avatar: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_SLOT_2_AVATAR, slot_2_avatar, 0); + } + #[inline] + pub fn add_slot_3_avatar(&mut self, slot_3_avatar: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_SLOT_3_AVATAR, slot_3_avatar, 0); + } + #[inline] + pub fn add_unk_14(&mut self, unk_14: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_14, unk_14, 0); + } + #[inline] + pub fn add_unk_15(&mut self, unk_15: bool) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_15, unk_15, false); + } + #[inline] + pub fn add_unk_16(&mut self, unk_16: bool) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_16, unk_16, false); + } + #[inline] + pub fn add_unk_17(&mut self, unk_17: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_17, unk_17, 0); + } + #[inline] + pub fn add_preview_res_group_id(&mut self, preview_res_group_id: i32) { + self.fbb_.push_slot::( + HollowQuestTemplate::VT_PREVIEW_RES_GROUP_ID, + preview_res_group_id, + 0, + ); + } + #[inline] + pub fn add_chessboard_res_group_id(&mut self, chessboard_res_group_id: i32) { + self.fbb_.push_slot::( + HollowQuestTemplate::VT_CHESSBOARD_RES_GROUP_ID, + chessboard_res_group_id, + 0, + ); + } + #[inline] + pub fn add_bgm_chapter_state(&mut self, bgm_chapter_state: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowQuestTemplate::VT_BGM_CHAPTER_STATE, + bgm_chapter_state, + ); + } + #[inline] + pub fn add_unk_18(&mut self, unk_18: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_18, unk_18, 0); + } + #[inline] + pub fn add_unk_19(&mut self, unk_19: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(HollowQuestTemplate::VT_UNK_19, unk_19); + } + #[inline] + pub fn add_unk_20(&mut self, unk_20: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_20, unk_20, 0); + } + #[inline] + pub fn add_unk_21(&mut self, unk_21: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(HollowQuestTemplate::VT_UNK_21, unk_21); + } + #[inline] + pub fn add_unk_22(&mut self, unk_22: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_22, unk_22, 0); + } + #[inline] + pub fn add_unk_23(&mut self, unk_23: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_23, unk_23, 0); + } + #[inline] + pub fn add_unk_24(&mut self, unk_24: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_24, unk_24, 0); + } + #[inline] + pub fn add_unk_25(&mut self, unk_25: bool) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_25, unk_25, false); + } + #[inline] + pub fn add_unk_26(&mut self, unk_26: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_26, unk_26, 0); + } + #[inline] + pub fn add_title(&mut self, title: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(HollowQuestTemplate::VT_TITLE, title); + } + #[inline] + pub fn add_difficulty(&mut self, difficulty: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowQuestTemplate::VT_DIFFICULTY, + difficulty, + ); + } + #[inline] + pub fn add_target(&mut self, target: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(HollowQuestTemplate::VT_TARGET, target); + } + #[inline] + pub fn add_unk_27( + &mut self, + unk_27: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_ + .push_slot_always::>(HollowQuestTemplate::VT_UNK_27, unk_27); + } + #[inline] + pub fn add_unk_28(&mut self, unk_28: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_28, unk_28, 0); + } + #[inline] + pub fn add_unk_29(&mut self, unk_29: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_29, unk_29, 0); + } + #[inline] + pub fn add_unk_30(&mut self, unk_30: bool) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_30, unk_30, false); + } + #[inline] + pub fn add_unk_31(&mut self, unk_31: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_31, unk_31, 0); + } + #[inline] + pub fn add_unk_32(&mut self, unk_32: bool) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_32, unk_32, false); + } + #[inline] + pub fn add_unk_33(&mut self, unk_33: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_33, unk_33, 0); + } + #[inline] + pub fn add_hollow_item_ban_lists( + &mut self, + hollow_item_ban_lists: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + HollowQuestTemplate::VT_HOLLOW_ITEM_BAN_LISTS, + hollow_item_ban_lists, + ); + } + #[inline] + pub fn add_unk_34(&mut self, unk_34: bool) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_34, unk_34, false); + } + #[inline] + pub fn add_enemy_types( + &mut self, + enemy_types: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_.push_slot_always::>( + HollowQuestTemplate::VT_ENEMY_TYPES, + enemy_types, + ); + } + #[inline] + pub fn add_background(&mut self, background: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + HollowQuestTemplate::VT_BACKGROUND, + background, + ); + } + #[inline] + pub fn add_unk_35(&mut self, unk_35: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_35, unk_35, 0); + } + #[inline] + pub fn add_unk_36(&mut self, unk_36: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(HollowQuestTemplate::VT_UNK_36, unk_36); + } + #[inline] + pub fn add_unk_37(&mut self, unk_37: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(HollowQuestTemplate::VT_UNK_37, unk_37); + } + #[inline] + pub fn add_unk_38(&mut self, unk_38: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_38, unk_38, 0); + } + #[inline] + pub fn add_unk_39(&mut self, unk_39: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_39, unk_39, 0); + } + #[inline] + pub fn add_unk_40(&mut self, unk_40: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_40, unk_40, 0); + } + #[inline] + pub fn add_unk_41(&mut self, unk_41: i32) { + self.fbb_ + .push_slot::(HollowQuestTemplate::VT_UNK_41, unk_41, 0); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> HollowQuestTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + HollowQuestTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for HollowQuestTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("HollowQuestTemplate"); - ds.field("id", &self.id()); - ds.field("unk_1", &self.unk_1()); - ds.field("chessboard_id", &self.chessboard_id()); - ds.field("unk_2", &self.unk_2()); - ds.field("group_id", &self.group_id()); - ds.field("hollow_quest_type", &self.hollow_quest_type()); - ds.field("unk_3", &self.unk_3()); - ds.field("duration", &self.duration()); - ds.field("has_stamina", &self.has_stamina()); - ds.field("environments", &self.environments()); - ds.field("main_difficulty", &self.main_difficulty()); - ds.field("difficulties", &self.difficulties()); - ds.field("recommended_elements", &self.recommended_elements()); - ds.field("client", &self.client()); - ds.field("unk_4", &self.unk_4()); - ds.field("unk_5", &self.unk_5()); - ds.field("unk_6", &self.unk_6()); - ds.field("scale", &self.scale()); - ds.field("show_tip", &self.show_tip()); - ds.field("monster_level", &self.monster_level()); - ds.field("recommended_level", &self.recommended_level()); - ds.field("average_level_tips", &self.average_level_tips()); - ds.field("recommended_hit_types", &self.recommended_hit_types()); - ds.field("unk_7", &self.unk_7()); - ds.field("unk_8", &self.unk_8()); - ds.field("unk_9", &self.unk_9()); - ds.field("unk_10", &self.unk_10()); - ds.field("unk_11", &self.unk_11()); - ds.field("unk_12", &self.unk_12()); - ds.field("unk_13", &self.unk_13()); - ds.field("slot_1_avatar", &self.slot_1_avatar()); - ds.field("slot_2_avatar", &self.slot_2_avatar()); - ds.field("slot_3_avatar", &self.slot_3_avatar()); - ds.field("unk_14", &self.unk_14()); - ds.field("unk_15", &self.unk_15()); - ds.field("unk_16", &self.unk_16()); - ds.field("unk_17", &self.unk_17()); - ds.field("preview_res_group_id", &self.preview_res_group_id()); - ds.field("chessboard_res_group_id", &self.chessboard_res_group_id()); - ds.field("bgm_chapter_state", &self.bgm_chapter_state()); - ds.field("unk_18", &self.unk_18()); - ds.field("unk_19", &self.unk_19()); - ds.field("unk_20", &self.unk_20()); - ds.field("unk_21", &self.unk_21()); - ds.field("unk_22", &self.unk_22()); - ds.field("unk_23", &self.unk_23()); - ds.field("unk_24", &self.unk_24()); - ds.field("unk_25", &self.unk_25()); - ds.field("unk_26", &self.unk_26()); - ds.field("title", &self.title()); - ds.field("difficulty", &self.difficulty()); - ds.field("target", &self.target()); - ds.field("unk_27", &self.unk_27()); - ds.field("unk_28", &self.unk_28()); - ds.field("unk_29", &self.unk_29()); - ds.field("unk_30", &self.unk_30()); - ds.field("unk_31", &self.unk_31()); - ds.field("unk_32", &self.unk_32()); - ds.field("unk_33", &self.unk_33()); - ds.field("hollow_item_ban_lists", &self.hollow_item_ban_lists()); - ds.field("unk_34", &self.unk_34()); - ds.field("enemy_types", &self.enemy_types()); - ds.field("background", &self.background()); - ds.field("unk_35", &self.unk_35()); - ds.field("unk_36", &self.unk_36()); - ds.field("unk_37", &self.unk_37()); - ds.field("unk_38", &self.unk_38()); - ds.field("unk_39", &self.unk_39()); - ds.field("unk_40", &self.unk_40()); - ds.field("unk_41", &self.unk_41()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("HollowQuestTemplate"); + ds.field("id", &self.id()); + ds.field("unk_1", &self.unk_1()); + ds.field("chessboard_id", &self.chessboard_id()); + ds.field("unk_2", &self.unk_2()); + ds.field("group_id", &self.group_id()); + ds.field("hollow_quest_type", &self.hollow_quest_type()); + ds.field("unk_3", &self.unk_3()); + ds.field("duration", &self.duration()); + ds.field("has_stamina", &self.has_stamina()); + ds.field("environments", &self.environments()); + ds.field("main_difficulty", &self.main_difficulty()); + ds.field("difficulties", &self.difficulties()); + ds.field("recommended_elements", &self.recommended_elements()); + ds.field("client", &self.client()); + ds.field("unk_4", &self.unk_4()); + ds.field("unk_5", &self.unk_5()); + ds.field("unk_6", &self.unk_6()); + ds.field("scale", &self.scale()); + ds.field("show_tip", &self.show_tip()); + ds.field("monster_level", &self.monster_level()); + ds.field("recommended_level", &self.recommended_level()); + ds.field("average_level_tips", &self.average_level_tips()); + ds.field("recommended_hit_types", &self.recommended_hit_types()); + ds.field("unk_7", &self.unk_7()); + ds.field("unk_8", &self.unk_8()); + ds.field("unk_9", &self.unk_9()); + ds.field("unk_10", &self.unk_10()); + ds.field("unk_11", &self.unk_11()); + ds.field("unk_12", &self.unk_12()); + ds.field("unk_13", &self.unk_13()); + ds.field("slot_1_avatar", &self.slot_1_avatar()); + ds.field("slot_2_avatar", &self.slot_2_avatar()); + ds.field("slot_3_avatar", &self.slot_3_avatar()); + ds.field("unk_14", &self.unk_14()); + ds.field("unk_15", &self.unk_15()); + ds.field("unk_16", &self.unk_16()); + ds.field("unk_17", &self.unk_17()); + ds.field("preview_res_group_id", &self.preview_res_group_id()); + ds.field("chessboard_res_group_id", &self.chessboard_res_group_id()); + ds.field("bgm_chapter_state", &self.bgm_chapter_state()); + ds.field("unk_18", &self.unk_18()); + ds.field("unk_19", &self.unk_19()); + ds.field("unk_20", &self.unk_20()); + ds.field("unk_21", &self.unk_21()); + ds.field("unk_22", &self.unk_22()); + ds.field("unk_23", &self.unk_23()); + ds.field("unk_24", &self.unk_24()); + ds.field("unk_25", &self.unk_25()); + ds.field("unk_26", &self.unk_26()); + ds.field("title", &self.title()); + ds.field("difficulty", &self.difficulty()); + ds.field("target", &self.target()); + ds.field("unk_27", &self.unk_27()); + ds.field("unk_28", &self.unk_28()); + ds.field("unk_29", &self.unk_29()); + ds.field("unk_30", &self.unk_30()); + ds.field("unk_31", &self.unk_31()); + ds.field("unk_32", &self.unk_32()); + ds.field("unk_33", &self.unk_33()); + ds.field("hollow_item_ban_lists", &self.hollow_item_ban_lists()); + ds.field("unk_34", &self.unk_34()); + ds.field("enemy_types", &self.enemy_types()); + ds.field("background", &self.background()); + ds.field("unk_35", &self.unk_35()); + ds.field("unk_36", &self.unk_36()); + ds.field("unk_37", &self.unk_37()); + ds.field("unk_38", &self.unk_38()); + ds.field("unk_39", &self.unk_39()); + ds.field("unk_40", &self.unk_40()); + ds.field("unk_41", &self.unk_41()); + ds.finish() + } } pub enum BattleGroupConfigTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct BattleGroupConfigTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for BattleGroupConfigTemplate<'a> { - type Inner = BattleGroupConfigTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = BattleGroupConfigTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> BattleGroupConfigTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_QUEST_ID: flatbuffers::VOffsetT = 6; - pub const VT_UNK_1: flatbuffers::VOffsetT = 8; - pub const VT_UNK_2: flatbuffers::VOffsetT = 10; - pub const VT_UNK_3: flatbuffers::VOffsetT = 12; - pub const VT_UNK_4: flatbuffers::VOffsetT = 14; - pub const VT_UNK_5: flatbuffers::VOffsetT = 16; - pub const VT_UNK_6: flatbuffers::VOffsetT = 18; - pub const VT_BATTLE_EVENT_ID: flatbuffers::VOffsetT = 20; - pub const VT_UNK_8: flatbuffers::VOffsetT = 22; - pub const VT_UNK_9: flatbuffers::VOffsetT = 24; - pub const VT_UNK_10: flatbuffers::VOffsetT = 26; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_QUEST_ID: flatbuffers::VOffsetT = 6; + pub const VT_UNK_1: flatbuffers::VOffsetT = 8; + pub const VT_UNK_2: flatbuffers::VOffsetT = 10; + pub const VT_UNK_3: flatbuffers::VOffsetT = 12; + pub const VT_UNK_4: flatbuffers::VOffsetT = 14; + pub const VT_UNK_5: flatbuffers::VOffsetT = 16; + pub const VT_UNK_6: flatbuffers::VOffsetT = 18; + pub const VT_BATTLE_EVENT_ID: flatbuffers::VOffsetT = 20; + pub const VT_UNK_8: flatbuffers::VOffsetT = 22; + pub const VT_UNK_9: flatbuffers::VOffsetT = 24; + pub const VT_UNK_10: flatbuffers::VOffsetT = 26; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - BattleGroupConfigTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args BattleGroupConfigTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = BattleGroupConfigTemplateBuilder::new(_fbb); - if let Some(x) = args.unk_10 { builder.add_unk_10(x); } - builder.add_battle_event_id(args.battle_event_id); - if let Some(x) = args.unk_6 { builder.add_unk_6(x); } - if let Some(x) = args.unk_5 { builder.add_unk_5(x); } - if let Some(x) = args.unk_4 { builder.add_unk_4(x); } - builder.add_unk_3(args.unk_3); - if let Some(x) = args.unk_2 { builder.add_unk_2(x); } - builder.add_unk_1(args.unk_1); - builder.add_quest_id(args.quest_id); - builder.add_id(args.id); - builder.add_unk_9(args.unk_9); - builder.add_unk_8(args.unk_8); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + BattleGroupConfigTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args BattleGroupConfigTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = BattleGroupConfigTemplateBuilder::new(_fbb); + if let Some(x) = args.unk_10 { + builder.add_unk_10(x); + } + builder.add_battle_event_id(args.battle_event_id); + if let Some(x) = args.unk_6 { + builder.add_unk_6(x); + } + if let Some(x) = args.unk_5 { + builder.add_unk_5(x); + } + if let Some(x) = args.unk_4 { + builder.add_unk_4(x); + } + builder.add_unk_3(args.unk_3); + if let Some(x) = args.unk_2 { + builder.add_unk_2(x); + } + builder.add_unk_1(args.unk_1); + builder.add_quest_id(args.quest_id); + builder.add_id(args.id); + builder.add_unk_9(args.unk_9); + builder.add_unk_8(args.unk_8); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(BattleGroupConfigTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn quest_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(BattleGroupConfigTemplate::VT_QUEST_ID, Some(0)).unwrap()} - } - #[inline] - pub fn unk_1(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(BattleGroupConfigTemplate::VT_UNK_1, Some(0)).unwrap()} - } - #[inline] - pub fn unk_2(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(BattleGroupConfigTemplate::VT_UNK_2, None)} - } - #[inline] - pub fn unk_3(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(BattleGroupConfigTemplate::VT_UNK_3, Some(0)).unwrap()} - } - #[inline] - pub fn unk_4(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(BattleGroupConfigTemplate::VT_UNK_4, None)} - } - #[inline] - pub fn unk_5(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(BattleGroupConfigTemplate::VT_UNK_5, None)} - } - #[inline] - pub fn unk_6(&self) -> Option>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(BattleGroupConfigTemplate::VT_UNK_6, None)} - } - #[inline] - pub fn battle_event_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(BattleGroupConfigTemplate::VT_BATTLE_EVENT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn unk_8(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(BattleGroupConfigTemplate::VT_UNK_8, Some(false)).unwrap()} - } - #[inline] - pub fn unk_9(&self) -> bool { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(BattleGroupConfigTemplate::VT_UNK_9, Some(false)).unwrap()} - } - #[inline] - pub fn unk_10(&self) -> Option>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(BattleGroupConfigTemplate::VT_UNK_10, None)} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(BattleGroupConfigTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn quest_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(BattleGroupConfigTemplate::VT_QUEST_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_1(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(BattleGroupConfigTemplate::VT_UNK_1, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_2(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + BattleGroupConfigTemplate::VT_UNK_2, + None, + ) + } + } + #[inline] + pub fn unk_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(BattleGroupConfigTemplate::VT_UNK_3, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_4(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + BattleGroupConfigTemplate::VT_UNK_4, + None, + ) + } + } + #[inline] + pub fn unk_5(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + BattleGroupConfigTemplate::VT_UNK_5, + None, + ) + } + } + #[inline] + pub fn unk_6(&self) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(BattleGroupConfigTemplate::VT_UNK_6, None) + } + } + #[inline] + pub fn battle_event_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(BattleGroupConfigTemplate::VT_BATTLE_EVENT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_8(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(BattleGroupConfigTemplate::VT_UNK_8, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_9(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(BattleGroupConfigTemplate::VT_UNK_9, Some(false)) + .unwrap() + } + } + #[inline] + pub fn unk_10(&self) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(BattleGroupConfigTemplate::VT_UNK_10, None) + } + } } impl flatbuffers::Verifiable for BattleGroupConfigTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::("quest_id", Self::VT_QUEST_ID, false)? - .visit_field::("unk_1", Self::VT_UNK_1, false)? - .visit_field::>("unk_2", Self::VT_UNK_2, false)? - .visit_field::("unk_3", Self::VT_UNK_3, false)? - .visit_field::>("unk_4", Self::VT_UNK_4, false)? - .visit_field::>("unk_5", Self::VT_UNK_5, false)? - .visit_field::>>>("unk_6", Self::VT_UNK_6, false)? - .visit_field::("battle_event_id", Self::VT_BATTLE_EVENT_ID, false)? - .visit_field::("unk_8", Self::VT_UNK_8, false)? - .visit_field::("unk_9", Self::VT_UNK_9, false)? - .visit_field::>>>("unk_10", Self::VT_UNK_10, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::("quest_id", Self::VT_QUEST_ID, false)? + .visit_field::("unk_1", Self::VT_UNK_1, false)? + .visit_field::>("unk_2", Self::VT_UNK_2, false)? + .visit_field::("unk_3", Self::VT_UNK_3, false)? + .visit_field::>("unk_4", Self::VT_UNK_4, false)? + .visit_field::>("unk_5", Self::VT_UNK_5, false)? + .visit_field::>, + >>("unk_6", Self::VT_UNK_6, false)? + .visit_field::("battle_event_id", Self::VT_BATTLE_EVENT_ID, false)? + .visit_field::("unk_8", Self::VT_UNK_8, false)? + .visit_field::("unk_9", Self::VT_UNK_9, false)? + .visit_field::>, + >>("unk_10", Self::VT_UNK_10, false)? + .finish(); + Ok(()) + } } pub struct BattleGroupConfigTemplateArgs<'a> { pub id: i32, @@ -6079,321 +8843,486 @@ pub struct BattleGroupConfigTemplateArgs<'a> { pub unk_3: i32, pub unk_4: Option>, pub unk_5: Option>, - pub unk_6: Option>>>, + pub unk_6: Option< + flatbuffers::WIPOffset>>, + >, pub battle_event_id: i32, pub unk_8: bool, pub unk_9: bool, - pub unk_10: Option>>>, + pub unk_10: Option< + flatbuffers::WIPOffset>>, + >, } impl<'a> Default for BattleGroupConfigTemplateArgs<'a> { - #[inline] - fn default() -> Self { - BattleGroupConfigTemplateArgs { - id: 0, - quest_id: 0, - unk_1: 0, - unk_2: None, - unk_3: 0, - unk_4: None, - unk_5: None, - unk_6: None, - battle_event_id: 0, - unk_8: false, - unk_9: false, - unk_10: None, + #[inline] + fn default() -> Self { + BattleGroupConfigTemplateArgs { + id: 0, + quest_id: 0, + unk_1: 0, + unk_2: None, + unk_3: 0, + unk_4: None, + unk_5: None, + unk_6: None, + battle_event_id: 0, + unk_8: false, + unk_9: false, + unk_10: None, + } } - } } pub struct BattleGroupConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BattleGroupConfigTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(BattleGroupConfigTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_quest_id(&mut self, quest_id: i32) { - self.fbb_.push_slot::(BattleGroupConfigTemplate::VT_QUEST_ID, quest_id, 0); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: i32) { - self.fbb_.push_slot::(BattleGroupConfigTemplate::VT_UNK_1, unk_1, 0); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(BattleGroupConfigTemplate::VT_UNK_2, unk_2); - } - #[inline] - pub fn add_unk_3(&mut self, unk_3: i32) { - self.fbb_.push_slot::(BattleGroupConfigTemplate::VT_UNK_3, unk_3, 0); - } - #[inline] - pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(BattleGroupConfigTemplate::VT_UNK_4, unk_4); - } - #[inline] - pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(BattleGroupConfigTemplate::VT_UNK_5, unk_5); - } - #[inline] - pub fn add_unk_6(&mut self, unk_6: flatbuffers::WIPOffset>>) { - self.fbb_.push_slot_always::>(BattleGroupConfigTemplate::VT_UNK_6, unk_6); - } - #[inline] - pub fn add_battle_event_id(&mut self, battle_event_id: i32) { - self.fbb_.push_slot::(BattleGroupConfigTemplate::VT_BATTLE_EVENT_ID, battle_event_id, 0); - } - #[inline] - pub fn add_unk_8(&mut self, unk_8: bool) { - self.fbb_.push_slot::(BattleGroupConfigTemplate::VT_UNK_8, unk_8, false); - } - #[inline] - pub fn add_unk_9(&mut self, unk_9: bool) { - self.fbb_.push_slot::(BattleGroupConfigTemplate::VT_UNK_9, unk_9, false); - } - #[inline] - pub fn add_unk_10(&mut self, unk_10: flatbuffers::WIPOffset>>) { - self.fbb_.push_slot_always::>(BattleGroupConfigTemplate::VT_UNK_10, unk_10); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BattleGroupConfigTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - BattleGroupConfigTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_ + .push_slot::(BattleGroupConfigTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_quest_id(&mut self, quest_id: i32) { + self.fbb_ + .push_slot::(BattleGroupConfigTemplate::VT_QUEST_ID, quest_id, 0); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: i32) { + self.fbb_ + .push_slot::(BattleGroupConfigTemplate::VT_UNK_1, unk_1, 0); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + BattleGroupConfigTemplate::VT_UNK_2, + unk_2, + ); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: i32) { + self.fbb_ + .push_slot::(BattleGroupConfigTemplate::VT_UNK_3, unk_3, 0); + } + #[inline] + pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + BattleGroupConfigTemplate::VT_UNK_4, + unk_4, + ); + } + #[inline] + pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + BattleGroupConfigTemplate::VT_UNK_5, + unk_5, + ); + } + #[inline] + pub fn add_unk_6( + &mut self, + unk_6: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_.push_slot_always::>( + BattleGroupConfigTemplate::VT_UNK_6, + unk_6, + ); + } + #[inline] + pub fn add_battle_event_id(&mut self, battle_event_id: i32) { + self.fbb_.push_slot::( + BattleGroupConfigTemplate::VT_BATTLE_EVENT_ID, + battle_event_id, + 0, + ); + } + #[inline] + pub fn add_unk_8(&mut self, unk_8: bool) { + self.fbb_ + .push_slot::(BattleGroupConfigTemplate::VT_UNK_8, unk_8, false); + } + #[inline] + pub fn add_unk_9(&mut self, unk_9: bool) { + self.fbb_ + .push_slot::(BattleGroupConfigTemplate::VT_UNK_9, unk_9, false); + } + #[inline] + pub fn add_unk_10( + &mut self, + unk_10: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_.push_slot_always::>( + BattleGroupConfigTemplate::VT_UNK_10, + unk_10, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> BattleGroupConfigTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + BattleGroupConfigTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for BattleGroupConfigTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("BattleGroupConfigTemplate"); - ds.field("id", &self.id()); - ds.field("quest_id", &self.quest_id()); - ds.field("unk_1", &self.unk_1()); - ds.field("unk_2", &self.unk_2()); - ds.field("unk_3", &self.unk_3()); - ds.field("unk_4", &self.unk_4()); - ds.field("unk_5", &self.unk_5()); - ds.field("unk_6", &self.unk_6()); - ds.field("battle_event_id", &self.battle_event_id()); - ds.field("unk_8", &self.unk_8()); - ds.field("unk_9", &self.unk_9()); - ds.field("unk_10", &self.unk_10()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("BattleGroupConfigTemplate"); + ds.field("id", &self.id()); + ds.field("quest_id", &self.quest_id()); + ds.field("unk_1", &self.unk_1()); + ds.field("unk_2", &self.unk_2()); + ds.field("unk_3", &self.unk_3()); + ds.field("unk_4", &self.unk_4()); + ds.field("unk_5", &self.unk_5()); + ds.field("unk_6", &self.unk_6()); + ds.field("battle_event_id", &self.battle_event_id()); + ds.field("unk_8", &self.unk_8()); + ds.field("unk_9", &self.unk_9()); + ds.field("unk_10", &self.unk_10()); + ds.finish() + } } pub enum MusicPlayerConfigTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct MusicPlayerConfigTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for MusicPlayerConfigTemplate<'a> { - type Inner = MusicPlayerConfigTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = MusicPlayerConfigTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> MusicPlayerConfigTemplate<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_GROUP_ID: flatbuffers::VOffsetT = 6; - pub const VT_UNK_1: flatbuffers::VOffsetT = 8; - pub const VT_PLAY_TAG: flatbuffers::VOffsetT = 10; - pub const VT_PAUSE_TAG: flatbuffers::VOffsetT = 12; - pub const VT_RESUME_TAG: flatbuffers::VOffsetT = 14; - pub const VT_STOP_ALL_TAG: flatbuffers::VOffsetT = 16; - pub const VT_PLAY_VOLUME: flatbuffers::VOffsetT = 18; - pub const VT_UNK_2: flatbuffers::VOffsetT = 20; - pub const VT_UNK_3: flatbuffers::VOffsetT = 22; - pub const VT_UNLOCK_CONDITION: flatbuffers::VOffsetT = 24; - pub const VT_NAME: flatbuffers::VOffsetT = 26; - pub const VT_UNK_4: flatbuffers::VOffsetT = 28; - pub const VT_UNK_5: flatbuffers::VOffsetT = 30; - pub const VT_UNK_6: flatbuffers::VOffsetT = 32; - pub const VT_UNK_7: flatbuffers::VOffsetT = 34; + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_GROUP_ID: flatbuffers::VOffsetT = 6; + pub const VT_UNK_1: flatbuffers::VOffsetT = 8; + pub const VT_PLAY_TAG: flatbuffers::VOffsetT = 10; + pub const VT_PAUSE_TAG: flatbuffers::VOffsetT = 12; + pub const VT_RESUME_TAG: flatbuffers::VOffsetT = 14; + pub const VT_STOP_ALL_TAG: flatbuffers::VOffsetT = 16; + pub const VT_PLAY_VOLUME: flatbuffers::VOffsetT = 18; + pub const VT_UNK_2: flatbuffers::VOffsetT = 20; + pub const VT_UNK_3: flatbuffers::VOffsetT = 22; + pub const VT_UNLOCK_CONDITION: flatbuffers::VOffsetT = 24; + pub const VT_NAME: flatbuffers::VOffsetT = 26; + pub const VT_UNK_4: flatbuffers::VOffsetT = 28; + pub const VT_UNK_5: flatbuffers::VOffsetT = 30; + pub const VT_UNK_6: flatbuffers::VOffsetT = 32; + pub const VT_UNK_7: flatbuffers::VOffsetT = 34; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - MusicPlayerConfigTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args MusicPlayerConfigTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = MusicPlayerConfigTemplateBuilder::new(_fbb); - builder.add_unk_6(args.unk_6); - if let Some(x) = args.unk_7 { builder.add_unk_7(x); } - if let Some(x) = args.unk_5 { builder.add_unk_5(x); } - if let Some(x) = args.unk_4 { builder.add_unk_4(x); } - if let Some(x) = args.name { builder.add_name(x); } - if let Some(x) = args.unlock_condition { builder.add_unlock_condition(x); } - builder.add_unk_3(args.unk_3); - if let Some(x) = args.unk_2 { builder.add_unk_2(x); } - if let Some(x) = args.play_volume { builder.add_play_volume(x); } - if let Some(x) = args.stop_all_tag { builder.add_stop_all_tag(x); } - if let Some(x) = args.resume_tag { builder.add_resume_tag(x); } - if let Some(x) = args.pause_tag { builder.add_pause_tag(x); } - if let Some(x) = args.play_tag { builder.add_play_tag(x); } - if let Some(x) = args.unk_1 { builder.add_unk_1(x); } - builder.add_group_id(args.group_id); - builder.add_id(args.id); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + MusicPlayerConfigTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args MusicPlayerConfigTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = MusicPlayerConfigTemplateBuilder::new(_fbb); + builder.add_unk_6(args.unk_6); + if let Some(x) = args.unk_7 { + builder.add_unk_7(x); + } + if let Some(x) = args.unk_5 { + builder.add_unk_5(x); + } + if let Some(x) = args.unk_4 { + builder.add_unk_4(x); + } + if let Some(x) = args.name { + builder.add_name(x); + } + if let Some(x) = args.unlock_condition { + builder.add_unlock_condition(x); + } + builder.add_unk_3(args.unk_3); + if let Some(x) = args.unk_2 { + builder.add_unk_2(x); + } + if let Some(x) = args.play_volume { + builder.add_play_volume(x); + } + if let Some(x) = args.stop_all_tag { + builder.add_stop_all_tag(x); + } + if let Some(x) = args.resume_tag { + builder.add_resume_tag(x); + } + if let Some(x) = args.pause_tag { + builder.add_pause_tag(x); + } + if let Some(x) = args.play_tag { + builder.add_play_tag(x); + } + if let Some(x) = args.unk_1 { + builder.add_unk_1(x); + } + builder.add_group_id(args.group_id); + builder.add_id(args.id); + builder.finish() + } - - #[inline] - pub fn id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(MusicPlayerConfigTemplate::VT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn group_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(MusicPlayerConfigTemplate::VT_GROUP_ID, Some(0)).unwrap()} - } - #[inline] - pub fn unk_1(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MusicPlayerConfigTemplate::VT_UNK_1, None)} - } - #[inline] - pub fn play_tag(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MusicPlayerConfigTemplate::VT_PLAY_TAG, None)} - } - #[inline] - pub fn pause_tag(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MusicPlayerConfigTemplate::VT_PAUSE_TAG, None)} - } - #[inline] - pub fn resume_tag(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MusicPlayerConfigTemplate::VT_RESUME_TAG, None)} - } - #[inline] - pub fn stop_all_tag(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MusicPlayerConfigTemplate::VT_STOP_ALL_TAG, None)} - } - #[inline] - pub fn play_volume(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MusicPlayerConfigTemplate::VT_PLAY_VOLUME, None)} - } - #[inline] - pub fn unk_2(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MusicPlayerConfigTemplate::VT_UNK_2, None)} - } - #[inline] - pub fn unk_3(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(MusicPlayerConfigTemplate::VT_UNK_3, Some(0)).unwrap()} - } - #[inline] - pub fn unlock_condition(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MusicPlayerConfigTemplate::VT_UNLOCK_CONDITION, None)} - } - #[inline] - pub fn name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MusicPlayerConfigTemplate::VT_NAME, None)} - } - #[inline] - pub fn unk_4(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MusicPlayerConfigTemplate::VT_UNK_4, None)} - } - #[inline] - pub fn unk_5(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MusicPlayerConfigTemplate::VT_UNK_5, None)} - } - #[inline] - pub fn unk_6(&self) -> i64 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(MusicPlayerConfigTemplate::VT_UNK_6, Some(0)).unwrap()} - } - #[inline] - pub fn unk_7(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(MusicPlayerConfigTemplate::VT_UNK_7, None)} - } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(MusicPlayerConfigTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn group_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(MusicPlayerConfigTemplate::VT_GROUP_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_1(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MusicPlayerConfigTemplate::VT_UNK_1, + None, + ) + } + } + #[inline] + pub fn play_tag(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MusicPlayerConfigTemplate::VT_PLAY_TAG, + None, + ) + } + } + #[inline] + pub fn pause_tag(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MusicPlayerConfigTemplate::VT_PAUSE_TAG, + None, + ) + } + } + #[inline] + pub fn resume_tag(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MusicPlayerConfigTemplate::VT_RESUME_TAG, + None, + ) + } + } + #[inline] + pub fn stop_all_tag(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MusicPlayerConfigTemplate::VT_STOP_ALL_TAG, + None, + ) + } + } + #[inline] + pub fn play_volume(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MusicPlayerConfigTemplate::VT_PLAY_VOLUME, + None, + ) + } + } + #[inline] + pub fn unk_2(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MusicPlayerConfigTemplate::VT_UNK_2, + None, + ) + } + } + #[inline] + pub fn unk_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(MusicPlayerConfigTemplate::VT_UNK_3, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unlock_condition(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MusicPlayerConfigTemplate::VT_UNLOCK_CONDITION, + None, + ) + } + } + #[inline] + pub fn name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(MusicPlayerConfigTemplate::VT_NAME, None) + } + } + #[inline] + pub fn unk_4(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MusicPlayerConfigTemplate::VT_UNK_4, + None, + ) + } + } + #[inline] + pub fn unk_5(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MusicPlayerConfigTemplate::VT_UNK_5, + None, + ) + } + } + #[inline] + pub fn unk_6(&self) -> i64 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(MusicPlayerConfigTemplate::VT_UNK_6, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_7(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + MusicPlayerConfigTemplate::VT_UNK_7, + None, + ) + } + } } impl flatbuffers::Verifiable for MusicPlayerConfigTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::("group_id", Self::VT_GROUP_ID, false)? - .visit_field::>("unk_1", Self::VT_UNK_1, false)? - .visit_field::>("play_tag", Self::VT_PLAY_TAG, false)? - .visit_field::>("pause_tag", Self::VT_PAUSE_TAG, false)? - .visit_field::>("resume_tag", Self::VT_RESUME_TAG, false)? - .visit_field::>("stop_all_tag", Self::VT_STOP_ALL_TAG, false)? - .visit_field::>("play_volume", Self::VT_PLAY_VOLUME, false)? - .visit_field::>("unk_2", Self::VT_UNK_2, false)? - .visit_field::("unk_3", Self::VT_UNK_3, false)? - .visit_field::>("unlock_condition", Self::VT_UNLOCK_CONDITION, false)? - .visit_field::>("name", Self::VT_NAME, false)? - .visit_field::>("unk_4", Self::VT_UNK_4, false)? - .visit_field::>("unk_5", Self::VT_UNK_5, false)? - .visit_field::("unk_6", Self::VT_UNK_6, false)? - .visit_field::>("unk_7", Self::VT_UNK_7, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::("group_id", Self::VT_GROUP_ID, false)? + .visit_field::>("unk_1", Self::VT_UNK_1, false)? + .visit_field::>( + "play_tag", + Self::VT_PLAY_TAG, + false, + )? + .visit_field::>( + "pause_tag", + Self::VT_PAUSE_TAG, + false, + )? + .visit_field::>( + "resume_tag", + Self::VT_RESUME_TAG, + false, + )? + .visit_field::>( + "stop_all_tag", + Self::VT_STOP_ALL_TAG, + false, + )? + .visit_field::>( + "play_volume", + Self::VT_PLAY_VOLUME, + false, + )? + .visit_field::>("unk_2", Self::VT_UNK_2, false)? + .visit_field::("unk_3", Self::VT_UNK_3, false)? + .visit_field::>( + "unlock_condition", + Self::VT_UNLOCK_CONDITION, + false, + )? + .visit_field::>("name", Self::VT_NAME, false)? + .visit_field::>("unk_4", Self::VT_UNK_4, false)? + .visit_field::>("unk_5", Self::VT_UNK_5, false)? + .visit_field::("unk_6", Self::VT_UNK_6, false)? + .visit_field::>("unk_7", Self::VT_UNK_7, false)? + .finish(); + Ok(()) + } } pub struct MusicPlayerConfigTemplateArgs<'a> { pub id: i32, @@ -6414,348 +9343,514 @@ pub struct MusicPlayerConfigTemplateArgs<'a> { pub unk_7: Option>, } impl<'a> Default for MusicPlayerConfigTemplateArgs<'a> { - #[inline] - fn default() -> Self { - MusicPlayerConfigTemplateArgs { - id: 0, - group_id: 0, - unk_1: None, - play_tag: None, - pause_tag: None, - resume_tag: None, - stop_all_tag: None, - play_volume: None, - unk_2: None, - unk_3: 0, - unlock_condition: None, - name: None, - unk_4: None, - unk_5: None, - unk_6: 0, - unk_7: None, + #[inline] + fn default() -> Self { + MusicPlayerConfigTemplateArgs { + id: 0, + group_id: 0, + unk_1: None, + play_tag: None, + pause_tag: None, + resume_tag: None, + stop_all_tag: None, + play_volume: None, + unk_2: None, + unk_3: 0, + unlock_condition: None, + name: None, + unk_4: None, + unk_5: None, + unk_6: 0, + unk_7: None, + } } - } } pub struct MusicPlayerConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MusicPlayerConfigTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_id(&mut self, id: i32) { - self.fbb_.push_slot::(MusicPlayerConfigTemplate::VT_ID, id, 0); - } - #[inline] - pub fn add_group_id(&mut self, group_id: i32) { - self.fbb_.push_slot::(MusicPlayerConfigTemplate::VT_GROUP_ID, group_id, 0); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplate::VT_UNK_1, unk_1); - } - #[inline] - pub fn add_play_tag(&mut self, play_tag: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplate::VT_PLAY_TAG, play_tag); - } - #[inline] - pub fn add_pause_tag(&mut self, pause_tag: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplate::VT_PAUSE_TAG, pause_tag); - } - #[inline] - pub fn add_resume_tag(&mut self, resume_tag: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplate::VT_RESUME_TAG, resume_tag); - } - #[inline] - pub fn add_stop_all_tag(&mut self, stop_all_tag: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplate::VT_STOP_ALL_TAG, stop_all_tag); - } - #[inline] - pub fn add_play_volume(&mut self, play_volume: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplate::VT_PLAY_VOLUME, play_volume); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplate::VT_UNK_2, unk_2); - } - #[inline] - pub fn add_unk_3(&mut self, unk_3: i32) { - self.fbb_.push_slot::(MusicPlayerConfigTemplate::VT_UNK_3, unk_3, 0); - } - #[inline] - pub fn add_unlock_condition(&mut self, unlock_condition: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplate::VT_UNLOCK_CONDITION, unlock_condition); - } - #[inline] - pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplate::VT_NAME, name); - } - #[inline] - pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplate::VT_UNK_4, unk_4); - } - #[inline] - pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplate::VT_UNK_5, unk_5); - } - #[inline] - pub fn add_unk_6(&mut self, unk_6: i64) { - self.fbb_.push_slot::(MusicPlayerConfigTemplate::VT_UNK_6, unk_6, 0); - } - #[inline] - pub fn add_unk_7(&mut self, unk_7: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplate::VT_UNK_7, unk_7); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MusicPlayerConfigTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - MusicPlayerConfigTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_ + .push_slot::(MusicPlayerConfigTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_group_id(&mut self, group_id: i32) { + self.fbb_ + .push_slot::(MusicPlayerConfigTemplate::VT_GROUP_ID, group_id, 0); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplate::VT_UNK_1, + unk_1, + ); + } + #[inline] + pub fn add_play_tag(&mut self, play_tag: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplate::VT_PLAY_TAG, + play_tag, + ); + } + #[inline] + pub fn add_pause_tag(&mut self, pause_tag: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplate::VT_PAUSE_TAG, + pause_tag, + ); + } + #[inline] + pub fn add_resume_tag(&mut self, resume_tag: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplate::VT_RESUME_TAG, + resume_tag, + ); + } + #[inline] + pub fn add_stop_all_tag(&mut self, stop_all_tag: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplate::VT_STOP_ALL_TAG, + stop_all_tag, + ); + } + #[inline] + pub fn add_play_volume(&mut self, play_volume: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplate::VT_PLAY_VOLUME, + play_volume, + ); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplate::VT_UNK_2, + unk_2, + ); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: i32) { + self.fbb_ + .push_slot::(MusicPlayerConfigTemplate::VT_UNK_3, unk_3, 0); + } + #[inline] + pub fn add_unlock_condition(&mut self, unlock_condition: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplate::VT_UNLOCK_CONDITION, + unlock_condition, + ); + } + #[inline] + pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplate::VT_NAME, + name, + ); + } + #[inline] + pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplate::VT_UNK_4, + unk_4, + ); + } + #[inline] + pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplate::VT_UNK_5, + unk_5, + ); + } + #[inline] + pub fn add_unk_6(&mut self, unk_6: i64) { + self.fbb_ + .push_slot::(MusicPlayerConfigTemplate::VT_UNK_6, unk_6, 0); + } + #[inline] + pub fn add_unk_7(&mut self, unk_7: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplate::VT_UNK_7, + unk_7, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> MusicPlayerConfigTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + MusicPlayerConfigTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for MusicPlayerConfigTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("MusicPlayerConfigTemplate"); - ds.field("id", &self.id()); - ds.field("group_id", &self.group_id()); - ds.field("unk_1", &self.unk_1()); - ds.field("play_tag", &self.play_tag()); - ds.field("pause_tag", &self.pause_tag()); - ds.field("resume_tag", &self.resume_tag()); - ds.field("stop_all_tag", &self.stop_all_tag()); - ds.field("play_volume", &self.play_volume()); - ds.field("unk_2", &self.unk_2()); - ds.field("unk_3", &self.unk_3()); - ds.field("unlock_condition", &self.unlock_condition()); - ds.field("name", &self.name()); - ds.field("unk_4", &self.unk_4()); - ds.field("unk_5", &self.unk_5()); - ds.field("unk_6", &self.unk_6()); - ds.field("unk_7", &self.unk_7()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("MusicPlayerConfigTemplate"); + ds.field("id", &self.id()); + ds.field("group_id", &self.group_id()); + ds.field("unk_1", &self.unk_1()); + ds.field("play_tag", &self.play_tag()); + ds.field("pause_tag", &self.pause_tag()); + ds.field("resume_tag", &self.resume_tag()); + ds.field("stop_all_tag", &self.stop_all_tag()); + ds.field("play_volume", &self.play_volume()); + ds.field("unk_2", &self.unk_2()); + ds.field("unk_3", &self.unk_3()); + ds.field("unlock_condition", &self.unlock_condition()); + ds.field("name", &self.name()); + ds.field("unk_4", &self.unk_4()); + ds.field("unk_5", &self.unk_5()); + ds.field("unk_6", &self.unk_6()); + ds.field("unk_7", &self.unk_7()); + ds.finish() + } } pub enum TeleportConfigTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct TeleportConfigTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for TeleportConfigTemplate<'a> { - type Inner = TeleportConfigTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = TeleportConfigTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> TeleportConfigTemplate<'a> { - pub const VT_TELEPORT_ID: flatbuffers::VOffsetT = 4; - pub const VT_UNK_1: flatbuffers::VOffsetT = 6; - pub const VT_CLIENT_VISIBLE: flatbuffers::VOffsetT = 8; - pub const VT_UNLOCK_CONDITION: flatbuffers::VOffsetT = 10; - pub const VT_TELEPORT_NAME: flatbuffers::VOffsetT = 12; - pub const VT_TELEPORT_ICON: flatbuffers::VOffsetT = 14; - pub const VT_UNK_2: flatbuffers::VOffsetT = 16; - pub const VT_SECTION_ID: flatbuffers::VOffsetT = 18; - pub const VT_TRANSFORM_ID: flatbuffers::VOffsetT = 20; - pub const VT_UNK_3: flatbuffers::VOffsetT = 22; - pub const VT_UNK_4: flatbuffers::VOffsetT = 24; - pub const VT_UNK_5: flatbuffers::VOffsetT = 26; - pub const VT_UNK_6: flatbuffers::VOffsetT = 28; - pub const VT_UNK_7: flatbuffers::VOffsetT = 30; - pub const VT_UNK_8: flatbuffers::VOffsetT = 32; - pub const VT_UNK_9: flatbuffers::VOffsetT = 34; - pub const VT_UNK_10: flatbuffers::VOffsetT = 36; + pub const VT_TELEPORT_ID: flatbuffers::VOffsetT = 4; + pub const VT_UNK_1: flatbuffers::VOffsetT = 6; + pub const VT_CLIENT_VISIBLE: flatbuffers::VOffsetT = 8; + pub const VT_UNLOCK_CONDITION: flatbuffers::VOffsetT = 10; + pub const VT_TELEPORT_NAME: flatbuffers::VOffsetT = 12; + pub const VT_TELEPORT_ICON: flatbuffers::VOffsetT = 14; + pub const VT_UNK_2: flatbuffers::VOffsetT = 16; + pub const VT_SECTION_ID: flatbuffers::VOffsetT = 18; + pub const VT_TRANSFORM_ID: flatbuffers::VOffsetT = 20; + pub const VT_UNK_3: flatbuffers::VOffsetT = 22; + pub const VT_UNK_4: flatbuffers::VOffsetT = 24; + pub const VT_UNK_5: flatbuffers::VOffsetT = 26; + pub const VT_UNK_6: flatbuffers::VOffsetT = 28; + pub const VT_UNK_7: flatbuffers::VOffsetT = 30; + pub const VT_UNK_8: flatbuffers::VOffsetT = 32; + pub const VT_UNK_9: flatbuffers::VOffsetT = 34; + pub const VT_UNK_10: flatbuffers::VOffsetT = 36; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - TeleportConfigTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args TeleportConfigTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = TeleportConfigTemplateBuilder::new(_fbb); - builder.add_unk_10(args.unk_10); - if let Some(x) = args.unk_9 { builder.add_unk_9(x); } - builder.add_unk_8(args.unk_8); - builder.add_unk_7(args.unk_7); - if let Some(x) = args.unk_6 { builder.add_unk_6(x); } - if let Some(x) = args.unk_5 { builder.add_unk_5(x); } - if let Some(x) = args.unk_4 { builder.add_unk_4(x); } - if let Some(x) = args.unk_3 { builder.add_unk_3(x); } - builder.add_transform_id(args.transform_id); - builder.add_section_id(args.section_id); - builder.add_unk_2(args.unk_2); - if let Some(x) = args.teleport_icon { builder.add_teleport_icon(x); } - if let Some(x) = args.teleport_name { builder.add_teleport_name(x); } - if let Some(x) = args.unlock_condition { builder.add_unlock_condition(x); } - builder.add_client_visible(args.client_visible); - builder.add_unk_1(args.unk_1); - builder.add_teleport_id(args.teleport_id); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TeleportConfigTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args TeleportConfigTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = TeleportConfigTemplateBuilder::new(_fbb); + builder.add_unk_10(args.unk_10); + if let Some(x) = args.unk_9 { + builder.add_unk_9(x); + } + builder.add_unk_8(args.unk_8); + builder.add_unk_7(args.unk_7); + if let Some(x) = args.unk_6 { + builder.add_unk_6(x); + } + if let Some(x) = args.unk_5 { + builder.add_unk_5(x); + } + if let Some(x) = args.unk_4 { + builder.add_unk_4(x); + } + if let Some(x) = args.unk_3 { + builder.add_unk_3(x); + } + builder.add_transform_id(args.transform_id); + builder.add_section_id(args.section_id); + builder.add_unk_2(args.unk_2); + if let Some(x) = args.teleport_icon { + builder.add_teleport_icon(x); + } + if let Some(x) = args.teleport_name { + builder.add_teleport_name(x); + } + if let Some(x) = args.unlock_condition { + builder.add_unlock_condition(x); + } + builder.add_client_visible(args.client_visible); + builder.add_unk_1(args.unk_1); + builder.add_teleport_id(args.teleport_id); + builder.finish() + } - - #[inline] - pub fn teleport_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TeleportConfigTemplate::VT_TELEPORT_ID, Some(0)).unwrap()} - } - #[inline] - pub fn unk_1(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TeleportConfigTemplate::VT_UNK_1, Some(0)).unwrap()} - } - #[inline] - pub fn client_visible(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TeleportConfigTemplate::VT_CLIENT_VISIBLE, Some(0)).unwrap()} - } - #[inline] - pub fn unlock_condition(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(TeleportConfigTemplate::VT_UNLOCK_CONDITION, None)} - } - #[inline] - pub fn teleport_name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(TeleportConfigTemplate::VT_TELEPORT_NAME, None)} - } - #[inline] - pub fn teleport_icon(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(TeleportConfigTemplate::VT_TELEPORT_ICON, None)} - } - #[inline] - pub fn unk_2(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TeleportConfigTemplate::VT_UNK_2, Some(0)).unwrap()} - } - #[inline] - pub fn section_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TeleportConfigTemplate::VT_SECTION_ID, Some(0)).unwrap()} - } - #[inline] - pub fn transform_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TeleportConfigTemplate::VT_TRANSFORM_ID, Some(0)).unwrap()} - } - #[inline] - pub fn unk_3(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(TeleportConfigTemplate::VT_UNK_3, None)} - } - #[inline] - pub fn unk_4(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(TeleportConfigTemplate::VT_UNK_4, None)} - } - #[inline] - pub fn unk_5(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(TeleportConfigTemplate::VT_UNK_5, None)} - } - #[inline] - pub fn unk_6(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(TeleportConfigTemplate::VT_UNK_6, None)} - } - #[inline] - pub fn unk_7(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TeleportConfigTemplate::VT_UNK_7, Some(0)).unwrap()} - } - #[inline] - pub fn unk_8(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TeleportConfigTemplate::VT_UNK_8, Some(0)).unwrap()} - } - #[inline] - pub fn unk_9(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(TeleportConfigTemplate::VT_UNK_9, None)} - } - #[inline] - pub fn unk_10(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(TeleportConfigTemplate::VT_UNK_10, Some(0)).unwrap()} - } + #[inline] + pub fn teleport_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(TeleportConfigTemplate::VT_TELEPORT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_1(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(TeleportConfigTemplate::VT_UNK_1, Some(0)) + .unwrap() + } + } + #[inline] + pub fn client_visible(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(TeleportConfigTemplate::VT_CLIENT_VISIBLE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unlock_condition(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + TeleportConfigTemplate::VT_UNLOCK_CONDITION, + None, + ) + } + } + #[inline] + pub fn teleport_name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + TeleportConfigTemplate::VT_TELEPORT_NAME, + None, + ) + } + } + #[inline] + pub fn teleport_icon(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + TeleportConfigTemplate::VT_TELEPORT_ICON, + None, + ) + } + } + #[inline] + pub fn unk_2(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(TeleportConfigTemplate::VT_UNK_2, Some(0)) + .unwrap() + } + } + #[inline] + pub fn section_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(TeleportConfigTemplate::VT_SECTION_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn transform_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(TeleportConfigTemplate::VT_TRANSFORM_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_3(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(TeleportConfigTemplate::VT_UNK_3, None) + } + } + #[inline] + pub fn unk_4(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + TeleportConfigTemplate::VT_UNK_4, + None, + ) + } + } + #[inline] + pub fn unk_5(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + TeleportConfigTemplate::VT_UNK_5, + None, + ) + } + } + #[inline] + pub fn unk_6(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + TeleportConfigTemplate::VT_UNK_6, + None, + ) + } + } + #[inline] + pub fn unk_7(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(TeleportConfigTemplate::VT_UNK_7, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_8(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(TeleportConfigTemplate::VT_UNK_8, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_9(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + TeleportConfigTemplate::VT_UNK_9, + None, + ) + } + } + #[inline] + pub fn unk_10(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(TeleportConfigTemplate::VT_UNK_10, Some(0)) + .unwrap() + } + } } impl flatbuffers::Verifiable for TeleportConfigTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("teleport_id", Self::VT_TELEPORT_ID, false)? - .visit_field::("unk_1", Self::VT_UNK_1, false)? - .visit_field::("client_visible", Self::VT_CLIENT_VISIBLE, false)? - .visit_field::>("unlock_condition", Self::VT_UNLOCK_CONDITION, false)? - .visit_field::>("teleport_name", Self::VT_TELEPORT_NAME, false)? - .visit_field::>("teleport_icon", Self::VT_TELEPORT_ICON, false)? - .visit_field::("unk_2", Self::VT_UNK_2, false)? - .visit_field::("section_id", Self::VT_SECTION_ID, false)? - .visit_field::("transform_id", Self::VT_TRANSFORM_ID, false)? - .visit_field::>("unk_3", Self::VT_UNK_3, false)? - .visit_field::>>("unk_4", Self::VT_UNK_4, false)? - .visit_field::>>("unk_5", Self::VT_UNK_5, false)? - .visit_field::>>("unk_6", Self::VT_UNK_6, false)? - .visit_field::("unk_7", Self::VT_UNK_7, false)? - .visit_field::("unk_8", Self::VT_UNK_8, false)? - .visit_field::>>("unk_9", Self::VT_UNK_9, false)? - .visit_field::("unk_10", Self::VT_UNK_10, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("teleport_id", Self::VT_TELEPORT_ID, false)? + .visit_field::("unk_1", Self::VT_UNK_1, false)? + .visit_field::("client_visible", Self::VT_CLIENT_VISIBLE, false)? + .visit_field::>( + "unlock_condition", + Self::VT_UNLOCK_CONDITION, + false, + )? + .visit_field::>( + "teleport_name", + Self::VT_TELEPORT_NAME, + false, + )? + .visit_field::>( + "teleport_icon", + Self::VT_TELEPORT_ICON, + false, + )? + .visit_field::("unk_2", Self::VT_UNK_2, false)? + .visit_field::("section_id", Self::VT_SECTION_ID, false)? + .visit_field::("transform_id", Self::VT_TRANSFORM_ID, false)? + .visit_field::>("unk_3", Self::VT_UNK_3, false)? + .visit_field::>>( + "unk_4", + Self::VT_UNK_4, + false, + )? + .visit_field::>>( + "unk_5", + Self::VT_UNK_5, + false, + )? + .visit_field::>>( + "unk_6", + Self::VT_UNK_6, + false, + )? + .visit_field::("unk_7", Self::VT_UNK_7, false)? + .visit_field::("unk_8", Self::VT_UNK_8, false)? + .visit_field::>>( + "unk_9", + Self::VT_UNK_9, + false, + )? + .visit_field::("unk_10", Self::VT_UNK_10, false)? + .finish(); + Ok(()) + } } pub struct TeleportConfigTemplateArgs<'a> { pub teleport_id: i32, @@ -6777,254 +9872,325 @@ pub struct TeleportConfigTemplateArgs<'a> { pub unk_10: i32, } impl<'a> Default for TeleportConfigTemplateArgs<'a> { - #[inline] - fn default() -> Self { - TeleportConfigTemplateArgs { - teleport_id: 0, - unk_1: 0, - client_visible: 0, - unlock_condition: None, - teleport_name: None, - teleport_icon: None, - unk_2: 0, - section_id: 0, - transform_id: 0, - unk_3: None, - unk_4: None, - unk_5: None, - unk_6: None, - unk_7: 0, - unk_8: 0, - unk_9: None, - unk_10: 0, + #[inline] + fn default() -> Self { + TeleportConfigTemplateArgs { + teleport_id: 0, + unk_1: 0, + client_visible: 0, + unlock_condition: None, + teleport_name: None, + teleport_icon: None, + unk_2: 0, + section_id: 0, + transform_id: 0, + unk_3: None, + unk_4: None, + unk_5: None, + unk_6: None, + unk_7: 0, + unk_8: 0, + unk_9: None, + unk_10: 0, + } } - } } pub struct TeleportConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TeleportConfigTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_teleport_id(&mut self, teleport_id: i32) { - self.fbb_.push_slot::(TeleportConfigTemplate::VT_TELEPORT_ID, teleport_id, 0); - } - #[inline] - pub fn add_unk_1(&mut self, unk_1: i32) { - self.fbb_.push_slot::(TeleportConfigTemplate::VT_UNK_1, unk_1, 0); - } - #[inline] - pub fn add_client_visible(&mut self, client_visible: i32) { - self.fbb_.push_slot::(TeleportConfigTemplate::VT_CLIENT_VISIBLE, client_visible, 0); - } - #[inline] - pub fn add_unlock_condition(&mut self, unlock_condition: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(TeleportConfigTemplate::VT_UNLOCK_CONDITION, unlock_condition); - } - #[inline] - pub fn add_teleport_name(&mut self, teleport_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(TeleportConfigTemplate::VT_TELEPORT_NAME, teleport_name); - } - #[inline] - pub fn add_teleport_icon(&mut self, teleport_icon: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(TeleportConfigTemplate::VT_TELEPORT_ICON, teleport_icon); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: i32) { - self.fbb_.push_slot::(TeleportConfigTemplate::VT_UNK_2, unk_2, 0); - } - #[inline] - pub fn add_section_id(&mut self, section_id: i32) { - self.fbb_.push_slot::(TeleportConfigTemplate::VT_SECTION_ID, section_id, 0); - } - #[inline] - pub fn add_transform_id(&mut self, transform_id: i32) { - self.fbb_.push_slot::(TeleportConfigTemplate::VT_TRANSFORM_ID, transform_id, 0); - } - #[inline] - pub fn add_unk_3(&mut self, unk_3: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(TeleportConfigTemplate::VT_UNK_3, unk_3); - } - #[inline] - pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(TeleportConfigTemplate::VT_UNK_4, unk_4); - } - #[inline] - pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(TeleportConfigTemplate::VT_UNK_5, unk_5); - } - #[inline] - pub fn add_unk_6(&mut self, unk_6: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(TeleportConfigTemplate::VT_UNK_6, unk_6); - } - #[inline] - pub fn add_unk_7(&mut self, unk_7: i32) { - self.fbb_.push_slot::(TeleportConfigTemplate::VT_UNK_7, unk_7, 0); - } - #[inline] - pub fn add_unk_8(&mut self, unk_8: i32) { - self.fbb_.push_slot::(TeleportConfigTemplate::VT_UNK_8, unk_8, 0); - } - #[inline] - pub fn add_unk_9(&mut self, unk_9: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(TeleportConfigTemplate::VT_UNK_9, unk_9); - } - #[inline] - pub fn add_unk_10(&mut self, unk_10: i32) { - self.fbb_.push_slot::(TeleportConfigTemplate::VT_UNK_10, unk_10, 0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TeleportConfigTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - TeleportConfigTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_teleport_id(&mut self, teleport_id: i32) { + self.fbb_ + .push_slot::(TeleportConfigTemplate::VT_TELEPORT_ID, teleport_id, 0); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: i32) { + self.fbb_ + .push_slot::(TeleportConfigTemplate::VT_UNK_1, unk_1, 0); + } + #[inline] + pub fn add_client_visible(&mut self, client_visible: i32) { + self.fbb_ + .push_slot::(TeleportConfigTemplate::VT_CLIENT_VISIBLE, client_visible, 0); + } + #[inline] + pub fn add_unlock_condition(&mut self, unlock_condition: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + TeleportConfigTemplate::VT_UNLOCK_CONDITION, + unlock_condition, + ); + } + #[inline] + pub fn add_teleport_name(&mut self, teleport_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + TeleportConfigTemplate::VT_TELEPORT_NAME, + teleport_name, + ); + } + #[inline] + pub fn add_teleport_icon(&mut self, teleport_icon: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + TeleportConfigTemplate::VT_TELEPORT_ICON, + teleport_icon, + ); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: i32) { + self.fbb_ + .push_slot::(TeleportConfigTemplate::VT_UNK_2, unk_2, 0); + } + #[inline] + pub fn add_section_id(&mut self, section_id: i32) { + self.fbb_ + .push_slot::(TeleportConfigTemplate::VT_SECTION_ID, section_id, 0); + } + #[inline] + pub fn add_transform_id(&mut self, transform_id: i32) { + self.fbb_ + .push_slot::(TeleportConfigTemplate::VT_TRANSFORM_ID, transform_id, 0); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(TeleportConfigTemplate::VT_UNK_3, unk_3); + } + #[inline] + pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(TeleportConfigTemplate::VT_UNK_4, unk_4); + } + #[inline] + pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(TeleportConfigTemplate::VT_UNK_5, unk_5); + } + #[inline] + pub fn add_unk_6(&mut self, unk_6: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(TeleportConfigTemplate::VT_UNK_6, unk_6); + } + #[inline] + pub fn add_unk_7(&mut self, unk_7: i32) { + self.fbb_ + .push_slot::(TeleportConfigTemplate::VT_UNK_7, unk_7, 0); + } + #[inline] + pub fn add_unk_8(&mut self, unk_8: i32) { + self.fbb_ + .push_slot::(TeleportConfigTemplate::VT_UNK_8, unk_8, 0); + } + #[inline] + pub fn add_unk_9(&mut self, unk_9: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(TeleportConfigTemplate::VT_UNK_9, unk_9); + } + #[inline] + pub fn add_unk_10(&mut self, unk_10: i32) { + self.fbb_ + .push_slot::(TeleportConfigTemplate::VT_UNK_10, unk_10, 0); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> TeleportConfigTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + TeleportConfigTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for TeleportConfigTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("TeleportConfigTemplate"); - ds.field("teleport_id", &self.teleport_id()); - ds.field("unk_1", &self.unk_1()); - ds.field("client_visible", &self.client_visible()); - ds.field("unlock_condition", &self.unlock_condition()); - ds.field("teleport_name", &self.teleport_name()); - ds.field("teleport_icon", &self.teleport_icon()); - ds.field("unk_2", &self.unk_2()); - ds.field("section_id", &self.section_id()); - ds.field("transform_id", &self.transform_id()); - ds.field("unk_3", &self.unk_3()); - ds.field("unk_4", &self.unk_4()); - ds.field("unk_5", &self.unk_5()); - ds.field("unk_6", &self.unk_6()); - ds.field("unk_7", &self.unk_7()); - ds.field("unk_8", &self.unk_8()); - ds.field("unk_9", &self.unk_9()); - ds.field("unk_10", &self.unk_10()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("TeleportConfigTemplate"); + ds.field("teleport_id", &self.teleport_id()); + ds.field("unk_1", &self.unk_1()); + ds.field("client_visible", &self.client_visible()); + ds.field("unlock_condition", &self.unlock_condition()); + ds.field("teleport_name", &self.teleport_name()); + ds.field("teleport_icon", &self.teleport_icon()); + ds.field("unk_2", &self.unk_2()); + ds.field("section_id", &self.section_id()); + ds.field("transform_id", &self.transform_id()); + ds.field("unk_3", &self.unk_3()); + ds.field("unk_4", &self.unk_4()); + ds.field("unk_5", &self.unk_5()); + ds.field("unk_6", &self.unk_6()); + ds.field("unk_7", &self.unk_7()); + ds.field("unk_8", &self.unk_8()); + ds.field("unk_9", &self.unk_9()); + ds.field("unk_10", &self.unk_10()); + ds.finish() + } } pub enum ConditionConfigTemplateOffset {} #[derive(Copy, Clone, PartialEq)] pub struct ConditionConfigTemplate<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for ConditionConfigTemplate<'a> { - type Inner = ConditionConfigTemplate<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = ConditionConfigTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> ConditionConfigTemplate<'a> { - pub const VT_CONDITION_ID: flatbuffers::VOffsetT = 4; - pub const VT_ARGS: flatbuffers::VOffsetT = 6; - pub const VT_COMMENTARY: flatbuffers::VOffsetT = 8; - pub const VT_UNK_2: flatbuffers::VOffsetT = 10; - pub const VT_STATIS_TYPE: flatbuffers::VOffsetT = 12; - pub const VT_TARGET_NUM: flatbuffers::VOffsetT = 14; - pub const VT_TYPE_: flatbuffers::VOffsetT = 16; + pub const VT_CONDITION_ID: flatbuffers::VOffsetT = 4; + pub const VT_ARGS: flatbuffers::VOffsetT = 6; + pub const VT_COMMENTARY: flatbuffers::VOffsetT = 8; + pub const VT_UNK_2: flatbuffers::VOffsetT = 10; + pub const VT_STATIS_TYPE: flatbuffers::VOffsetT = 12; + pub const VT_TARGET_NUM: flatbuffers::VOffsetT = 14; + pub const VT_TYPE_: flatbuffers::VOffsetT = 16; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ConditionConfigTemplate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args ConditionConfigTemplateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = ConditionConfigTemplateBuilder::new(_fbb); - builder.add_type_(args.type_); - builder.add_target_num(args.target_num); - builder.add_statis_type(args.statis_type); - if let Some(x) = args.unk_2 { builder.add_unk_2(x); } - if let Some(x) = args.commentary { builder.add_commentary(x); } - if let Some(x) = args.args { builder.add_args(x); } - builder.add_condition_id(args.condition_id); - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ConditionConfigTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args ConditionConfigTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = ConditionConfigTemplateBuilder::new(_fbb); + builder.add_type_(args.type_); + builder.add_target_num(args.target_num); + builder.add_statis_type(args.statis_type); + if let Some(x) = args.unk_2 { + builder.add_unk_2(x); + } + if let Some(x) = args.commentary { + builder.add_commentary(x); + } + if let Some(x) = args.args { + builder.add_args(x); + } + builder.add_condition_id(args.condition_id); + builder.finish() + } - - #[inline] - pub fn condition_id(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ConditionConfigTemplate::VT_CONDITION_ID, Some(0)).unwrap()} - } - #[inline] - pub fn args(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ConditionConfigTemplate::VT_ARGS, None)} - } - #[inline] - pub fn commentary(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ConditionConfigTemplate::VT_COMMENTARY, None)} - } - #[inline] - pub fn unk_2(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>(ConditionConfigTemplate::VT_UNK_2, None)} - } - #[inline] - pub fn statis_type(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ConditionConfigTemplate::VT_STATIS_TYPE, Some(0)).unwrap()} - } - #[inline] - pub fn target_num(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ConditionConfigTemplate::VT_TARGET_NUM, Some(0)).unwrap()} - } - #[inline] - pub fn type_(&self) -> i32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(ConditionConfigTemplate::VT_TYPE_, Some(0)).unwrap()} - } + #[inline] + pub fn condition_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ConditionConfigTemplate::VT_CONDITION_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn args(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>(ConditionConfigTemplate::VT_ARGS, None) + } + } + #[inline] + pub fn commentary(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + ConditionConfigTemplate::VT_COMMENTARY, + None, + ) + } + } + #[inline] + pub fn unk_2(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + ConditionConfigTemplate::VT_UNK_2, + None, + ) + } + } + #[inline] + pub fn statis_type(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ConditionConfigTemplate::VT_STATIS_TYPE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn target_num(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ConditionConfigTemplate::VT_TARGET_NUM, Some(0)) + .unwrap() + } + } + #[inline] + pub fn type_(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(ConditionConfigTemplate::VT_TYPE_, Some(0)) + .unwrap() + } + } } impl flatbuffers::Verifiable for ConditionConfigTemplate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("condition_id", Self::VT_CONDITION_ID, false)? - .visit_field::>("args", Self::VT_ARGS, false)? - .visit_field::>("commentary", Self::VT_COMMENTARY, false)? - .visit_field::>>("unk_2", Self::VT_UNK_2, false)? - .visit_field::("statis_type", Self::VT_STATIS_TYPE, false)? - .visit_field::("target_num", Self::VT_TARGET_NUM, false)? - .visit_field::("type_", Self::VT_TYPE_, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("condition_id", Self::VT_CONDITION_ID, false)? + .visit_field::>("args", Self::VT_ARGS, false)? + .visit_field::>( + "commentary", + Self::VT_COMMENTARY, + false, + )? + .visit_field::>>( + "unk_2", + Self::VT_UNK_2, + false, + )? + .visit_field::("statis_type", Self::VT_STATIS_TYPE, false)? + .visit_field::("target_num", Self::VT_TARGET_NUM, false)? + .visit_field::("type_", Self::VT_TYPE_, false)? + .finish(); + Ok(()) + } } pub struct ConditionConfigTemplateArgs<'a> { pub condition_id: i32, @@ -7036,1824 +10202,6721 @@ pub struct ConditionConfigTemplateArgs<'a> { pub type_: i32, } impl<'a> Default for ConditionConfigTemplateArgs<'a> { - #[inline] - fn default() -> Self { - ConditionConfigTemplateArgs { - condition_id: 0, - args: None, - commentary: None, - unk_2: None, - statis_type: 0, - target_num: 0, - type_: 0, + #[inline] + fn default() -> Self { + ConditionConfigTemplateArgs { + condition_id: 0, + args: None, + commentary: None, + unk_2: None, + statis_type: 0, + target_num: 0, + type_: 0, + } } - } } pub struct ConditionConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ConditionConfigTemplateBuilder<'a, 'b, A> { - #[inline] - pub fn add_condition_id(&mut self, condition_id: i32) { - self.fbb_.push_slot::(ConditionConfigTemplate::VT_CONDITION_ID, condition_id, 0); - } - #[inline] - pub fn add_args(&mut self, args: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ConditionConfigTemplate::VT_ARGS, args); - } - #[inline] - pub fn add_commentary(&mut self, commentary: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(ConditionConfigTemplate::VT_COMMENTARY, commentary); - } - #[inline] - pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ConditionConfigTemplate::VT_UNK_2, unk_2); - } - #[inline] - pub fn add_statis_type(&mut self, statis_type: i32) { - self.fbb_.push_slot::(ConditionConfigTemplate::VT_STATIS_TYPE, statis_type, 0); - } - #[inline] - pub fn add_target_num(&mut self, target_num: i32) { - self.fbb_.push_slot::(ConditionConfigTemplate::VT_TARGET_NUM, target_num, 0); - } - #[inline] - pub fn add_type_(&mut self, type_: i32) { - self.fbb_.push_slot::(ConditionConfigTemplate::VT_TYPE_, type_, 0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ConditionConfigTemplateBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - ConditionConfigTemplateBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_condition_id(&mut self, condition_id: i32) { + self.fbb_ + .push_slot::(ConditionConfigTemplate::VT_CONDITION_ID, condition_id, 0); + } + #[inline] + pub fn add_args(&mut self, args: flatbuffers::WIPOffset<&'b str>) { + self.fbb_ + .push_slot_always::>(ConditionConfigTemplate::VT_ARGS, args); + } + #[inline] + pub fn add_commentary(&mut self, commentary: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + ConditionConfigTemplate::VT_COMMENTARY, + commentary, + ); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( + ConditionConfigTemplate::VT_UNK_2, + unk_2, + ); + } + #[inline] + pub fn add_statis_type(&mut self, statis_type: i32) { + self.fbb_ + .push_slot::(ConditionConfigTemplate::VT_STATIS_TYPE, statis_type, 0); + } + #[inline] + pub fn add_target_num(&mut self, target_num: i32) { + self.fbb_ + .push_slot::(ConditionConfigTemplate::VT_TARGET_NUM, target_num, 0); + } + #[inline] + pub fn add_type_(&mut self, type_: i32) { + self.fbb_ + .push_slot::(ConditionConfigTemplate::VT_TYPE_, type_, 0); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> ConditionConfigTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + ConditionConfigTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for ConditionConfigTemplate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ConditionConfigTemplate"); - ds.field("condition_id", &self.condition_id()); - ds.field("args", &self.args()); - ds.field("commentary", &self.commentary()); - ds.field("unk_2", &self.unk_2()); - ds.field("statis_type", &self.statis_type()); - ds.field("target_num", &self.target_num()); - ds.field("type_", &self.type_()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ConditionConfigTemplate"); + ds.field("condition_id", &self.condition_id()); + ds.field("args", &self.args()); + ds.field("commentary", &self.commentary()); + ds.field("unk_2", &self.unk_2()); + ds.field("statis_type", &self.statis_type()); + ds.field("target_num", &self.target_num()); + ds.field("type_", &self.type_()); + ds.finish() + } +} +pub enum AvatarBattleTemplateOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct AvatarBattleTemplate<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AvatarBattleTemplate<'a> { + type Inner = AvatarBattleTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } +} + +impl<'a> AvatarBattleTemplate<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_UNK_1: flatbuffers::VOffsetT = 6; + pub const VT_UNK_2: flatbuffers::VOffsetT = 8; + pub const VT_UNK_3: flatbuffers::VOffsetT = 10; + pub const VT_UNK_4: flatbuffers::VOffsetT = 12; + pub const VT_UNK_5: flatbuffers::VOffsetT = 14; + pub const VT_UNK_6: flatbuffers::VOffsetT = 16; + pub const VT_UNK_7: flatbuffers::VOffsetT = 18; + pub const VT_UNK_8: flatbuffers::VOffsetT = 20; + pub const VT_UNK_9: flatbuffers::VOffsetT = 22; + pub const VT_UNK_10: flatbuffers::VOffsetT = 24; + pub const VT_AVATAR_PIECE_ID: flatbuffers::VOffsetT = 26; + pub const VT_UNK_12: flatbuffers::VOffsetT = 28; + pub const VT_UNK_13: flatbuffers::VOffsetT = 30; + pub const VT_HP_MAX: flatbuffers::VOffsetT = 32; + pub const VT_HEALTH_GROWTH: flatbuffers::VOffsetT = 34; + pub const VT_UNK_16: flatbuffers::VOffsetT = 36; + pub const VT_UNK_17: flatbuffers::VOffsetT = 38; + pub const VT_UNK_18: flatbuffers::VOffsetT = 40; + pub const VT_UNK_19: flatbuffers::VOffsetT = 42; + pub const VT_UNK_20: flatbuffers::VOffsetT = 44; + pub const VT_ATTACK: flatbuffers::VOffsetT = 46; + pub const VT_ATTACK_GROWTH: flatbuffers::VOffsetT = 48; + pub const VT_DEFENCE: flatbuffers::VOffsetT = 50; + pub const VT_DEFENCE_GROWTH: flatbuffers::VOffsetT = 52; + pub const VT_CRIT: flatbuffers::VOffsetT = 54; + pub const VT_CRIT_DAMAGE: flatbuffers::VOffsetT = 56; + pub const VT_CRIT_RES: flatbuffers::VOffsetT = 58; + pub const VT_CRIT_DAMAGE_RES: flatbuffers::VOffsetT = 60; + pub const VT_PEN_RATE: flatbuffers::VOffsetT = 62; + pub const VT_PEN_DELTA: flatbuffers::VOffsetT = 64; + pub const VT_LUCK: flatbuffers::VOffsetT = 66; + pub const VT_STUN: flatbuffers::VOffsetT = 68; + pub const VT_BREAK_STUN: flatbuffers::VOffsetT = 70; + pub const VT_ELEMENT_ABNORMAL_POWER: flatbuffers::VOffsetT = 72; + pub const VT_SP_BAR_POINT: flatbuffers::VOffsetT = 74; + pub const VT_SP_RECOVER: flatbuffers::VOffsetT = 76; + pub const VT_ELEMENT_MYSTERY: flatbuffers::VOffsetT = 78; + pub const VT_RBL: flatbuffers::VOffsetT = 80; + pub const VT_RBL_CORRECTION_FACTOR: flatbuffers::VOffsetT = 82; + pub const VT_RBL_PROBABILITY: flatbuffers::VOffsetT = 84; + pub const VT_UNK_41: flatbuffers::VOffsetT = 86; + pub const VT_UNK_42: flatbuffers::VOffsetT = 88; + pub const VT_UNK_43: flatbuffers::VOffsetT = 90; + pub const VT_UNK_44: flatbuffers::VOffsetT = 92; + pub const VT_UNK_45: flatbuffers::VOffsetT = 94; + pub const VT_UNK_46: flatbuffers::VOffsetT = 96; + pub const VT_UNK_47: flatbuffers::VOffsetT = 98; + pub const VT_UNK_48: flatbuffers::VOffsetT = 100; + pub const VT_UNK_49: flatbuffers::VOffsetT = 102; + pub const VT_UNK_50: flatbuffers::VOffsetT = 104; + pub const VT_UNK_51: flatbuffers::VOffsetT = 106; + pub const VT_UNK_52: flatbuffers::VOffsetT = 108; + pub const VT_UNK_53: flatbuffers::VOffsetT = 110; + pub const VT_UNK_54: flatbuffers::VOffsetT = 112; + pub const VT_UNK_55: flatbuffers::VOffsetT = 114; + pub const VT_UNK_56: flatbuffers::VOffsetT = 116; + pub const VT_UNK_57: flatbuffers::VOffsetT = 118; + pub const VT_UNK_58: flatbuffers::VOffsetT = 120; + pub const VT_UNK_59: flatbuffers::VOffsetT = 122; + pub const VT_UNK_60: flatbuffers::VOffsetT = 124; + pub const VT_UNK_61: flatbuffers::VOffsetT = 126; + pub const VT_UNK_62: flatbuffers::VOffsetT = 128; + pub const VT_UNK_63: flatbuffers::VOffsetT = 130; + pub const VT_UNK_64: flatbuffers::VOffsetT = 132; + pub const VT_UNK_65: flatbuffers::VOffsetT = 134; + pub const VT_UNK_66: flatbuffers::VOffsetT = 136; + pub const VT_TAGS: flatbuffers::VOffsetT = 138; + pub const VT_UNK_68: flatbuffers::VOffsetT = 140; + pub const VT_UNK_69: flatbuffers::VOffsetT = 142; + pub const VT_UNK_70: flatbuffers::VOffsetT = 144; + pub const VT_UNK_71: flatbuffers::VOffsetT = 146; + pub const VT_ELEMENT: flatbuffers::VOffsetT = 148; + pub const VT_HIT_TYPE: flatbuffers::VOffsetT = 150; + pub const VT_UNK_ELEMENT_CAMP: flatbuffers::VOffsetT = 152; + pub const VT_UNK_75: flatbuffers::VOffsetT = 154; + pub const VT_UNK_76: flatbuffers::VOffsetT = 156; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AvatarBattleTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args AvatarBattleTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = AvatarBattleTemplateBuilder::new(_fbb); + builder.add_unk_75(args.unk_75); + if let Some(x) = args.unk_element_camp { + builder.add_unk_element_camp(x); + } + if let Some(x) = args.hit_type { + builder.add_hit_type(x); + } + if let Some(x) = args.element { + builder.add_element(x); + } + builder.add_unk_71(args.unk_71); + builder.add_unk_70(args.unk_70); + if let Some(x) = args.unk_69 { + builder.add_unk_69(x); + } + if let Some(x) = args.unk_68 { + builder.add_unk_68(x); + } + if let Some(x) = args.tags { + builder.add_tags(x); + } + builder.add_unk_66(args.unk_66); + builder.add_unk_65(args.unk_65); + builder.add_unk_64(args.unk_64); + builder.add_unk_63(args.unk_63); + builder.add_unk_62(args.unk_62); + builder.add_unk_61(args.unk_61); + builder.add_unk_60(args.unk_60); + builder.add_unk_59(args.unk_59); + builder.add_unk_58(args.unk_58); + builder.add_unk_57(args.unk_57); + builder.add_unk_56(args.unk_56); + builder.add_unk_55(args.unk_55); + builder.add_unk_54(args.unk_54); + builder.add_unk_53(args.unk_53); + builder.add_unk_52(args.unk_52); + builder.add_unk_51(args.unk_51); + builder.add_unk_50(args.unk_50); + builder.add_unk_49(args.unk_49); + builder.add_unk_48(args.unk_48); + builder.add_unk_47(args.unk_47); + builder.add_unk_46(args.unk_46); + builder.add_unk_45(args.unk_45); + builder.add_unk_44(args.unk_44); + builder.add_unk_43(args.unk_43); + builder.add_unk_42(args.unk_42); + builder.add_unk_41(args.unk_41); + builder.add_rbl_probability(args.rbl_probability); + builder.add_rbl_correction_factor(args.rbl_correction_factor); + builder.add_rbl(args.rbl); + builder.add_element_mystery(args.element_mystery); + builder.add_sp_recover(args.sp_recover); + builder.add_sp_bar_point(args.sp_bar_point); + builder.add_element_abnormal_power(args.element_abnormal_power); + builder.add_break_stun(args.break_stun); + builder.add_stun(args.stun); + builder.add_luck(args.luck); + builder.add_pen_delta(args.pen_delta); + builder.add_pen_rate(args.pen_rate); + builder.add_crit_damage_res(args.crit_damage_res); + builder.add_crit_res(args.crit_res); + builder.add_crit_damage(args.crit_damage); + builder.add_crit(args.crit); + builder.add_defence_growth(args.defence_growth); + builder.add_defence(args.defence); + builder.add_attack_growth(args.attack_growth); + builder.add_attack(args.attack); + builder.add_unk_20(args.unk_20); + builder.add_unk_19(args.unk_19); + builder.add_unk_18(args.unk_18); + builder.add_unk_17(args.unk_17); + builder.add_unk_16(args.unk_16); + builder.add_health_growth(args.health_growth); + builder.add_hp_max(args.hp_max); + builder.add_unk_13(args.unk_13); + builder.add_unk_12(args.unk_12); + builder.add_avatar_piece_id(args.avatar_piece_id); + builder.add_unk_10(args.unk_10); + builder.add_unk_9(args.unk_9); + builder.add_unk_8(args.unk_8); + if let Some(x) = args.unk_7 { + builder.add_unk_7(x); + } + if let Some(x) = args.unk_6 { + builder.add_unk_6(x); + } + if let Some(x) = args.unk_5 { + builder.add_unk_5(x); + } + if let Some(x) = args.unk_4 { + builder.add_unk_4(x); + } + if let Some(x) = args.unk_3 { + builder.add_unk_3(x); + } + if let Some(x) = args.unk_2 { + builder.add_unk_2(x); + } + if let Some(x) = args.unk_1 { + builder.add_unk_1(x); + } + builder.add_id(args.id); + builder.add_unk_76(args.unk_76); + builder.finish() + } + + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_1(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBattleTemplate::VT_UNK_1, + None, + ) + } + } + #[inline] + pub fn unk_2(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBattleTemplate::VT_UNK_2, + None, + ) + } + } + #[inline] + pub fn unk_3(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBattleTemplate::VT_UNK_3, + None, + ) + } + } + #[inline] + pub fn unk_4(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBattleTemplate::VT_UNK_4, + None, + ) + } + } + #[inline] + pub fn unk_5(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBattleTemplate::VT_UNK_5, + None, + ) + } + } + #[inline] + pub fn unk_6(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBattleTemplate::VT_UNK_6, + None, + ) + } + } + #[inline] + pub fn unk_7(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBattleTemplate::VT_UNK_7, + None, + ) + } + } + #[inline] + pub fn unk_8(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_8, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_9(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_9, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_10(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_10, Some(0)) + .unwrap() + } + } + #[inline] + pub fn avatar_piece_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_AVATAR_PIECE_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_12(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_12, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_13(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_13, Some(0)) + .unwrap() + } + } + #[inline] + pub fn hp_max(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_HP_MAX, Some(0)) + .unwrap() + } + } + #[inline] + pub fn health_growth(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_HEALTH_GROWTH, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_16(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_16, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_17(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_17, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_18(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_18, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_19(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_19, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_20(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_20, Some(0)) + .unwrap() + } + } + #[inline] + pub fn attack(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_ATTACK, Some(0)) + .unwrap() + } + } + #[inline] + pub fn attack_growth(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_ATTACK_GROWTH, Some(0)) + .unwrap() + } + } + #[inline] + pub fn defence(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_DEFENCE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn defence_growth(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_DEFENCE_GROWTH, Some(0)) + .unwrap() + } + } + #[inline] + pub fn crit(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_CRIT, Some(0)) + .unwrap() + } + } + #[inline] + pub fn crit_damage(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_CRIT_DAMAGE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn crit_res(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_CRIT_RES, Some(0)) + .unwrap() + } + } + #[inline] + pub fn crit_damage_res(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_CRIT_DAMAGE_RES, Some(0)) + .unwrap() + } + } + #[inline] + pub fn pen_rate(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_PEN_RATE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn pen_delta(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_PEN_DELTA, Some(0)) + .unwrap() + } + } + #[inline] + pub fn luck(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_LUCK, Some(0)) + .unwrap() + } + } + #[inline] + pub fn stun(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_STUN, Some(0)) + .unwrap() + } + } + #[inline] + pub fn break_stun(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_BREAK_STUN, Some(0)) + .unwrap() + } + } + #[inline] + pub fn element_abnormal_power(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_ELEMENT_ABNORMAL_POWER, Some(0)) + .unwrap() + } + } + #[inline] + pub fn sp_bar_point(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_SP_BAR_POINT, Some(0)) + .unwrap() + } + } + #[inline] + pub fn sp_recover(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_SP_RECOVER, Some(0)) + .unwrap() + } + } + #[inline] + pub fn element_mystery(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_ELEMENT_MYSTERY, Some(0)) + .unwrap() + } + } + #[inline] + pub fn rbl(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_RBL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn rbl_correction_factor(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_RBL_CORRECTION_FACTOR, Some(0)) + .unwrap() + } + } + #[inline] + pub fn rbl_probability(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_RBL_PROBABILITY, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_41(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_41, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_42(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_42, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_43(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_43, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_44(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_44, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_45(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_45, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_46(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_46, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_47(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_47, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_48(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_48, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_49(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_49, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_50(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_50, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_51(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_51, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_52(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_52, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_53(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_53, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_54(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_54, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_55(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_55, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_56(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_56, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_57(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_57, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_58(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_58, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_59(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_59, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_60(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_60, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_61(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_61, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_62(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_62, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_63(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_63, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_64(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_64, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_65(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_65, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_66(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_66, Some(0)) + .unwrap() + } + } + #[inline] + pub fn tags(&self) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(AvatarBattleTemplate::VT_TAGS, None) + } + } + #[inline] + pub fn unk_68(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBattleTemplate::VT_UNK_68, + None, + ) + } + } + #[inline] + pub fn unk_69(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBattleTemplate::VT_UNK_69, + None, + ) + } + } + #[inline] + pub fn unk_70(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_70, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_71(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_71, Some(0)) + .unwrap() + } + } + #[inline] + pub fn element(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBattleTemplate::VT_ELEMENT, + None, + ) + } + } + #[inline] + pub fn hit_type(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarBattleTemplate::VT_HIT_TYPE, + None, + ) + } + } + #[inline] + pub fn unk_element_camp( + &self, + ) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(AvatarBattleTemplate::VT_UNK_ELEMENT_CAMP, None) + } + } + #[inline] + pub fn unk_75(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_75, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_76(&self) -> i16 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarBattleTemplate::VT_UNK_76, Some(0)) + .unwrap() + } + } +} + +impl flatbuffers::Verifiable for AvatarBattleTemplate<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::>>( + "unk_1", + Self::VT_UNK_1, + false, + )? + .visit_field::>>( + "unk_2", + Self::VT_UNK_2, + false, + )? + .visit_field::>>( + "unk_3", + Self::VT_UNK_3, + false, + )? + .visit_field::>>( + "unk_4", + Self::VT_UNK_4, + false, + )? + .visit_field::>>( + "unk_5", + Self::VT_UNK_5, + false, + )? + .visit_field::>>( + "unk_6", + Self::VT_UNK_6, + false, + )? + .visit_field::>>( + "unk_7", + Self::VT_UNK_7, + false, + )? + .visit_field::("unk_8", Self::VT_UNK_8, false)? + .visit_field::("unk_9", Self::VT_UNK_9, false)? + .visit_field::("unk_10", Self::VT_UNK_10, false)? + .visit_field::("avatar_piece_id", Self::VT_AVATAR_PIECE_ID, false)? + .visit_field::("unk_12", Self::VT_UNK_12, false)? + .visit_field::("unk_13", Self::VT_UNK_13, false)? + .visit_field::("hp_max", Self::VT_HP_MAX, false)? + .visit_field::("health_growth", Self::VT_HEALTH_GROWTH, false)? + .visit_field::("unk_16", Self::VT_UNK_16, false)? + .visit_field::("unk_17", Self::VT_UNK_17, false)? + .visit_field::("unk_18", Self::VT_UNK_18, false)? + .visit_field::("unk_19", Self::VT_UNK_19, false)? + .visit_field::("unk_20", Self::VT_UNK_20, false)? + .visit_field::("attack", Self::VT_ATTACK, false)? + .visit_field::("attack_growth", Self::VT_ATTACK_GROWTH, false)? + .visit_field::("defence", Self::VT_DEFENCE, false)? + .visit_field::("defence_growth", Self::VT_DEFENCE_GROWTH, false)? + .visit_field::("crit", Self::VT_CRIT, false)? + .visit_field::("crit_damage", Self::VT_CRIT_DAMAGE, false)? + .visit_field::("crit_res", Self::VT_CRIT_RES, false)? + .visit_field::("crit_damage_res", Self::VT_CRIT_DAMAGE_RES, false)? + .visit_field::("pen_rate", Self::VT_PEN_RATE, false)? + .visit_field::("pen_delta", Self::VT_PEN_DELTA, false)? + .visit_field::("luck", Self::VT_LUCK, false)? + .visit_field::("stun", Self::VT_STUN, false)? + .visit_field::("break_stun", Self::VT_BREAK_STUN, false)? + .visit_field::( + "element_abnormal_power", + Self::VT_ELEMENT_ABNORMAL_POWER, + false, + )? + .visit_field::("sp_bar_point", Self::VT_SP_BAR_POINT, false)? + .visit_field::("sp_recover", Self::VT_SP_RECOVER, false)? + .visit_field::("element_mystery", Self::VT_ELEMENT_MYSTERY, false)? + .visit_field::("rbl", Self::VT_RBL, false)? + .visit_field::( + "rbl_correction_factor", + Self::VT_RBL_CORRECTION_FACTOR, + false, + )? + .visit_field::("rbl_probability", Self::VT_RBL_PROBABILITY, false)? + .visit_field::("unk_41", Self::VT_UNK_41, false)? + .visit_field::("unk_42", Self::VT_UNK_42, false)? + .visit_field::("unk_43", Self::VT_UNK_43, false)? + .visit_field::("unk_44", Self::VT_UNK_44, false)? + .visit_field::("unk_45", Self::VT_UNK_45, false)? + .visit_field::("unk_46", Self::VT_UNK_46, false)? + .visit_field::("unk_47", Self::VT_UNK_47, false)? + .visit_field::("unk_48", Self::VT_UNK_48, false)? + .visit_field::("unk_49", Self::VT_UNK_49, false)? + .visit_field::("unk_50", Self::VT_UNK_50, false)? + .visit_field::("unk_51", Self::VT_UNK_51, false)? + .visit_field::("unk_52", Self::VT_UNK_52, false)? + .visit_field::("unk_53", Self::VT_UNK_53, false)? + .visit_field::("unk_54", Self::VT_UNK_54, false)? + .visit_field::("unk_55", Self::VT_UNK_55, false)? + .visit_field::("unk_56", Self::VT_UNK_56, false)? + .visit_field::("unk_57", Self::VT_UNK_57, false)? + .visit_field::("unk_58", Self::VT_UNK_58, false)? + .visit_field::("unk_59", Self::VT_UNK_59, false)? + .visit_field::("unk_60", Self::VT_UNK_60, false)? + .visit_field::("unk_61", Self::VT_UNK_61, false)? + .visit_field::("unk_62", Self::VT_UNK_62, false)? + .visit_field::("unk_63", Self::VT_UNK_63, false)? + .visit_field::("unk_64", Self::VT_UNK_64, false)? + .visit_field::("unk_65", Self::VT_UNK_65, false)? + .visit_field::("unk_66", Self::VT_UNK_66, false)? + .visit_field::>, + >>("tags", Self::VT_TAGS, false)? + .visit_field::>>( + "unk_68", + Self::VT_UNK_68, + false, + )? + .visit_field::>>( + "unk_69", + Self::VT_UNK_69, + false, + )? + .visit_field::("unk_70", Self::VT_UNK_70, false)? + .visit_field::("unk_71", Self::VT_UNK_71, false)? + .visit_field::>>( + "element", + Self::VT_ELEMENT, + false, + )? + .visit_field::>>( + "hit_type", + Self::VT_HIT_TYPE, + false, + )? + .visit_field::>, + >>("unk_element_camp", Self::VT_UNK_ELEMENT_CAMP, false)? + .visit_field::("unk_75", Self::VT_UNK_75, false)? + .visit_field::("unk_76", Self::VT_UNK_76, false)? + .finish(); + Ok(()) + } +} +pub struct AvatarBattleTemplateArgs<'a> { + pub id: i32, + pub unk_1: Option>>, + pub unk_2: Option>>, + pub unk_3: Option>>, + pub unk_4: Option>>, + pub unk_5: Option>>, + pub unk_6: Option>>, + pub unk_7: Option>>, + pub unk_8: i32, + pub unk_9: i32, + pub unk_10: i32, + pub avatar_piece_id: i32, + pub unk_12: i32, + pub unk_13: i32, + pub hp_max: i32, + pub health_growth: i32, + pub unk_16: i32, + pub unk_17: i32, + pub unk_18: i32, + pub unk_19: i32, + pub unk_20: i32, + pub attack: i32, + pub attack_growth: i32, + pub defence: i32, + pub defence_growth: i32, + pub crit: i32, + pub crit_damage: i32, + pub crit_res: i32, + pub crit_damage_res: i32, + pub pen_rate: i32, + pub pen_delta: i32, + pub luck: i32, + pub stun: i32, + pub break_stun: i32, + pub element_abnormal_power: i32, + pub sp_bar_point: i32, + pub sp_recover: i32, + pub element_mystery: i32, + pub rbl: i32, + pub rbl_correction_factor: i32, + pub rbl_probability: i32, + pub unk_41: i32, + pub unk_42: i32, + pub unk_43: i32, + pub unk_44: i32, + pub unk_45: i32, + pub unk_46: i32, + pub unk_47: i32, + pub unk_48: i32, + pub unk_49: i32, + pub unk_50: i32, + pub unk_51: i32, + pub unk_52: i32, + pub unk_53: i32, + pub unk_54: i32, + pub unk_55: i32, + pub unk_56: i32, + pub unk_57: i32, + pub unk_58: i32, + pub unk_59: i32, + pub unk_60: i32, + pub unk_61: i32, + pub unk_62: i32, + pub unk_63: i32, + pub unk_64: i32, + pub unk_65: i32, + pub unk_66: i32, + pub tags: Option< + flatbuffers::WIPOffset>>, + >, + pub unk_68: Option>>, + pub unk_69: Option>>, + pub unk_70: i32, + pub unk_71: i32, + pub element: Option>>, + pub hit_type: Option>>, + pub unk_element_camp: Option< + flatbuffers::WIPOffset>>, + >, + pub unk_75: i32, + pub unk_76: i16, +} +impl<'a> Default for AvatarBattleTemplateArgs<'a> { + #[inline] + fn default() -> Self { + AvatarBattleTemplateArgs { + id: 0, + unk_1: None, + unk_2: None, + unk_3: None, + unk_4: None, + unk_5: None, + unk_6: None, + unk_7: None, + unk_8: 0, + unk_9: 0, + unk_10: 0, + avatar_piece_id: 0, + unk_12: 0, + unk_13: 0, + hp_max: 0, + health_growth: 0, + unk_16: 0, + unk_17: 0, + unk_18: 0, + unk_19: 0, + unk_20: 0, + attack: 0, + attack_growth: 0, + defence: 0, + defence_growth: 0, + crit: 0, + crit_damage: 0, + crit_res: 0, + crit_damage_res: 0, + pen_rate: 0, + pen_delta: 0, + luck: 0, + stun: 0, + break_stun: 0, + element_abnormal_power: 0, + sp_bar_point: 0, + sp_recover: 0, + element_mystery: 0, + rbl: 0, + rbl_correction_factor: 0, + rbl_probability: 0, + unk_41: 0, + unk_42: 0, + unk_43: 0, + unk_44: 0, + unk_45: 0, + unk_46: 0, + unk_47: 0, + unk_48: 0, + unk_49: 0, + unk_50: 0, + unk_51: 0, + unk_52: 0, + unk_53: 0, + unk_54: 0, + unk_55: 0, + unk_56: 0, + unk_57: 0, + unk_58: 0, + unk_59: 0, + unk_60: 0, + unk_61: 0, + unk_62: 0, + unk_63: 0, + unk_64: 0, + unk_65: 0, + unk_66: 0, + tags: None, + unk_68: None, + unk_69: None, + unk_70: 0, + unk_71: 0, + element: None, + hit_type: None, + unk_element_camp: None, + unk_75: 0, + unk_76: 0, + } + } +} + +pub struct AvatarBattleTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AvatarBattleTemplateBuilder<'a, 'b, A> { + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_unk_1(&mut self, unk_1: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(AvatarBattleTemplate::VT_UNK_1, unk_1); + } + #[inline] + pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(AvatarBattleTemplate::VT_UNK_2, unk_2); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(AvatarBattleTemplate::VT_UNK_3, unk_3); + } + #[inline] + pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(AvatarBattleTemplate::VT_UNK_4, unk_4); + } + #[inline] + pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(AvatarBattleTemplate::VT_UNK_5, unk_5); + } + #[inline] + pub fn add_unk_6(&mut self, unk_6: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(AvatarBattleTemplate::VT_UNK_6, unk_6); + } + #[inline] + pub fn add_unk_7(&mut self, unk_7: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(AvatarBattleTemplate::VT_UNK_7, unk_7); + } + #[inline] + pub fn add_unk_8(&mut self, unk_8: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_8, unk_8, 0); + } + #[inline] + pub fn add_unk_9(&mut self, unk_9: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_9, unk_9, 0); + } + #[inline] + pub fn add_unk_10(&mut self, unk_10: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_10, unk_10, 0); + } + #[inline] + pub fn add_avatar_piece_id(&mut self, avatar_piece_id: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_AVATAR_PIECE_ID, avatar_piece_id, 0); + } + #[inline] + pub fn add_unk_12(&mut self, unk_12: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_12, unk_12, 0); + } + #[inline] + pub fn add_unk_13(&mut self, unk_13: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_13, unk_13, 0); + } + #[inline] + pub fn add_hp_max(&mut self, hp_max: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_HP_MAX, hp_max, 0); + } + #[inline] + pub fn add_health_growth(&mut self, health_growth: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_HEALTH_GROWTH, health_growth, 0); + } + #[inline] + pub fn add_unk_16(&mut self, unk_16: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_16, unk_16, 0); + } + #[inline] + pub fn add_unk_17(&mut self, unk_17: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_17, unk_17, 0); + } + #[inline] + pub fn add_unk_18(&mut self, unk_18: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_18, unk_18, 0); + } + #[inline] + pub fn add_unk_19(&mut self, unk_19: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_19, unk_19, 0); + } + #[inline] + pub fn add_unk_20(&mut self, unk_20: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_20, unk_20, 0); + } + #[inline] + pub fn add_attack(&mut self, attack: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_ATTACK, attack, 0); + } + #[inline] + pub fn add_attack_growth(&mut self, attack_growth: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_ATTACK_GROWTH, attack_growth, 0); + } + #[inline] + pub fn add_defence(&mut self, defence: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_DEFENCE, defence, 0); + } + #[inline] + pub fn add_defence_growth(&mut self, defence_growth: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_DEFENCE_GROWTH, defence_growth, 0); + } + #[inline] + pub fn add_crit(&mut self, crit: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_CRIT, crit, 0); + } + #[inline] + pub fn add_crit_damage(&mut self, crit_damage: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_CRIT_DAMAGE, crit_damage, 0); + } + #[inline] + pub fn add_crit_res(&mut self, crit_res: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_CRIT_RES, crit_res, 0); + } + #[inline] + pub fn add_crit_damage_res(&mut self, crit_damage_res: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_CRIT_DAMAGE_RES, crit_damage_res, 0); + } + #[inline] + pub fn add_pen_rate(&mut self, pen_rate: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_PEN_RATE, pen_rate, 0); + } + #[inline] + pub fn add_pen_delta(&mut self, pen_delta: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_PEN_DELTA, pen_delta, 0); + } + #[inline] + pub fn add_luck(&mut self, luck: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_LUCK, luck, 0); + } + #[inline] + pub fn add_stun(&mut self, stun: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_STUN, stun, 0); + } + #[inline] + pub fn add_break_stun(&mut self, break_stun: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_BREAK_STUN, break_stun, 0); + } + #[inline] + pub fn add_element_abnormal_power(&mut self, element_abnormal_power: i32) { + self.fbb_.push_slot::( + AvatarBattleTemplate::VT_ELEMENT_ABNORMAL_POWER, + element_abnormal_power, + 0, + ); + } + #[inline] + pub fn add_sp_bar_point(&mut self, sp_bar_point: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_SP_BAR_POINT, sp_bar_point, 0); + } + #[inline] + pub fn add_sp_recover(&mut self, sp_recover: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_SP_RECOVER, sp_recover, 0); + } + #[inline] + pub fn add_element_mystery(&mut self, element_mystery: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_ELEMENT_MYSTERY, element_mystery, 0); + } + #[inline] + pub fn add_rbl(&mut self, rbl: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_RBL, rbl, 0); + } + #[inline] + pub fn add_rbl_correction_factor(&mut self, rbl_correction_factor: i32) { + self.fbb_.push_slot::( + AvatarBattleTemplate::VT_RBL_CORRECTION_FACTOR, + rbl_correction_factor, + 0, + ); + } + #[inline] + pub fn add_rbl_probability(&mut self, rbl_probability: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_RBL_PROBABILITY, rbl_probability, 0); + } + #[inline] + pub fn add_unk_41(&mut self, unk_41: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_41, unk_41, 0); + } + #[inline] + pub fn add_unk_42(&mut self, unk_42: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_42, unk_42, 0); + } + #[inline] + pub fn add_unk_43(&mut self, unk_43: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_43, unk_43, 0); + } + #[inline] + pub fn add_unk_44(&mut self, unk_44: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_44, unk_44, 0); + } + #[inline] + pub fn add_unk_45(&mut self, unk_45: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_45, unk_45, 0); + } + #[inline] + pub fn add_unk_46(&mut self, unk_46: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_46, unk_46, 0); + } + #[inline] + pub fn add_unk_47(&mut self, unk_47: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_47, unk_47, 0); + } + #[inline] + pub fn add_unk_48(&mut self, unk_48: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_48, unk_48, 0); + } + #[inline] + pub fn add_unk_49(&mut self, unk_49: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_49, unk_49, 0); + } + #[inline] + pub fn add_unk_50(&mut self, unk_50: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_50, unk_50, 0); + } + #[inline] + pub fn add_unk_51(&mut self, unk_51: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_51, unk_51, 0); + } + #[inline] + pub fn add_unk_52(&mut self, unk_52: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_52, unk_52, 0); + } + #[inline] + pub fn add_unk_53(&mut self, unk_53: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_53, unk_53, 0); + } + #[inline] + pub fn add_unk_54(&mut self, unk_54: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_54, unk_54, 0); + } + #[inline] + pub fn add_unk_55(&mut self, unk_55: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_55, unk_55, 0); + } + #[inline] + pub fn add_unk_56(&mut self, unk_56: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_56, unk_56, 0); + } + #[inline] + pub fn add_unk_57(&mut self, unk_57: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_57, unk_57, 0); + } + #[inline] + pub fn add_unk_58(&mut self, unk_58: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_58, unk_58, 0); + } + #[inline] + pub fn add_unk_59(&mut self, unk_59: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_59, unk_59, 0); + } + #[inline] + pub fn add_unk_60(&mut self, unk_60: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_60, unk_60, 0); + } + #[inline] + pub fn add_unk_61(&mut self, unk_61: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_61, unk_61, 0); + } + #[inline] + pub fn add_unk_62(&mut self, unk_62: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_62, unk_62, 0); + } + #[inline] + pub fn add_unk_63(&mut self, unk_63: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_63, unk_63, 0); + } + #[inline] + pub fn add_unk_64(&mut self, unk_64: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_64, unk_64, 0); + } + #[inline] + pub fn add_unk_65(&mut self, unk_65: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_65, unk_65, 0); + } + #[inline] + pub fn add_unk_66(&mut self, unk_66: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_66, unk_66, 0); + } + #[inline] + pub fn add_tags( + &mut self, + tags: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_ + .push_slot_always::>(AvatarBattleTemplate::VT_TAGS, tags); + } + #[inline] + pub fn add_unk_68(&mut self, unk_68: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(AvatarBattleTemplate::VT_UNK_68, unk_68); + } + #[inline] + pub fn add_unk_69(&mut self, unk_69: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(AvatarBattleTemplate::VT_UNK_69, unk_69); + } + #[inline] + pub fn add_unk_70(&mut self, unk_70: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_70, unk_70, 0); + } + #[inline] + pub fn add_unk_71(&mut self, unk_71: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_71, unk_71, 0); + } + #[inline] + pub fn add_element(&mut self, element: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( + AvatarBattleTemplate::VT_ELEMENT, + element, + ); + } + #[inline] + pub fn add_hit_type(&mut self, hit_type: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( + AvatarBattleTemplate::VT_HIT_TYPE, + hit_type, + ); + } + #[inline] + pub fn add_unk_element_camp( + &mut self, + unk_element_camp: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_.push_slot_always::>( + AvatarBattleTemplate::VT_UNK_ELEMENT_CAMP, + unk_element_camp, + ); + } + #[inline] + pub fn add_unk_75(&mut self, unk_75: i32) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_75, unk_75, 0); + } + #[inline] + pub fn add_unk_76(&mut self, unk_76: i16) { + self.fbb_ + .push_slot::(AvatarBattleTemplate::VT_UNK_76, unk_76, 0); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> AvatarBattleTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + AvatarBattleTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for AvatarBattleTemplate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AvatarBattleTemplate"); + ds.field("id", &self.id()); + ds.field("unk_1", &self.unk_1()); + ds.field("unk_2", &self.unk_2()); + ds.field("unk_3", &self.unk_3()); + ds.field("unk_4", &self.unk_4()); + ds.field("unk_5", &self.unk_5()); + ds.field("unk_6", &self.unk_6()); + ds.field("unk_7", &self.unk_7()); + ds.field("unk_8", &self.unk_8()); + ds.field("unk_9", &self.unk_9()); + ds.field("unk_10", &self.unk_10()); + ds.field("avatar_piece_id", &self.avatar_piece_id()); + ds.field("unk_12", &self.unk_12()); + ds.field("unk_13", &self.unk_13()); + ds.field("hp_max", &self.hp_max()); + ds.field("health_growth", &self.health_growth()); + ds.field("unk_16", &self.unk_16()); + ds.field("unk_17", &self.unk_17()); + ds.field("unk_18", &self.unk_18()); + ds.field("unk_19", &self.unk_19()); + ds.field("unk_20", &self.unk_20()); + ds.field("attack", &self.attack()); + ds.field("attack_growth", &self.attack_growth()); + ds.field("defence", &self.defence()); + ds.field("defence_growth", &self.defence_growth()); + ds.field("crit", &self.crit()); + ds.field("crit_damage", &self.crit_damage()); + ds.field("crit_res", &self.crit_res()); + ds.field("crit_damage_res", &self.crit_damage_res()); + ds.field("pen_rate", &self.pen_rate()); + ds.field("pen_delta", &self.pen_delta()); + ds.field("luck", &self.luck()); + ds.field("stun", &self.stun()); + ds.field("break_stun", &self.break_stun()); + ds.field("element_abnormal_power", &self.element_abnormal_power()); + ds.field("sp_bar_point", &self.sp_bar_point()); + ds.field("sp_recover", &self.sp_recover()); + ds.field("element_mystery", &self.element_mystery()); + ds.field("rbl", &self.rbl()); + ds.field("rbl_correction_factor", &self.rbl_correction_factor()); + ds.field("rbl_probability", &self.rbl_probability()); + ds.field("unk_41", &self.unk_41()); + ds.field("unk_42", &self.unk_42()); + ds.field("unk_43", &self.unk_43()); + ds.field("unk_44", &self.unk_44()); + ds.field("unk_45", &self.unk_45()); + ds.field("unk_46", &self.unk_46()); + ds.field("unk_47", &self.unk_47()); + ds.field("unk_48", &self.unk_48()); + ds.field("unk_49", &self.unk_49()); + ds.field("unk_50", &self.unk_50()); + ds.field("unk_51", &self.unk_51()); + ds.field("unk_52", &self.unk_52()); + ds.field("unk_53", &self.unk_53()); + ds.field("unk_54", &self.unk_54()); + ds.field("unk_55", &self.unk_55()); + ds.field("unk_56", &self.unk_56()); + ds.field("unk_57", &self.unk_57()); + ds.field("unk_58", &self.unk_58()); + ds.field("unk_59", &self.unk_59()); + ds.field("unk_60", &self.unk_60()); + ds.field("unk_61", &self.unk_61()); + ds.field("unk_62", &self.unk_62()); + ds.field("unk_63", &self.unk_63()); + ds.field("unk_64", &self.unk_64()); + ds.field("unk_65", &self.unk_65()); + ds.field("unk_66", &self.unk_66()); + ds.field("tags", &self.tags()); + ds.field("unk_68", &self.unk_68()); + ds.field("unk_69", &self.unk_69()); + ds.field("unk_70", &self.unk_70()); + ds.field("unk_71", &self.unk_71()); + ds.field("element", &self.element()); + ds.field("hit_type", &self.hit_type()); + ds.field("unk_element_camp", &self.unk_element_camp()); + ds.field("unk_75", &self.unk_75()); + ds.field("unk_76", &self.unk_76()); + ds.finish() + } +} +pub enum AvatarLevelAdvanceTemplateOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct AvatarLevelAdvanceTemplate<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AvatarLevelAdvanceTemplate<'a> { + type Inner = AvatarLevelAdvanceTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } +} + +impl<'a> AvatarLevelAdvanceTemplate<'a> { + pub const VT_AVATAR_ID: flatbuffers::VOffsetT = 4; + pub const VT_ID: flatbuffers::VOffsetT = 6; + pub const VT_MIN_LEVEL: flatbuffers::VOffsetT = 8; + pub const VT_MAX_LEVEL: flatbuffers::VOffsetT = 10; + pub const VT_HP_MAX: flatbuffers::VOffsetT = 12; + pub const VT_UNK_5: flatbuffers::VOffsetT = 14; + pub const VT_UNK_6: flatbuffers::VOffsetT = 16; + pub const VT_ATTACK: flatbuffers::VOffsetT = 18; + pub const VT_DEFENCE: flatbuffers::VOffsetT = 20; + pub const VT_UNK_9: flatbuffers::VOffsetT = 22; + pub const VT_UNK_10: flatbuffers::VOffsetT = 24; + pub const VT_UNK_11: flatbuffers::VOffsetT = 26; + pub const VT_UNK_12: flatbuffers::VOffsetT = 28; + pub const VT_UNK_13: flatbuffers::VOffsetT = 30; + pub const VT_UNK_14: flatbuffers::VOffsetT = 32; + pub const VT_UNK_15: flatbuffers::VOffsetT = 34; + pub const VT_UNK_16: flatbuffers::VOffsetT = 36; + pub const VT_UNK_17: flatbuffers::VOffsetT = 38; + pub const VT_UNK_18: flatbuffers::VOffsetT = 40; + pub const VT_PROMOTION_COSTS: flatbuffers::VOffsetT = 42; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AvatarLevelAdvanceTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args AvatarLevelAdvanceTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = AvatarLevelAdvanceTemplateBuilder::new(_fbb); + if let Some(x) = args.promotion_costs { + builder.add_promotion_costs(x); + } + if let Some(x) = args.unk_18 { + builder.add_unk_18(x); + } + builder.add_unk_17(args.unk_17); + builder.add_unk_16(args.unk_16); + builder.add_unk_15(args.unk_15); + builder.add_unk_14(args.unk_14); + builder.add_unk_13(args.unk_13); + builder.add_unk_12(args.unk_12); + builder.add_unk_11(args.unk_11); + builder.add_unk_10(args.unk_10); + builder.add_unk_9(args.unk_9); + builder.add_defence(args.defence); + builder.add_attack(args.attack); + builder.add_unk_6(args.unk_6); + builder.add_unk_5(args.unk_5); + builder.add_hp_max(args.hp_max); + builder.add_max_level(args.max_level); + builder.add_min_level(args.min_level); + builder.add_id(args.id); + builder.add_avatar_id(args.avatar_id); + builder.finish() + } + + #[inline] + pub fn avatar_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_AVATAR_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn min_level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_MIN_LEVEL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn max_level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_MAX_LEVEL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn hp_max(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_HP_MAX, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_5(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_UNK_5, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_6(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_UNK_6, Some(0)) + .unwrap() + } + } + #[inline] + pub fn attack(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_ATTACK, Some(0)) + .unwrap() + } + } + #[inline] + pub fn defence(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_DEFENCE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_9(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_UNK_9, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_10(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_UNK_10, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_11(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_UNK_11, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_12(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_UNK_12, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_13(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_UNK_13, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_14(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_UNK_14, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_15(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_UNK_15, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_16(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_UNK_16, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_17(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarLevelAdvanceTemplate::VT_UNK_17, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_18(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarLevelAdvanceTemplate::VT_UNK_18, + None, + ) + } + } + #[inline] + pub fn promotion_costs(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarLevelAdvanceTemplate::VT_PROMOTION_COSTS, + None, + ) + } + } +} + +impl flatbuffers::Verifiable for AvatarLevelAdvanceTemplate<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("avatar_id", Self::VT_AVATAR_ID, false)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::("min_level", Self::VT_MIN_LEVEL, false)? + .visit_field::("max_level", Self::VT_MAX_LEVEL, false)? + .visit_field::("hp_max", Self::VT_HP_MAX, false)? + .visit_field::("unk_5", Self::VT_UNK_5, false)? + .visit_field::("unk_6", Self::VT_UNK_6, false)? + .visit_field::("attack", Self::VT_ATTACK, false)? + .visit_field::("defence", Self::VT_DEFENCE, false)? + .visit_field::("unk_9", Self::VT_UNK_9, false)? + .visit_field::("unk_10", Self::VT_UNK_10, false)? + .visit_field::("unk_11", Self::VT_UNK_11, false)? + .visit_field::("unk_12", Self::VT_UNK_12, false)? + .visit_field::("unk_13", Self::VT_UNK_13, false)? + .visit_field::("unk_14", Self::VT_UNK_14, false)? + .visit_field::("unk_15", Self::VT_UNK_15, false)? + .visit_field::("unk_16", Self::VT_UNK_16, false)? + .visit_field::("unk_17", Self::VT_UNK_17, false)? + .visit_field::>>( + "unk_18", + Self::VT_UNK_18, + false, + )? + .visit_field::>>( + "promotion_costs", + Self::VT_PROMOTION_COSTS, + false, + )? + .finish(); + Ok(()) + } +} +pub struct AvatarLevelAdvanceTemplateArgs<'a> { + pub avatar_id: i32, + pub id: i32, + pub min_level: i32, + pub max_level: i32, + pub hp_max: i32, + pub unk_5: i32, + pub unk_6: i32, + pub attack: i32, + pub defence: i32, + pub unk_9: i32, + pub unk_10: i32, + pub unk_11: i32, + pub unk_12: i32, + pub unk_13: i32, + pub unk_14: i32, + pub unk_15: i32, + pub unk_16: i32, + pub unk_17: i32, + pub unk_18: Option>>, + pub promotion_costs: Option>>, +} +impl<'a> Default for AvatarLevelAdvanceTemplateArgs<'a> { + #[inline] + fn default() -> Self { + AvatarLevelAdvanceTemplateArgs { + avatar_id: 0, + id: 0, + min_level: 0, + max_level: 0, + hp_max: 0, + unk_5: 0, + unk_6: 0, + attack: 0, + defence: 0, + unk_9: 0, + unk_10: 0, + unk_11: 0, + unk_12: 0, + unk_13: 0, + unk_14: 0, + unk_15: 0, + unk_16: 0, + unk_17: 0, + unk_18: None, + promotion_costs: None, + } + } +} + +pub struct AvatarLevelAdvanceTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AvatarLevelAdvanceTemplateBuilder<'a, 'b, A> { + #[inline] + pub fn add_avatar_id(&mut self, avatar_id: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_AVATAR_ID, avatar_id, 0); + } + #[inline] + pub fn add_id(&mut self, id: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_ID, id, 0); + } + #[inline] + pub fn add_min_level(&mut self, min_level: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_MIN_LEVEL, min_level, 0); + } + #[inline] + pub fn add_max_level(&mut self, max_level: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_MAX_LEVEL, max_level, 0); + } + #[inline] + pub fn add_hp_max(&mut self, hp_max: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_HP_MAX, hp_max, 0); + } + #[inline] + pub fn add_unk_5(&mut self, unk_5: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_UNK_5, unk_5, 0); + } + #[inline] + pub fn add_unk_6(&mut self, unk_6: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_UNK_6, unk_6, 0); + } + #[inline] + pub fn add_attack(&mut self, attack: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_ATTACK, attack, 0); + } + #[inline] + pub fn add_defence(&mut self, defence: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_DEFENCE, defence, 0); + } + #[inline] + pub fn add_unk_9(&mut self, unk_9: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_UNK_9, unk_9, 0); + } + #[inline] + pub fn add_unk_10(&mut self, unk_10: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_UNK_10, unk_10, 0); + } + #[inline] + pub fn add_unk_11(&mut self, unk_11: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_UNK_11, unk_11, 0); + } + #[inline] + pub fn add_unk_12(&mut self, unk_12: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_UNK_12, unk_12, 0); + } + #[inline] + pub fn add_unk_13(&mut self, unk_13: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_UNK_13, unk_13, 0); + } + #[inline] + pub fn add_unk_14(&mut self, unk_14: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_UNK_14, unk_14, 0); + } + #[inline] + pub fn add_unk_15(&mut self, unk_15: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_UNK_15, unk_15, 0); + } + #[inline] + pub fn add_unk_16(&mut self, unk_16: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_UNK_16, unk_16, 0); + } + #[inline] + pub fn add_unk_17(&mut self, unk_17: i32) { + self.fbb_ + .push_slot::(AvatarLevelAdvanceTemplate::VT_UNK_17, unk_17, 0); + } + #[inline] + pub fn add_unk_18(&mut self, unk_18: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( + AvatarLevelAdvanceTemplate::VT_UNK_18, + unk_18, + ); + } + #[inline] + pub fn add_promotion_costs( + &mut self, + promotion_costs: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + AvatarLevelAdvanceTemplate::VT_PROMOTION_COSTS, + promotion_costs, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> AvatarLevelAdvanceTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + AvatarLevelAdvanceTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for AvatarLevelAdvanceTemplate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AvatarLevelAdvanceTemplate"); + ds.field("avatar_id", &self.avatar_id()); + ds.field("id", &self.id()); + ds.field("min_level", &self.min_level()); + ds.field("max_level", &self.max_level()); + ds.field("hp_max", &self.hp_max()); + ds.field("unk_5", &self.unk_5()); + ds.field("unk_6", &self.unk_6()); + ds.field("attack", &self.attack()); + ds.field("defence", &self.defence()); + ds.field("unk_9", &self.unk_9()); + ds.field("unk_10", &self.unk_10()); + ds.field("unk_11", &self.unk_11()); + ds.field("unk_12", &self.unk_12()); + ds.field("unk_13", &self.unk_13()); + ds.field("unk_14", &self.unk_14()); + ds.field("unk_15", &self.unk_15()); + ds.field("unk_16", &self.unk_16()); + ds.field("unk_17", &self.unk_17()); + ds.field("unk_18", &self.unk_18()); + ds.field("promotion_costs", &self.promotion_costs()); + ds.finish() + } +} +pub enum WeaponLevelTemplateOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct WeaponLevelTemplate<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for WeaponLevelTemplate<'a> { + type Inner = WeaponLevelTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } +} + +impl<'a> WeaponLevelTemplate<'a> { + pub const VT_RARITY: flatbuffers::VOffsetT = 4; + pub const VT_LEVEL: flatbuffers::VOffsetT = 6; + pub const VT_RATE: flatbuffers::VOffsetT = 8; + pub const VT_EXP: flatbuffers::VOffsetT = 10; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + WeaponLevelTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args WeaponLevelTemplateArgs, + ) -> flatbuffers::WIPOffset> { + let mut builder = WeaponLevelTemplateBuilder::new(_fbb); + builder.add_exp(args.exp); + builder.add_rate(args.rate); + builder.add_level(args.level); + builder.add_rarity(args.rarity); + builder.finish() + } + + #[inline] + pub fn rarity(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponLevelTemplate::VT_RARITY, Some(0)) + .unwrap() + } + } + #[inline] + pub fn level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponLevelTemplate::VT_LEVEL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn rate(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponLevelTemplate::VT_RATE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn exp(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponLevelTemplate::VT_EXP, Some(0)) + .unwrap() + } + } +} + +impl flatbuffers::Verifiable for WeaponLevelTemplate<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("rarity", Self::VT_RARITY, false)? + .visit_field::("level", Self::VT_LEVEL, false)? + .visit_field::("rate", Self::VT_RATE, false)? + .visit_field::("exp", Self::VT_EXP, false)? + .finish(); + Ok(()) + } +} +pub struct WeaponLevelTemplateArgs { + pub rarity: i32, + pub level: i32, + pub rate: i32, + pub exp: i32, +} +impl<'a> Default for WeaponLevelTemplateArgs { + #[inline] + fn default() -> Self { + WeaponLevelTemplateArgs { + rarity: 0, + level: 0, + rate: 0, + exp: 0, + } + } +} + +pub struct WeaponLevelTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> WeaponLevelTemplateBuilder<'a, 'b, A> { + #[inline] + pub fn add_rarity(&mut self, rarity: i32) { + self.fbb_ + .push_slot::(WeaponLevelTemplate::VT_RARITY, rarity, 0); + } + #[inline] + pub fn add_level(&mut self, level: i32) { + self.fbb_ + .push_slot::(WeaponLevelTemplate::VT_LEVEL, level, 0); + } + #[inline] + pub fn add_rate(&mut self, rate: i32) { + self.fbb_ + .push_slot::(WeaponLevelTemplate::VT_RATE, rate, 0); + } + #[inline] + pub fn add_exp(&mut self, exp: i32) { + self.fbb_ + .push_slot::(WeaponLevelTemplate::VT_EXP, exp, 0); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> WeaponLevelTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + WeaponLevelTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for WeaponLevelTemplate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("WeaponLevelTemplate"); + ds.field("rarity", &self.rarity()); + ds.field("level", &self.level()); + ds.field("rate", &self.rate()); + ds.field("exp", &self.exp()); + ds.finish() + } +} +pub enum WeaponStarTemplateOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct WeaponStarTemplate<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for WeaponStarTemplate<'a> { + type Inner = WeaponStarTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } +} + +impl<'a> WeaponStarTemplate<'a> { + pub const VT_RARITY: flatbuffers::VOffsetT = 4; + pub const VT_STAR: flatbuffers::VOffsetT = 6; + pub const VT_MIN_LEVEL: flatbuffers::VOffsetT = 8; + pub const VT_MAX_LEVEL: flatbuffers::VOffsetT = 10; + pub const VT_STAR_RATE: flatbuffers::VOffsetT = 12; + pub const VT_RAND_RATE: flatbuffers::VOffsetT = 14; + pub const VT_UNK_6: flatbuffers::VOffsetT = 16; + pub const VT_UNK_7: flatbuffers::VOffsetT = 18; + pub const VT_UNK_8: flatbuffers::VOffsetT = 20; + pub const VT_UNK_9: flatbuffers::VOffsetT = 22; + pub const VT_UNK_10: flatbuffers::VOffsetT = 24; + pub const VT_UNK_11: flatbuffers::VOffsetT = 26; + pub const VT_UNK_12: flatbuffers::VOffsetT = 28; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + WeaponStarTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args WeaponStarTemplateArgs, + ) -> flatbuffers::WIPOffset> { + let mut builder = WeaponStarTemplateBuilder::new(_fbb); + builder.add_unk_12(args.unk_12); + builder.add_unk_11(args.unk_11); + builder.add_unk_10(args.unk_10); + builder.add_unk_9(args.unk_9); + builder.add_unk_8(args.unk_8); + builder.add_unk_7(args.unk_7); + builder.add_unk_6(args.unk_6); + builder.add_rand_rate(args.rand_rate); + builder.add_star_rate(args.star_rate); + builder.add_max_level(args.max_level); + builder.add_min_level(args.min_level); + builder.add_star(args.star); + builder.add_rarity(args.rarity); + builder.finish() + } + + #[inline] + pub fn rarity(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_RARITY, Some(0)) + .unwrap() + } + } + #[inline] + pub fn star(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_STAR, Some(0)) + .unwrap() + } + } + #[inline] + pub fn min_level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_MIN_LEVEL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn max_level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_MAX_LEVEL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn star_rate(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_STAR_RATE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn rand_rate(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_RAND_RATE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_6(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_UNK_6, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_7(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_UNK_7, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_8(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_UNK_8, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_9(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_UNK_9, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_10(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_UNK_10, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_11(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_UNK_11, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_12(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(WeaponStarTemplate::VT_UNK_12, Some(0)) + .unwrap() + } + } +} + +impl flatbuffers::Verifiable for WeaponStarTemplate<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("rarity", Self::VT_RARITY, false)? + .visit_field::("star", Self::VT_STAR, false)? + .visit_field::("min_level", Self::VT_MIN_LEVEL, false)? + .visit_field::("max_level", Self::VT_MAX_LEVEL, false)? + .visit_field::("star_rate", Self::VT_STAR_RATE, false)? + .visit_field::("rand_rate", Self::VT_RAND_RATE, false)? + .visit_field::("unk_6", Self::VT_UNK_6, false)? + .visit_field::("unk_7", Self::VT_UNK_7, false)? + .visit_field::("unk_8", Self::VT_UNK_8, false)? + .visit_field::("unk_9", Self::VT_UNK_9, false)? + .visit_field::("unk_10", Self::VT_UNK_10, false)? + .visit_field::("unk_11", Self::VT_UNK_11, false)? + .visit_field::("unk_12", Self::VT_UNK_12, false)? + .finish(); + Ok(()) + } +} +pub struct WeaponStarTemplateArgs { + pub rarity: i32, + pub star: i32, + pub min_level: i32, + pub max_level: i32, + pub star_rate: i32, + pub rand_rate: i32, + pub unk_6: i32, + pub unk_7: i32, + pub unk_8: i32, + pub unk_9: i32, + pub unk_10: i32, + pub unk_11: i32, + pub unk_12: i32, +} +impl<'a> Default for WeaponStarTemplateArgs { + #[inline] + fn default() -> Self { + WeaponStarTemplateArgs { + rarity: 0, + star: 0, + min_level: 0, + max_level: 0, + star_rate: 0, + rand_rate: 0, + unk_6: 0, + unk_7: 0, + unk_8: 0, + unk_9: 0, + unk_10: 0, + unk_11: 0, + unk_12: 0, + } + } +} + +pub struct WeaponStarTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> WeaponStarTemplateBuilder<'a, 'b, A> { + #[inline] + pub fn add_rarity(&mut self, rarity: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_RARITY, rarity, 0); + } + #[inline] + pub fn add_star(&mut self, star: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_STAR, star, 0); + } + #[inline] + pub fn add_min_level(&mut self, min_level: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_MIN_LEVEL, min_level, 0); + } + #[inline] + pub fn add_max_level(&mut self, max_level: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_MAX_LEVEL, max_level, 0); + } + #[inline] + pub fn add_star_rate(&mut self, star_rate: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_STAR_RATE, star_rate, 0); + } + #[inline] + pub fn add_rand_rate(&mut self, rand_rate: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_RAND_RATE, rand_rate, 0); + } + #[inline] + pub fn add_unk_6(&mut self, unk_6: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_UNK_6, unk_6, 0); + } + #[inline] + pub fn add_unk_7(&mut self, unk_7: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_UNK_7, unk_7, 0); + } + #[inline] + pub fn add_unk_8(&mut self, unk_8: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_UNK_8, unk_8, 0); + } + #[inline] + pub fn add_unk_9(&mut self, unk_9: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_UNK_9, unk_9, 0); + } + #[inline] + pub fn add_unk_10(&mut self, unk_10: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_UNK_10, unk_10, 0); + } + #[inline] + pub fn add_unk_11(&mut self, unk_11: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_UNK_11, unk_11, 0); + } + #[inline] + pub fn add_unk_12(&mut self, unk_12: i32) { + self.fbb_ + .push_slot::(WeaponStarTemplate::VT_UNK_12, unk_12, 0); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> WeaponStarTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + WeaponStarTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for WeaponStarTemplate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("WeaponStarTemplate"); + ds.field("rarity", &self.rarity()); + ds.field("star", &self.star()); + ds.field("min_level", &self.min_level()); + ds.field("max_level", &self.max_level()); + ds.field("star_rate", &self.star_rate()); + ds.field("rand_rate", &self.rand_rate()); + ds.field("unk_6", &self.unk_6()); + ds.field("unk_7", &self.unk_7()); + ds.field("unk_8", &self.unk_8()); + ds.field("unk_9", &self.unk_9()); + ds.field("unk_10", &self.unk_10()); + ds.field("unk_11", &self.unk_11()); + ds.field("unk_12", &self.unk_12()); + ds.finish() + } +} +pub enum AvatarPassiveSkillTemplateOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct AvatarPassiveSkillTemplate<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AvatarPassiveSkillTemplate<'a> { + type Inner = AvatarPassiveSkillTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } +} + +impl<'a> AvatarPassiveSkillTemplate<'a> { + pub const VT_SKILL_ID: flatbuffers::VOffsetT = 4; + pub const VT_AVATAR_ID: flatbuffers::VOffsetT = 6; + pub const VT_MIN_AVATAR_LEVEL: flatbuffers::VOffsetT = 8; + pub const VT_MIN_PASSIVE_SKILL_LEVEL: flatbuffers::VOffsetT = 10; + pub const VT_UNLOCK_PASSIVE_SKILL_LEVEL: flatbuffers::VOffsetT = 12; + pub const VT_UNK_5: flatbuffers::VOffsetT = 14; + pub const VT_UNK_LEVELUP: flatbuffers::VOffsetT = 16; + pub const VT_UNK_7: flatbuffers::VOffsetT = 18; + pub const VT_UNK_8: flatbuffers::VOffsetT = 20; + pub const VT_UNK_9: flatbuffers::VOffsetT = 22; + pub const VT_UNK_10: flatbuffers::VOffsetT = 24; + pub const VT_PROPERTYS: flatbuffers::VOffsetT = 26; + pub const VT_NAMES: flatbuffers::VOffsetT = 28; + pub const VT_DESCRIPTIONS: flatbuffers::VOffsetT = 30; + pub const VT_MATERIALS_COSTS: flatbuffers::VOffsetT = 32; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AvatarPassiveSkillTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args AvatarPassiveSkillTemplateArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = AvatarPassiveSkillTemplateBuilder::new(_fbb); + if let Some(x) = args.materials_costs { + builder.add_materials_costs(x); + } + if let Some(x) = args.descriptions { + builder.add_descriptions(x); + } + if let Some(x) = args.names { + builder.add_names(x); + } + if let Some(x) = args.propertys { + builder.add_propertys(x); + } + builder.add_unk_10(args.unk_10); + builder.add_unk_9(args.unk_9); + builder.add_unk_8(args.unk_8); + builder.add_unk_7(args.unk_7); + if let Some(x) = args.unk_levelup { + builder.add_unk_levelup(x); + } + builder.add_unk_5(args.unk_5); + builder.add_unlock_passive_skill_level(args.unlock_passive_skill_level); + builder.add_min_passive_skill_level(args.min_passive_skill_level); + builder.add_min_avatar_level(args.min_avatar_level); + builder.add_avatar_id(args.avatar_id); + builder.add_skill_id(args.skill_id); + builder.finish() + } + + #[inline] + pub fn skill_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarPassiveSkillTemplate::VT_SKILL_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn avatar_id(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarPassiveSkillTemplate::VT_AVATAR_ID, Some(0)) + .unwrap() + } + } + #[inline] + pub fn min_avatar_level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarPassiveSkillTemplate::VT_MIN_AVATAR_LEVEL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn min_passive_skill_level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::( + AvatarPassiveSkillTemplate::VT_MIN_PASSIVE_SKILL_LEVEL, + Some(0), + ) + .unwrap() + } + } + #[inline] + pub fn unlock_passive_skill_level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::( + AvatarPassiveSkillTemplate::VT_UNLOCK_PASSIVE_SKILL_LEVEL, + Some(0), + ) + .unwrap() + } + } + #[inline] + pub fn unk_5(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarPassiveSkillTemplate::VT_UNK_5, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_levelup(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>( + AvatarPassiveSkillTemplate::VT_UNK_LEVELUP, + None, + ) + } + } + #[inline] + pub fn unk_7(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarPassiveSkillTemplate::VT_UNK_7, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_8(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarPassiveSkillTemplate::VT_UNK_8, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_9(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarPassiveSkillTemplate::VT_UNK_9, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_10(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(AvatarPassiveSkillTemplate::VT_UNK_10, Some(0)) + .unwrap() + } + } + #[inline] + pub fn propertys(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarPassiveSkillTemplate::VT_PROPERTYS, + None, + ) + } + } + #[inline] + pub fn names(&self) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(AvatarPassiveSkillTemplate::VT_NAMES, None) + } + } + #[inline] + pub fn descriptions( + &self, + ) -> Option>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(AvatarPassiveSkillTemplate::VT_DESCRIPTIONS, None) + } + } + #[inline] + pub fn materials_costs(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::>>( + AvatarPassiveSkillTemplate::VT_MATERIALS_COSTS, + None, + ) + } + } +} + +impl flatbuffers::Verifiable for AvatarPassiveSkillTemplate<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("skill_id", Self::VT_SKILL_ID, false)? + .visit_field::("avatar_id", Self::VT_AVATAR_ID, false)? + .visit_field::("min_avatar_level", Self::VT_MIN_AVATAR_LEVEL, false)? + .visit_field::( + "min_passive_skill_level", + Self::VT_MIN_PASSIVE_SKILL_LEVEL, + false, + )? + .visit_field::( + "unlock_passive_skill_level", + Self::VT_UNLOCK_PASSIVE_SKILL_LEVEL, + false, + )? + .visit_field::("unk_5", Self::VT_UNK_5, false)? + .visit_field::>( + "unk_levelup", + Self::VT_UNK_LEVELUP, + false, + )? + .visit_field::("unk_7", Self::VT_UNK_7, false)? + .visit_field::("unk_8", Self::VT_UNK_8, false)? + .visit_field::("unk_9", Self::VT_UNK_9, false)? + .visit_field::("unk_10", Self::VT_UNK_10, false)? + .visit_field::>>( + "propertys", + Self::VT_PROPERTYS, + false, + )? + .visit_field::>, + >>("names", Self::VT_NAMES, false)? + .visit_field::>, + >>("descriptions", Self::VT_DESCRIPTIONS, false)? + .visit_field::>>( + "materials_costs", + Self::VT_MATERIALS_COSTS, + false, + )? + .finish(); + Ok(()) + } +} +pub struct AvatarPassiveSkillTemplateArgs<'a> { + pub skill_id: i32, + pub avatar_id: i32, + pub min_avatar_level: i32, + pub min_passive_skill_level: i32, + pub unlock_passive_skill_level: i32, + pub unk_5: i32, + pub unk_levelup: Option>, + pub unk_7: i32, + pub unk_8: i32, + pub unk_9: i32, + pub unk_10: i32, + pub propertys: Option>>, + pub names: Option< + flatbuffers::WIPOffset>>, + >, + pub descriptions: Option< + flatbuffers::WIPOffset>>, + >, + pub materials_costs: Option>>, +} +impl<'a> Default for AvatarPassiveSkillTemplateArgs<'a> { + #[inline] + fn default() -> Self { + AvatarPassiveSkillTemplateArgs { + skill_id: 0, + avatar_id: 0, + min_avatar_level: 0, + min_passive_skill_level: 0, + unlock_passive_skill_level: 0, + unk_5: 0, + unk_levelup: None, + unk_7: 0, + unk_8: 0, + unk_9: 0, + unk_10: 0, + propertys: None, + names: None, + descriptions: None, + materials_costs: None, + } + } +} + +pub struct AvatarPassiveSkillTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AvatarPassiveSkillTemplateBuilder<'a, 'b, A> { + #[inline] + pub fn add_skill_id(&mut self, skill_id: i32) { + self.fbb_ + .push_slot::(AvatarPassiveSkillTemplate::VT_SKILL_ID, skill_id, 0); + } + #[inline] + pub fn add_avatar_id(&mut self, avatar_id: i32) { + self.fbb_ + .push_slot::(AvatarPassiveSkillTemplate::VT_AVATAR_ID, avatar_id, 0); + } + #[inline] + pub fn add_min_avatar_level(&mut self, min_avatar_level: i32) { + self.fbb_.push_slot::( + AvatarPassiveSkillTemplate::VT_MIN_AVATAR_LEVEL, + min_avatar_level, + 0, + ); + } + #[inline] + pub fn add_min_passive_skill_level(&mut self, min_passive_skill_level: i32) { + self.fbb_.push_slot::( + AvatarPassiveSkillTemplate::VT_MIN_PASSIVE_SKILL_LEVEL, + min_passive_skill_level, + 0, + ); + } + #[inline] + pub fn add_unlock_passive_skill_level(&mut self, unlock_passive_skill_level: i32) { + self.fbb_.push_slot::( + AvatarPassiveSkillTemplate::VT_UNLOCK_PASSIVE_SKILL_LEVEL, + unlock_passive_skill_level, + 0, + ); + } + #[inline] + pub fn add_unk_5(&mut self, unk_5: i32) { + self.fbb_ + .push_slot::(AvatarPassiveSkillTemplate::VT_UNK_5, unk_5, 0); + } + #[inline] + pub fn add_unk_levelup(&mut self, unk_levelup: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>( + AvatarPassiveSkillTemplate::VT_UNK_LEVELUP, + unk_levelup, + ); + } + #[inline] + pub fn add_unk_7(&mut self, unk_7: i32) { + self.fbb_ + .push_slot::(AvatarPassiveSkillTemplate::VT_UNK_7, unk_7, 0); + } + #[inline] + pub fn add_unk_8(&mut self, unk_8: i32) { + self.fbb_ + .push_slot::(AvatarPassiveSkillTemplate::VT_UNK_8, unk_8, 0); + } + #[inline] + pub fn add_unk_9(&mut self, unk_9: i32) { + self.fbb_ + .push_slot::(AvatarPassiveSkillTemplate::VT_UNK_9, unk_9, 0); + } + #[inline] + pub fn add_unk_10(&mut self, unk_10: i32) { + self.fbb_ + .push_slot::(AvatarPassiveSkillTemplate::VT_UNK_10, unk_10, 0); + } + #[inline] + pub fn add_propertys( + &mut self, + propertys: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + AvatarPassiveSkillTemplate::VT_PROPERTYS, + propertys, + ); + } + #[inline] + pub fn add_names( + &mut self, + names: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_.push_slot_always::>( + AvatarPassiveSkillTemplate::VT_NAMES, + names, + ); + } + #[inline] + pub fn add_descriptions( + &mut self, + descriptions: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>, + >, + ) { + self.fbb_.push_slot_always::>( + AvatarPassiveSkillTemplate::VT_DESCRIPTIONS, + descriptions, + ); + } + #[inline] + pub fn add_materials_costs( + &mut self, + materials_costs: flatbuffers::WIPOffset>, + ) { + self.fbb_.push_slot_always::>( + AvatarPassiveSkillTemplate::VT_MATERIALS_COSTS, + materials_costs, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> AvatarPassiveSkillTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + AvatarPassiveSkillTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for AvatarPassiveSkillTemplate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AvatarPassiveSkillTemplate"); + ds.field("skill_id", &self.skill_id()); + ds.field("avatar_id", &self.avatar_id()); + ds.field("min_avatar_level", &self.min_avatar_level()); + ds.field("min_passive_skill_level", &self.min_passive_skill_level()); + ds.field( + "unlock_passive_skill_level", + &self.unlock_passive_skill_level(), + ); + ds.field("unk_5", &self.unk_5()); + ds.field("unk_levelup", &self.unk_levelup()); + ds.field("unk_7", &self.unk_7()); + ds.field("unk_8", &self.unk_8()); + ds.field("unk_9", &self.unk_9()); + ds.field("unk_10", &self.unk_10()); + ds.field("propertys", &self.propertys()); + ds.field("names", &self.names()); + ds.field("descriptions", &self.descriptions()); + ds.field("materials_costs", &self.materials_costs()); + ds.finish() + } +} +pub enum EquipmentLevelTemplateOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct EquipmentLevelTemplate<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for EquipmentLevelTemplate<'a> { + type Inner = EquipmentLevelTemplate<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } +} + +impl<'a> EquipmentLevelTemplate<'a> { + pub const VT_RARITY: flatbuffers::VOffsetT = 4; + pub const VT_LEVEL: flatbuffers::VOffsetT = 6; + pub const VT_PROPERTY_RATE: flatbuffers::VOffsetT = 8; + pub const VT_UNK_3: flatbuffers::VOffsetT = 10; + pub const VT_UNK_4: flatbuffers::VOffsetT = 12; + pub const VT_UNK_5: flatbuffers::VOffsetT = 14; + pub const VT_UNK_6: flatbuffers::VOffsetT = 16; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + EquipmentLevelTemplate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args EquipmentLevelTemplateArgs, + ) -> flatbuffers::WIPOffset> { + let mut builder = EquipmentLevelTemplateBuilder::new(_fbb); + builder.add_unk_6(args.unk_6); + builder.add_unk_5(args.unk_5); + builder.add_unk_4(args.unk_4); + builder.add_unk_3(args.unk_3); + builder.add_property_rate(args.property_rate); + builder.add_level(args.level); + builder.add_rarity(args.rarity); + builder.finish() + } + + #[inline] + pub fn rarity(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentLevelTemplate::VT_RARITY, Some(0)) + .unwrap() + } + } + #[inline] + pub fn level(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentLevelTemplate::VT_LEVEL, Some(0)) + .unwrap() + } + } + #[inline] + pub fn property_rate(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentLevelTemplate::VT_PROPERTY_RATE, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_3(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentLevelTemplate::VT_UNK_3, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_4(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentLevelTemplate::VT_UNK_4, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_5(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentLevelTemplate::VT_UNK_5, Some(0)) + .unwrap() + } + } + #[inline] + pub fn unk_6(&self) -> i32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab + .get::(EquipmentLevelTemplate::VT_UNK_6, Some(0)) + .unwrap() + } + } +} + +impl flatbuffers::Verifiable for EquipmentLevelTemplate<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("rarity", Self::VT_RARITY, false)? + .visit_field::("level", Self::VT_LEVEL, false)? + .visit_field::("property_rate", Self::VT_PROPERTY_RATE, false)? + .visit_field::("unk_3", Self::VT_UNK_3, false)? + .visit_field::("unk_4", Self::VT_UNK_4, false)? + .visit_field::("unk_5", Self::VT_UNK_5, false)? + .visit_field::("unk_6", Self::VT_UNK_6, false)? + .finish(); + Ok(()) + } +} +pub struct EquipmentLevelTemplateArgs { + pub rarity: i32, + pub level: i32, + pub property_rate: i32, + pub unk_3: i32, + pub unk_4: i32, + pub unk_5: i32, + pub unk_6: i32, +} +impl<'a> Default for EquipmentLevelTemplateArgs { + #[inline] + fn default() -> Self { + EquipmentLevelTemplateArgs { + rarity: 0, + level: 0, + property_rate: 0, + unk_3: 0, + unk_4: 0, + unk_5: 0, + unk_6: 0, + } + } +} + +pub struct EquipmentLevelTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EquipmentLevelTemplateBuilder<'a, 'b, A> { + #[inline] + pub fn add_rarity(&mut self, rarity: i32) { + self.fbb_ + .push_slot::(EquipmentLevelTemplate::VT_RARITY, rarity, 0); + } + #[inline] + pub fn add_level(&mut self, level: i32) { + self.fbb_ + .push_slot::(EquipmentLevelTemplate::VT_LEVEL, level, 0); + } + #[inline] + pub fn add_property_rate(&mut self, property_rate: i32) { + self.fbb_ + .push_slot::(EquipmentLevelTemplate::VT_PROPERTY_RATE, property_rate, 0); + } + #[inline] + pub fn add_unk_3(&mut self, unk_3: i32) { + self.fbb_ + .push_slot::(EquipmentLevelTemplate::VT_UNK_3, unk_3, 0); + } + #[inline] + pub fn add_unk_4(&mut self, unk_4: i32) { + self.fbb_ + .push_slot::(EquipmentLevelTemplate::VT_UNK_4, unk_4, 0); + } + #[inline] + pub fn add_unk_5(&mut self, unk_5: i32) { + self.fbb_ + .push_slot::(EquipmentLevelTemplate::VT_UNK_5, unk_5, 0); + } + #[inline] + pub fn add_unk_6(&mut self, unk_6: i32) { + self.fbb_ + .push_slot::(EquipmentLevelTemplate::VT_UNK_6, unk_6, 0); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> EquipmentLevelTemplateBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + EquipmentLevelTemplateBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for EquipmentLevelTemplate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("EquipmentLevelTemplate"); + ds.field("rarity", &self.rarity()); + ds.field("level", &self.level()); + ds.field("property_rate", &self.property_rate()); + ds.field("unk_3", &self.unk_3()); + ds.field("unk_4", &self.unk_4()); + ds.field("unk_5", &self.unk_5()); + ds.field("unk_6", &self.unk_6()); + ds.finish() + } } pub enum AvatarBaseTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct AvatarBaseTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for AvatarBaseTemplateTb<'a> { - type Inner = AvatarBaseTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = AvatarBaseTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> AvatarBaseTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - AvatarBaseTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args AvatarBaseTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = AvatarBaseTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AvatarBaseTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args AvatarBaseTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = AvatarBaseTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(AvatarBaseTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(AvatarBaseTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for AvatarBaseTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct AvatarBaseTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for AvatarBaseTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - AvatarBaseTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + AvatarBaseTemplateTbArgs { data: None } } - } } pub struct AvatarBaseTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AvatarBaseTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(AvatarBaseTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> AvatarBaseTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - AvatarBaseTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(AvatarBaseTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> AvatarBaseTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + AvatarBaseTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for AvatarBaseTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("AvatarBaseTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AvatarBaseTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum WeaponTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct WeaponTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for WeaponTemplateTb<'a> { - type Inner = WeaponTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = WeaponTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> WeaponTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - WeaponTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args WeaponTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = WeaponTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + WeaponTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args WeaponTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = WeaponTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(WeaponTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(WeaponTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for WeaponTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct WeaponTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for WeaponTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - WeaponTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + WeaponTemplateTbArgs { data: None } } - } } pub struct WeaponTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> WeaponTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(WeaponTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> WeaponTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - WeaponTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(WeaponTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> WeaponTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + WeaponTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for WeaponTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("WeaponTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("WeaponTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum UnlockConfigTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct UnlockConfigTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for UnlockConfigTemplateTb<'a> { - type Inner = UnlockConfigTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = UnlockConfigTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> UnlockConfigTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - UnlockConfigTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args UnlockConfigTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = UnlockConfigTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + UnlockConfigTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args UnlockConfigTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = UnlockConfigTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(UnlockConfigTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(UnlockConfigTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for UnlockConfigTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct UnlockConfigTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for UnlockConfigTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - UnlockConfigTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + UnlockConfigTemplateTbArgs { data: None } } - } } pub struct UnlockConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UnlockConfigTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(UnlockConfigTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UnlockConfigTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - UnlockConfigTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(UnlockConfigTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> UnlockConfigTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + UnlockConfigTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for UnlockConfigTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("UnlockConfigTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("UnlockConfigTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum PostGirlConfigTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct PostGirlConfigTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for PostGirlConfigTemplateTb<'a> { - type Inner = PostGirlConfigTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = PostGirlConfigTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> PostGirlConfigTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - PostGirlConfigTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args PostGirlConfigTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = PostGirlConfigTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + PostGirlConfigTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args PostGirlConfigTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = PostGirlConfigTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(PostGirlConfigTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(PostGirlConfigTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for PostGirlConfigTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct PostGirlConfigTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for PostGirlConfigTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - PostGirlConfigTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + PostGirlConfigTemplateTbArgs { data: None } } - } } pub struct PostGirlConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PostGirlConfigTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(PostGirlConfigTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PostGirlConfigTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - PostGirlConfigTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(PostGirlConfigTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> PostGirlConfigTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + PostGirlConfigTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for PostGirlConfigTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("PostGirlConfigTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("PostGirlConfigTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum ArchiveFileQuestTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct ArchiveFileQuestTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for ArchiveFileQuestTemplateTb<'a> { - type Inner = ArchiveFileQuestTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = ArchiveFileQuestTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> ArchiveFileQuestTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ArchiveFileQuestTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args ArchiveFileQuestTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = ArchiveFileQuestTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ArchiveFileQuestTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args ArchiveFileQuestTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = ArchiveFileQuestTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(ArchiveFileQuestTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(ArchiveFileQuestTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for ArchiveFileQuestTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct ArchiveFileQuestTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for ArchiveFileQuestTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - ArchiveFileQuestTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + ArchiveFileQuestTemplateTbArgs { data: None } } - } } pub struct ArchiveFileQuestTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ArchiveFileQuestTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(ArchiveFileQuestTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ArchiveFileQuestTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - ArchiveFileQuestTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_.push_slot_always::>( + ArchiveFileQuestTemplateTb::VT_DATA, + data, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> ArchiveFileQuestTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + ArchiveFileQuestTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for ArchiveFileQuestTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ArchiveFileQuestTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ArchiveFileQuestTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum ArchiveBattleQuestTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct ArchiveBattleQuestTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for ArchiveBattleQuestTemplateTb<'a> { - type Inner = ArchiveBattleQuestTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = ArchiveBattleQuestTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> ArchiveBattleQuestTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ArchiveBattleQuestTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args ArchiveBattleQuestTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = ArchiveBattleQuestTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ArchiveBattleQuestTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args ArchiveBattleQuestTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = ArchiveBattleQuestTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(ArchiveBattleQuestTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(ArchiveBattleQuestTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for ArchiveBattleQuestTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct ArchiveBattleQuestTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for ArchiveBattleQuestTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - ArchiveBattleQuestTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + ArchiveBattleQuestTemplateTbArgs { data: None } } - } } pub struct ArchiveBattleQuestTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ArchiveBattleQuestTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(ArchiveBattleQuestTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ArchiveBattleQuestTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - ArchiveBattleQuestTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_.push_slot_always::>( + ArchiveBattleQuestTemplateTb::VT_DATA, + data, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> ArchiveBattleQuestTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + ArchiveBattleQuestTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for ArchiveBattleQuestTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ArchiveBattleQuestTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ArchiveBattleQuestTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum SectionConfigTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct SectionConfigTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for SectionConfigTemplateTb<'a> { - type Inner = SectionConfigTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = SectionConfigTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> SectionConfigTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SectionConfigTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args SectionConfigTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = SectionConfigTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SectionConfigTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args SectionConfigTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = SectionConfigTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(SectionConfigTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(SectionConfigTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for SectionConfigTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct SectionConfigTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for SectionConfigTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - SectionConfigTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + SectionConfigTemplateTbArgs { data: None } } - } } pub struct SectionConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SectionConfigTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(SectionConfigTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SectionConfigTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - SectionConfigTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(SectionConfigTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> SectionConfigTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + SectionConfigTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for SectionConfigTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SectionConfigTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SectionConfigTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum MainCityBGMConfigTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct MainCityBGMConfigTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for MainCityBGMConfigTemplateTb<'a> { - type Inner = MainCityBGMConfigTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = MainCityBGMConfigTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> MainCityBGMConfigTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - MainCityBGMConfigTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args MainCityBGMConfigTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = MainCityBGMConfigTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + MainCityBGMConfigTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args MainCityBGMConfigTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = MainCityBGMConfigTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(MainCityBGMConfigTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(MainCityBGMConfigTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for MainCityBGMConfigTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct MainCityBGMConfigTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for MainCityBGMConfigTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - MainCityBGMConfigTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + MainCityBGMConfigTemplateTbArgs { data: None } } - } } pub struct MainCityBGMConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MainCityBGMConfigTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(MainCityBGMConfigTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MainCityBGMConfigTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - MainCityBGMConfigTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_.push_slot_always::>( + MainCityBGMConfigTemplateTb::VT_DATA, + data, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> MainCityBGMConfigTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + MainCityBGMConfigTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for MainCityBGMConfigTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("MainCityBGMConfigTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("MainCityBGMConfigTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum HollowBuffTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct HollowBuffTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for HollowBuffTemplateTb<'a> { - type Inner = HollowBuffTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = HollowBuffTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> HollowBuffTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - HollowBuffTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args HollowBuffTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = HollowBuffTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + HollowBuffTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args HollowBuffTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = HollowBuffTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(HollowBuffTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(HollowBuffTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for HollowBuffTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct HollowBuffTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for HollowBuffTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - HollowBuffTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + HollowBuffTemplateTbArgs { data: None } } - } } pub struct HollowBuffTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> HollowBuffTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(HollowBuffTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> HollowBuffTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - HollowBuffTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(HollowBuffTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> HollowBuffTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + HollowBuffTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for HollowBuffTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("HollowBuffTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("HollowBuffTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum CafeConfigTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct CafeConfigTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for CafeConfigTemplateTb<'a> { - type Inner = CafeConfigTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = CafeConfigTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> CafeConfigTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - CafeConfigTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args CafeConfigTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = CafeConfigTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + CafeConfigTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args CafeConfigTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = CafeConfigTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(CafeConfigTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(CafeConfigTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for CafeConfigTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct CafeConfigTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for CafeConfigTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - CafeConfigTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + CafeConfigTemplateTbArgs { data: None } } - } } pub struct CafeConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CafeConfigTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(CafeConfigTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CafeConfigTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - CafeConfigTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(CafeConfigTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> CafeConfigTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + CafeConfigTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for CafeConfigTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("CafeConfigTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("CafeConfigTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum EquipmentTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct EquipmentTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for EquipmentTemplateTb<'a> { - type Inner = EquipmentTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = EquipmentTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> EquipmentTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - EquipmentTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args EquipmentTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = EquipmentTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + EquipmentTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args EquipmentTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = EquipmentTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(EquipmentTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(EquipmentTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for EquipmentTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct EquipmentTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for EquipmentTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - EquipmentTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + EquipmentTemplateTbArgs { data: None } } - } } pub struct EquipmentTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EquipmentTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(EquipmentTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EquipmentTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - EquipmentTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(EquipmentTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> EquipmentTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + EquipmentTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for EquipmentTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("EquipmentTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("EquipmentTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum EquipmentSuitTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct EquipmentSuitTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for EquipmentSuitTemplateTb<'a> { - type Inner = EquipmentSuitTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = EquipmentSuitTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> EquipmentSuitTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - EquipmentSuitTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args EquipmentSuitTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = EquipmentSuitTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + EquipmentSuitTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args EquipmentSuitTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = EquipmentSuitTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(EquipmentSuitTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(EquipmentSuitTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for EquipmentSuitTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct EquipmentSuitTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for EquipmentSuitTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - EquipmentSuitTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + EquipmentSuitTemplateTbArgs { data: None } } - } } pub struct EquipmentSuitTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EquipmentSuitTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(EquipmentSuitTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EquipmentSuitTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - EquipmentSuitTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(EquipmentSuitTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> EquipmentSuitTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + EquipmentSuitTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for EquipmentSuitTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("EquipmentSuitTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("EquipmentSuitTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum HollowConfigTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct HollowConfigTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for HollowConfigTemplateTb<'a> { - type Inner = HollowConfigTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = HollowConfigTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> HollowConfigTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - HollowConfigTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args HollowConfigTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = HollowConfigTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + HollowConfigTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args HollowConfigTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = HollowConfigTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(HollowConfigTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(HollowConfigTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for HollowConfigTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct HollowConfigTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for HollowConfigTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - HollowConfigTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + HollowConfigTemplateTbArgs { data: None } } - } } pub struct HollowConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> HollowConfigTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(HollowConfigTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> HollowConfigTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - HollowConfigTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(HollowConfigTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> HollowConfigTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + HollowConfigTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for HollowConfigTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("HollowConfigTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("HollowConfigTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum HollowQuestTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct HollowQuestTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for HollowQuestTemplateTb<'a> { - type Inner = HollowQuestTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = HollowQuestTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> HollowQuestTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - HollowQuestTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args HollowQuestTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = HollowQuestTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + HollowQuestTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args HollowQuestTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = HollowQuestTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(HollowQuestTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(HollowQuestTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for HollowQuestTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct HollowQuestTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for HollowQuestTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - HollowQuestTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + HollowQuestTemplateTbArgs { data: None } } - } } pub struct HollowQuestTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> HollowQuestTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(HollowQuestTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> HollowQuestTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - HollowQuestTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(HollowQuestTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> HollowQuestTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + HollowQuestTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for HollowQuestTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("HollowQuestTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("HollowQuestTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum BattleGroupConfigTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct BattleGroupConfigTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for BattleGroupConfigTemplateTb<'a> { - type Inner = BattleGroupConfigTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = BattleGroupConfigTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> BattleGroupConfigTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - BattleGroupConfigTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args BattleGroupConfigTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = BattleGroupConfigTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + BattleGroupConfigTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args BattleGroupConfigTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = BattleGroupConfigTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(BattleGroupConfigTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(BattleGroupConfigTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for BattleGroupConfigTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct BattleGroupConfigTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for BattleGroupConfigTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - BattleGroupConfigTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + BattleGroupConfigTemplateTbArgs { data: None } } - } } pub struct BattleGroupConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BattleGroupConfigTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(BattleGroupConfigTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BattleGroupConfigTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - BattleGroupConfigTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_.push_slot_always::>( + BattleGroupConfigTemplateTb::VT_DATA, + data, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> BattleGroupConfigTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + BattleGroupConfigTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for BattleGroupConfigTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("BattleGroupConfigTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("BattleGroupConfigTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum MusicPlayerConfigTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct MusicPlayerConfigTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for MusicPlayerConfigTemplateTb<'a> { - type Inner = MusicPlayerConfigTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = MusicPlayerConfigTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> MusicPlayerConfigTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - MusicPlayerConfigTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args MusicPlayerConfigTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = MusicPlayerConfigTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + MusicPlayerConfigTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args MusicPlayerConfigTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = MusicPlayerConfigTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(MusicPlayerConfigTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(MusicPlayerConfigTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for MusicPlayerConfigTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct MusicPlayerConfigTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for MusicPlayerConfigTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - MusicPlayerConfigTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + MusicPlayerConfigTemplateTbArgs { data: None } } - } } pub struct MusicPlayerConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MusicPlayerConfigTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(MusicPlayerConfigTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MusicPlayerConfigTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - MusicPlayerConfigTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_.push_slot_always::>( + MusicPlayerConfigTemplateTb::VT_DATA, + data, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> MusicPlayerConfigTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + MusicPlayerConfigTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for MusicPlayerConfigTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("MusicPlayerConfigTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("MusicPlayerConfigTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum TeleportConfigTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct TeleportConfigTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for TeleportConfigTemplateTb<'a> { - type Inner = TeleportConfigTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = TeleportConfigTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> TeleportConfigTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - TeleportConfigTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args TeleportConfigTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = TeleportConfigTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TeleportConfigTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args TeleportConfigTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = TeleportConfigTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(TeleportConfigTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(TeleportConfigTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for TeleportConfigTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct TeleportConfigTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for TeleportConfigTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - TeleportConfigTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + TeleportConfigTemplateTbArgs { data: None } } - } } pub struct TeleportConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TeleportConfigTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(TeleportConfigTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TeleportConfigTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - TeleportConfigTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(TeleportConfigTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> TeleportConfigTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + TeleportConfigTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for TeleportConfigTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("TeleportConfigTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("TeleportConfigTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } pub enum ConditionConfigTemplateTbOffset {} #[derive(Copy, Clone, PartialEq)] pub struct ConditionConfigTemplateTb<'a> { - pub _tab: flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } impl<'a> flatbuffers::Follow<'a> for ConditionConfigTemplateTb<'a> { - type Inner = ConditionConfigTemplateTb<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } + type Inner = ConditionConfigTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } } impl<'a> ConditionConfigTemplateTb<'a> { - pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ConditionConfigTemplateTb { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, - args: &'args ConditionConfigTemplateTbArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = ConditionConfigTemplateTbBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - builder.finish() - } + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ConditionConfigTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args ConditionConfigTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = ConditionConfigTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } - - #[inline] - pub fn data(&self) -> Option>>> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>>>(ConditionConfigTemplateTb::VT_DATA, None)} - } + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(ConditionConfigTemplateTb::VT_DATA, None) + } + } } impl flatbuffers::Verifiable for ConditionConfigTemplateTb<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } } pub struct ConditionConfigTemplateTbArgs<'a> { - pub data: Option>>>>, + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, } impl<'a> Default for ConditionConfigTemplateTbArgs<'a> { - #[inline] - fn default() -> Self { - ConditionConfigTemplateTbArgs { - data: None, + #[inline] + fn default() -> Self { + ConditionConfigTemplateTbArgs { data: None } } - } } pub struct ConditionConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, - start_: flatbuffers::WIPOffset, + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ConditionConfigTemplateTbBuilder<'a, 'b, A> { - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(ConditionConfigTemplateTb::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ConditionConfigTemplateTbBuilder<'a, 'b, A> { - let start = _fbb.start_table(); - ConditionConfigTemplateTbBuilder { - fbb_: _fbb, - start_: start, + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_.push_slot_always::>( + ConditionConfigTemplateTb::VT_DATA, + data, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> ConditionConfigTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + ConditionConfigTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) } - } - #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { - let o = self.fbb_.end_table(self.start_); - flatbuffers::WIPOffset::new(o.value()) - } } impl core::fmt::Debug for ConditionConfigTemplateTb<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ConditionConfigTemplateTb"); - ds.field("data", &self.data()); - ds.finish() - } + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ConditionConfigTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } +} +pub enum AvatarBattleTemplateTbOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct AvatarBattleTemplateTb<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AvatarBattleTemplateTb<'a> { + type Inner = AvatarBattleTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } +} + +impl<'a> AvatarBattleTemplateTb<'a> { + pub const VT_DATA: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AvatarBattleTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args AvatarBattleTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = AvatarBattleTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } + + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(AvatarBattleTemplateTb::VT_DATA, None) + } + } +} + +impl flatbuffers::Verifiable for AvatarBattleTemplateTb<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } +} +pub struct AvatarBattleTemplateTbArgs<'a> { + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, +} +impl<'a> Default for AvatarBattleTemplateTbArgs<'a> { + #[inline] + fn default() -> Self { + AvatarBattleTemplateTbArgs { data: None } + } +} + +pub struct AvatarBattleTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AvatarBattleTemplateTbBuilder<'a, 'b, A> { + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(AvatarBattleTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> AvatarBattleTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + AvatarBattleTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for AvatarBattleTemplateTb<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AvatarBattleTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } +} +pub enum AvatarLevelAdvanceTemplateTbOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct AvatarLevelAdvanceTemplateTb<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AvatarLevelAdvanceTemplateTb<'a> { + type Inner = AvatarLevelAdvanceTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } +} + +impl<'a> AvatarLevelAdvanceTemplateTb<'a> { + pub const VT_DATA: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AvatarLevelAdvanceTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args AvatarLevelAdvanceTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = AvatarLevelAdvanceTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } + + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(AvatarLevelAdvanceTemplateTb::VT_DATA, None) + } + } +} + +impl flatbuffers::Verifiable for AvatarLevelAdvanceTemplateTb<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } +} +pub struct AvatarLevelAdvanceTemplateTbArgs<'a> { + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, +} +impl<'a> Default for AvatarLevelAdvanceTemplateTbArgs<'a> { + #[inline] + fn default() -> Self { + AvatarLevelAdvanceTemplateTbArgs { data: None } + } +} + +pub struct AvatarLevelAdvanceTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AvatarLevelAdvanceTemplateTbBuilder<'a, 'b, A> { + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_.push_slot_always::>( + AvatarLevelAdvanceTemplateTb::VT_DATA, + data, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> AvatarLevelAdvanceTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + AvatarLevelAdvanceTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for AvatarLevelAdvanceTemplateTb<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AvatarLevelAdvanceTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } +} +pub enum WeaponLevelTemplateTbOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct WeaponLevelTemplateTb<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for WeaponLevelTemplateTb<'a> { + type Inner = WeaponLevelTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } +} + +impl<'a> WeaponLevelTemplateTb<'a> { + pub const VT_DATA: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + WeaponLevelTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args WeaponLevelTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = WeaponLevelTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } + + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(WeaponLevelTemplateTb::VT_DATA, None) + } + } +} + +impl flatbuffers::Verifiable for WeaponLevelTemplateTb<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } +} +pub struct WeaponLevelTemplateTbArgs<'a> { + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, +} +impl<'a> Default for WeaponLevelTemplateTbArgs<'a> { + #[inline] + fn default() -> Self { + WeaponLevelTemplateTbArgs { data: None } + } +} + +pub struct WeaponLevelTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> WeaponLevelTemplateTbBuilder<'a, 'b, A> { + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(WeaponLevelTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> WeaponLevelTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + WeaponLevelTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for WeaponLevelTemplateTb<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("WeaponLevelTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } +} +pub enum WeaponStarTemplateTbOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct WeaponStarTemplateTb<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for WeaponStarTemplateTb<'a> { + type Inner = WeaponStarTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } +} + +impl<'a> WeaponStarTemplateTb<'a> { + pub const VT_DATA: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + WeaponStarTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args WeaponStarTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = WeaponStarTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } + + #[inline] + pub fn data( + &self, + ) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(WeaponStarTemplateTb::VT_DATA, None) + } + } +} + +impl flatbuffers::Verifiable for WeaponStarTemplateTb<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } +} +pub struct WeaponStarTemplateTbArgs<'a> { + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, +} +impl<'a> Default for WeaponStarTemplateTbArgs<'a> { + #[inline] + fn default() -> Self { + WeaponStarTemplateTbArgs { data: None } + } +} + +pub struct WeaponStarTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> WeaponStarTemplateTbBuilder<'a, 'b, A> { + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(WeaponStarTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> WeaponStarTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + WeaponStarTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for WeaponStarTemplateTb<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("WeaponStarTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } +} +pub enum AvatarPassiveSkillTemplateTbOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct AvatarPassiveSkillTemplateTb<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AvatarPassiveSkillTemplateTb<'a> { + type Inner = AvatarPassiveSkillTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } +} + +impl<'a> AvatarPassiveSkillTemplateTb<'a> { + pub const VT_DATA: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AvatarPassiveSkillTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args AvatarPassiveSkillTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = AvatarPassiveSkillTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } + + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(AvatarPassiveSkillTemplateTb::VT_DATA, None) + } + } +} + +impl flatbuffers::Verifiable for AvatarPassiveSkillTemplateTb<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } +} +pub struct AvatarPassiveSkillTemplateTbArgs<'a> { + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, +} +impl<'a> Default for AvatarPassiveSkillTemplateTbArgs<'a> { + #[inline] + fn default() -> Self { + AvatarPassiveSkillTemplateTbArgs { data: None } + } +} + +pub struct AvatarPassiveSkillTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AvatarPassiveSkillTemplateTbBuilder<'a, 'b, A> { + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_.push_slot_always::>( + AvatarPassiveSkillTemplateTb::VT_DATA, + data, + ); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> AvatarPassiveSkillTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + AvatarPassiveSkillTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for AvatarPassiveSkillTemplateTb<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AvatarPassiveSkillTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } +} +pub enum EquipmentLevelTemplateTbOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct EquipmentLevelTemplateTb<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for EquipmentLevelTemplateTb<'a> { + type Inner = EquipmentLevelTemplateTb<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { + _tab: flatbuffers::Table::new(buf, loc), + } + } +} + +impl<'a> EquipmentLevelTemplateTb<'a> { + pub const VT_DATA: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + EquipmentLevelTemplateTb { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args EquipmentLevelTemplateTbArgs<'args>, + ) -> flatbuffers::WIPOffset> { + let mut builder = EquipmentLevelTemplateTbBuilder::new(_fbb); + if let Some(x) = args.data { + builder.add_data(x); + } + builder.finish() + } + + #[inline] + pub fn data( + &self, + ) -> Option>>> + { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { + self._tab.get::>, + >>(EquipmentLevelTemplateTb::VT_DATA, None) + } + } +} + +impl flatbuffers::Verifiable for EquipmentLevelTemplateTb<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, + pos: usize, + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>, + >>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } +} +pub struct EquipmentLevelTemplateTbArgs<'a> { + pub data: Option< + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, + >, + >, +} +impl<'a> Default for EquipmentLevelTemplateTbArgs<'a> { + #[inline] + fn default() -> Self { + EquipmentLevelTemplateTbArgs { data: None } + } +} + +pub struct EquipmentLevelTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EquipmentLevelTemplateTbBuilder<'a, 'b, A> { + #[inline] + pub fn add_data( + &mut self, + data: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, + >, + ) { + self.fbb_ + .push_slot_always::>(EquipmentLevelTemplateTb::VT_DATA, data); + } + #[inline] + pub fn new( + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + ) -> EquipmentLevelTemplateTbBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + EquipmentLevelTemplateTbBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for EquipmentLevelTemplateTb<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("EquipmentLevelTemplateTb"); + ds.field("data", &self.data()); + ds.finish() + } } diff --git a/crates/trigger-fileconfig/src/lib.rs b/crates/trigger-fileconfig/src/lib.rs index 50be6ac..22dc115 100644 --- a/crates/trigger-fileconfig/src/lib.rs +++ b/crates/trigger-fileconfig/src/lib.rs @@ -58,4 +58,10 @@ file_cfg! { BattleGroupConfigTemplateTb; MusicPlayerConfigTemplateTb; TeleportConfigTemplateTb; + AvatarBattleTemplateTb; + AvatarLevelAdvanceTemplateTb; + WeaponLevelTemplateTb; + WeaponStarTemplateTb; + AvatarPassiveSkillTemplateTb; + EquipmentLevelTemplateTb; } diff --git a/crates/trigger-logic/src/battle.rs b/crates/trigger-logic/src/battle.rs new file mode 100644 index 0000000..24ee765 --- /dev/null +++ b/crates/trigger-logic/src/battle.rs @@ -0,0 +1,91 @@ +use num_enum::{IntoPrimitive, TryFromPrimitive}; + +#[repr(u32)] +#[derive(IntoPrimitive, TryFromPrimitive)] +pub enum EPropertyType { + Hp = 1, + HpMax = 111, + Atk = 121, + BreakStun = 122, + Def = 131, + Crit = 201, + CritDmg = 211, + Pen = 231, + PenValue = 232, + SpRecover = 305, + ElementMystery = 312, + ElementAbnormalPower = 314, + AddedDamageRatioPhysics = 315, + AddedDamageRatioFire = 316, + AddedDamageRatioIce = 317, + AddedDamageRatioElec = 318, + AddedDamageRatioEther = 319, + // battle + HpMaxBattle = 1111, + AtkBattle = 1121, + BreakStunBattle = 1122, + DefBattle = 1131, + CritBattle = 1201, + CritDmgBattle = 1211, + PenRatioBattle = 1231, + PenDeltaBattle = 1232, + SpRecoverBattle = 1305, + ElementMysteryBattle = 1312, + ElementAbnormalPowerBattle = 1314, + AddedDamageRatioPhysicsBattle = 1315, + AddedDamageRatioFireBattle = 1316, + AddedDamageRatioIceBattle = 1317, + AddedDamageRatioElecBattle = 1318, + AddedDamageRatioEtherBattle = 1319, + // base + HpMaxBase = 11101, + AtkBase = 12101, + BreakStunBase = 12201, + DefBase = 13101, + CritBase = 20101, + CritDmgBase = 21101, + PenBase = 23101, + PenValueBase = 23201, + SpRecoverBase = 30501, + ElementMysteryBase = 31201, + ElementAbnormalPowerBase = 31401, + // ratio + HpMaxRatio = 11102, + AtkRatio = 12102, + BreakStunRatio = 12202, + DefRatio = 13102, + SpRecoverRatio = 30502, + ElementAbnormalPowerRatio = 31402, + // delta + HpMaxDelta = 11103, + AtkDelta = 12103, + BreakStunDelta = 12203, + DefDelta = 13103, + CritDelta = 20103, + CritDmgDelta = 21103, + PenDelta = 23103, + PenValueDelta = 23203, + SpRecoverDelta = 30503, + ElementMysteryDelta = 31203, + ElementAbnormalPowerDelta = 31403, + // damage ratios 1/3 + AddedDamageRatioPhysics1 = 31501, + AddedDamageRatioPhysics3 = 31503, + AddedDamageRatioFire1 = 31601, + AddedDamageRatioFire3 = 31603, + AddedDamageRatioIce1 = 31701, + AddedDamageRatioIce3 = 31703, + AddedDamageRatioElec1 = 31801, + AddedDamageRatioElec3 = 31803, + AddedDamageRatioEther1 = 31901, + AddedDamageRatioEther3 = 31903, + // --- custom + // growth + HpMaxGrowth = 9999_111_0, + AtkGrowth = 9999_121_0, + DefGrowth = 9999_131_0, + // advance + HpMaxAdvance = 9999_111_1, + AtkAdvance = 9999_121_1, + DefAdvance = 9999_131_1, +} diff --git a/crates/trigger-logic/src/lib.rs b/crates/trigger-logic/src/lib.rs index ce07c15..fe5dfca 100644 --- a/crates/trigger-logic/src/lib.rs +++ b/crates/trigger-logic/src/lib.rs @@ -1,4 +1,5 @@ pub mod action_pb; +pub mod battle; pub mod item; pub mod quest; pub mod scene; diff --git a/crates/trigger-protobuf/build.rs b/crates/trigger-protobuf/build.rs index 9ca64bc..c718804 100644 --- a/crates/trigger-protobuf/build.rs +++ b/crates/trigger-protobuf/build.rs @@ -5,7 +5,7 @@ use std::{ path::Path, }; -use quote::{quote, ToTokens}; +use quote::{ToTokens, quote}; use syn::{Field, GenericArgument, Item, PathArguments, Type, TypePath}; fn main() { diff --git a/crates/trigger-protobuf/out/_.rs b/crates/trigger-protobuf/out/_.rs index 61b541d..4c98db2 100644 --- a/crates/trigger-protobuf/out/_.rs +++ b/crates/trigger-protobuf/out/_.rs @@ -1039,6 +1039,8 @@ pub struct GetResourceDataScRsp { #[derive(trigger_protobuf_derive::XorFields)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BuddyUnitInfo { + #[prost(map = "uint32, int32", tag = "15")] + pub properties: ::std::collections::HashMap, #[xor(2099)] #[prost(uint32, tag = "14")] pub buddy_id: u32, @@ -1710,6 +1712,8 @@ pub struct AvatarUnitInfo { #[xor(11167)] #[prost(uint32, tag = "12")] pub avatar_id: u32, + #[prost(map = "uint32, int32", tag = "2")] + pub properties: ::std::collections::HashMap, } #[derive(trigger_protobuf_derive::CmdID)] #[cmdid(6984)] diff --git a/crates/trigger-protobuf/out/protocol_map.rs b/crates/trigger-protobuf/out/protocol_map.rs index 5ecd635..11c8817 100644 --- a/crates/trigger-protobuf/out/protocol_map.rs +++ b/crates/trigger-protobuf/out/protocol_map.rs @@ -4956,6 +4956,11 @@ impl From for ::trigger_protocol::AvatarUnitInfo { fn from(value: AvatarUnitInfo) -> Self { Self { avatar_id: value.avatar_id.into(), + properties: value + .properties + .into_iter() + .map(|(k, v)| (k.into(), v.into())) + .collect(), ..Default::default() } } @@ -4965,6 +4970,11 @@ impl From<::trigger_protocol::AvatarUnitInfo> for AvatarUnitInfo { fn from(value: ::trigger_protocol::AvatarUnitInfo) -> Self { Self { avatar_id: value.avatar_id.into(), + properties: value + .properties + .into_iter() + .map(|(k, v)| (k.into(), v.into())) + .collect(), ..Default::default() } } diff --git a/crates/trigger-protocol/src/lib.rs b/crates/trigger-protocol/src/lib.rs index dcabc9f..629e79d 100644 --- a/crates/trigger-protocol/src/lib.rs +++ b/crates/trigger-protocol/src/lib.rs @@ -355,6 +355,7 @@ pub struct DungeonEquipInfo { #[derive(Default, Debug, Clone, Encodeable, Decodeable)] pub struct AvatarUnitInfo { pub avatar_id: u32, + pub properties: HashMap, } #[derive(Default, Debug, Clone, Encodeable, Decodeable)] @@ -1792,4 +1793,4 @@ pub struct GetFlowerShopDataCsReq {} #[id(7151)] pub struct GetFlowerShopDataScRsp { pub retcode: i32, -} \ No newline at end of file +} diff --git a/crates/trigger-sv/src/config.rs b/crates/trigger-sv/src/config.rs index af8a235..1a6838f 100644 --- a/crates/trigger-sv/src/config.rs +++ b/crates/trigger-sv/src/config.rs @@ -1,4 +1,4 @@ -use serde::{de::DeserializeOwned, Deserialize, Deserializer}; +use serde::{Deserialize, Deserializer, de::DeserializeOwned}; use std::net::SocketAddr; use tracing::error; use trigger_database::DatabaseSetting; diff --git a/crates/trigger-sv/src/message/session.rs b/crates/trigger-sv/src/message/session.rs index 17fe7df..6f3b767 100644 --- a/crates/trigger-sv/src/message/session.rs +++ b/crates/trigger-sv/src/message/session.rs @@ -1,6 +1,6 @@ use crate::message::opcode; use trigger_codegen::{Decodeable, Encodeable}; -use trigger_protocol::{util::ProtocolUnit, DungeonEquipInfo}; +use trigger_protocol::{DungeonEquipInfo, util::ProtocolUnit}; #[derive(Debug, Encodeable, Decodeable)] pub struct BindClientSessionMessage { diff --git a/crates/trigger-sv/src/net/listener.rs b/crates/trigger-sv/src/net/listener.rs index 40b586e..7685786 100644 --- a/crates/trigger-sv/src/net/listener.rs +++ b/crates/trigger-sv/src/net/listener.rs @@ -4,7 +4,7 @@ use futures::future::BoxFuture; use tokio::task::JoinHandle; use tracing::warn; use trigger_encoding::Decodeable; -use zeromq::{prelude::*, PullSocket, ZmqError}; +use zeromq::{PullSocket, ZmqError, prelude::*}; use crate::message::NetworkPacket; diff --git a/crates/trigger-sv/src/net/mod.rs b/crates/trigger-sv/src/net/mod.rs index 9f37bdf..bae54c2 100644 --- a/crates/trigger-sv/src/net/mod.rs +++ b/crates/trigger-sv/src/net/mod.rs @@ -3,7 +3,7 @@ mod socket; use std::{collections::HashMap, io::Cursor, net::SocketAddr}; -pub use listener::{listen, RecvCallback}; +pub use listener::{RecvCallback, listen}; use num_enum::{IntoPrimitive, TryFromPrimitive}; pub use socket::ServerSocket; diff --git a/crates/trigger-sv/src/net/socket.rs b/crates/trigger-sv/src/net/socket.rs index b3c777a..5289b70 100644 --- a/crates/trigger-sv/src/net/socket.rs +++ b/crates/trigger-sv/src/net/socket.rs @@ -5,8 +5,8 @@ use std::time::Duration; use tokio::sync::mpsc; use tracing::warn; use trigger_encoding::Encodeable; -use zeromq::prelude::*; use zeromq::PushSocket; +use zeromq::prelude::*; use crate::message::NetworkPacket;