From 911149856eaf6ed55f0fa05fb6fafbff891f14f3 Mon Sep 17 00:00:00 2001 From: traffic95 Date: Tue, 18 Mar 2025 23:17:07 +0100 Subject: [PATCH] Added properties calculations --- crates/battle-server/src/logic/dungeon.rs | 4 + crates/battle-server/src/logic/mod.rs | 19 +- .../battle-server/src/logic/property_util.rs | 717 ++++ crates/trigger-fileconfig/fbs/tables.fbs | 201 +- .../gen_flatbuffers/tables_generated.rs | 3709 ++++++++++++++++- crates/trigger-fileconfig/src/lib.rs | 6 + crates/trigger-logic/src/battle.rs | 91 + crates/trigger-logic/src/lib.rs | 1 + crates/trigger-protobuf/out/_.rs | 4 + crates/trigger-protobuf/out/protocol_map.rs | 10 + crates/trigger-protocol/src/lib.rs | 1 + 11 files changed, 4717 insertions(+), 46 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/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..d109588 100644 --- a/crates/trigger-fileconfig/gen_flatbuffers/tables_generated.rs +++ b/crates/trigger-fileconfig/gen_flatbuffers/tables_generated.rs @@ -4054,17 +4054,32 @@ 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_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_SECONDARY_SUIT_PROPERTYS: flatbuffers::VOffsetT = 18; + 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_ITEM_ICON: flatbuffers::VOffsetT = 24; + 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_ICON: flatbuffers::VOffsetT = 30; + 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 { @@ -4076,17 +4091,32 @@ impl<'a> EquipmentSuitTemplate<'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.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_item_icon { builder.add_suit_item_icon(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); - if let Some(x) = args.secondary_suit_propertys { builder.add_secondary_suit_propertys(x); } + 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); - if let Some(x) = args.primary_suit_propertys { builder.add_primary_suit_propertys(x); } + 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); @@ -4116,11 +4146,11 @@ impl<'a> EquipmentSuitTemplate<'a> { unsafe { self._tab.get::(EquipmentSuitTemplate::VT_PRIMARY_CONDITION, Some(0)).unwrap()} } #[inline] - pub fn primary_suit_propertys(&self) -> Option> { + 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_PRIMARY_SUIT_PROPERTYS, None)} + unsafe { self._tab.get::(EquipmentSuitTemplate::VT_UNK_3, Some(0)).unwrap()} } #[inline] pub fn primary_suit_ability(&self) -> i32 { @@ -4144,11 +4174,11 @@ impl<'a> EquipmentSuitTemplate<'a> { unsafe { self._tab.get::(EquipmentSuitTemplate::VT_SECONDARY_CONDITION, Some(0)).unwrap()} } #[inline] - pub fn secondary_suit_propertys(&self) -> Option> { + 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_SECONDARY_SUIT_PROPERTYS, None)} + unsafe { self._tab.get::(EquipmentSuitTemplate::VT_UNK_7, Some(0)).unwrap()} } #[inline] pub fn secondary_suit_ability(&self) -> i32 { @@ -4165,11 +4195,11 @@ impl<'a> EquipmentSuitTemplate<'a> { unsafe { self._tab.get::>(EquipmentSuitTemplate::VT_SECONDARY_DESCRIPTION, None)} } #[inline] - pub fn suit_item_icon(&self) -> Option<&'a str> { + 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_ITEM_ICON, None)} + unsafe { self._tab.get::>(EquipmentSuitTemplate::VT_SUIT_ICON, None)} } #[inline] pub fn suit_story(&self) -> Option<&'a str> { @@ -4186,11 +4216,116 @@ impl<'a> EquipmentSuitTemplate<'a> { unsafe { self._tab.get::>(EquipmentSuitTemplate::VT_SUIT_FILTER_OPTION, None)} } #[inline] - pub fn suit_icon(&self) -> Option<&'a str> { + 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_ICON, None)} + 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)} } } @@ -4204,17 +4339,32 @@ impl flatbuffers::Verifiable for EquipmentSuitTemplate<'_> { .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::("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::>>("secondary_suit_propertys", Self::VT_SECONDARY_SUIT_PROPERTYS, 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_item_icon", Self::VT_SUIT_ITEM_ICON, 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_icon", Self::VT_SUIT_ICON, 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(()) } @@ -4223,17 +4373,32 @@ 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] @@ -4242,17 +4407,32 @@ impl<'a> Default for EquipmentSuitTemplateArgs<'a> { id: 0, name: None, primary_condition: 0, - primary_suit_propertys: None, + unk_3: 0, primary_suit_ability: 0, primary_description: None, secondary_condition: 0, - secondary_suit_propertys: None, + unk_7: 0, secondary_suit_ability: 0, secondary_description: None, - suit_item_icon: None, + suit_icon: None, suit_story: None, suit_filter_option: None, - suit_icon: 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, } } } @@ -4275,8 +4455,8 @@ impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EquipmentSuitTemplateBuilder<'a 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); + 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) { @@ -4291,8 +4471,8 @@ impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EquipmentSuitTemplateBuilder<'a 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); + 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) { @@ -4303,8 +4483,8 @@ impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EquipmentSuitTemplateBuilder<'a 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); + 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>) { @@ -4315,8 +4495,68 @@ impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EquipmentSuitTemplateBuilder<'a 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); + 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> { @@ -4339,17 +4579,32 @@ impl core::fmt::Debug for 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("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("secondary_suit_propertys", &self.secondary_suit_propertys()); + 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_item_icon", &self.suit_item_icon()); + 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_icon", &self.suit_icon()); + 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() } } @@ -7111,6 +7366,2798 @@ impl core::fmt::Debug for ConditionConfigTemplate<'_> { 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>>>, + 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>>>, + 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>>) { + 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>>) { + 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>>>, + pub descriptions: Option>>>, + 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>>) { + self.fbb_.push_slot_always::>(AvatarPassiveSkillTemplate::VT_NAMES, names); + } + #[inline] + pub fn add_descriptions(&mut self, descriptions: flatbuffers::WIPOffset>>) { + 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)] @@ -8857,3 +11904,585 @@ impl core::fmt::Debug for ConditionConfigTemplateTb<'_> { 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>>>>, +} +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>>>) { + 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>>>>, +} +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>>>) { + 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>>>>, +} +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>>>) { + 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>>>>, +} +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>>>) { + 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>>>>, +} +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>>>) { + 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>>>>, +} +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>>>) { + 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..9923d57 --- /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, +} \ No newline at end of file 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/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..804c349 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)]