evelyn-rs/crates/evelyn-data/gen_flatbuffers/tables_generated.rs
xeon dca8dfa93c Rewrite server networking
Remove qwer-rpc and implement new efficient protocol on top of ZeroMQ. This may fix random disconnects. NOTE: you'll have to reset database and remove existing config files, format was changed
2025-01-02 14:36:01 +03:00

3318 lines
127 KiB
Rust

// automatically generated by the FlatBuffers compiler, do not modify
// @generated
use core::mem;
use core::cmp::Ordering;
extern crate flatbuffers;
use self::flatbuffers::{EndianScalar, Follow};
// struct Property, aligned to 4
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq)]
pub struct Property(pub [u8; 8]);
impl Default for Property {
fn default() -> Self {
Self([0; 8])
}
}
impl core::fmt::Debug for Property {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Property")
.field("property", &self.property())
.field("value", &self.value())
.finish()
}
}
impl flatbuffers::SimpleToVerifyInSlice for Property {}
impl<'a> flatbuffers::Follow<'a> for Property {
type Inner = &'a Property;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
<&'a Property>::follow(buf, loc)
}
}
impl<'a> flatbuffers::Follow<'a> for &'a Property {
type Inner = &'a Property;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
flatbuffers::follow_cast_ref::<Property>(buf, loc)
}
}
impl<'b> flatbuffers::Push for Property {
type Output = Property;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
let src = ::core::slice::from_raw_parts(self as *const Property as *const u8, <Self as flatbuffers::Push>::size());
dst.copy_from_slice(src);
}
#[inline]
fn alignment() -> flatbuffers::PushAlignment {
flatbuffers::PushAlignment::new(4)
}
}
impl<'a> flatbuffers::Verifiable for Property {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.in_buffer::<Self>(pos)
}
}
impl<'a> Property {
#[allow(clippy::too_many_arguments)]
pub fn new(
property: i32,
value: i32,
) -> Self {
let mut s = Self([0; 8]);
s.set_property(property);
s.set_value(value);
s
}
pub fn property(&self) -> i32 {
let mut mem = core::mem::MaybeUninit::<<i32 as EndianScalar>::Scalar>::uninit();
// Safety:
// Created from a valid Table for this object
// Which contains a valid value in this slot
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[0..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_property(&mut self, x: i32) {
let x_le = x.to_little_endian();
// Safety:
// Created from a valid Table for this object
// Which contains a valid value in this slot
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[0..].as_mut_ptr(),
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
);
}
}
pub fn value(&self) -> i32 {
let mut mem = core::mem::MaybeUninit::<<i32 as EndianScalar>::Scalar>::uninit();
// Safety:
// Created from a valid Table for this object
// Which contains a valid value in this slot
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[4..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_value(&mut self, x: i32) {
let x_le = x.to_little_endian();
// Safety:
// Created from a valid Table for this object
// Which contains a valid value in this slot
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[4..].as_mut_ptr(),
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
);
}
}
}
// struct RefineCost, aligned to 4
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq)]
pub struct RefineCost(pub [u8; 8]);
impl Default for RefineCost {
fn default() -> Self {
Self([0; 8])
}
}
impl core::fmt::Debug for RefineCost {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("RefineCost")
.field("item_id", &self.item_id())
.field("number", &self.number())
.finish()
}
}
impl flatbuffers::SimpleToVerifyInSlice for RefineCost {}
impl<'a> flatbuffers::Follow<'a> for RefineCost {
type Inner = &'a RefineCost;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
<&'a RefineCost>::follow(buf, loc)
}
}
impl<'a> flatbuffers::Follow<'a> for &'a RefineCost {
type Inner = &'a RefineCost;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
flatbuffers::follow_cast_ref::<RefineCost>(buf, loc)
}
}
impl<'b> flatbuffers::Push for RefineCost {
type Output = RefineCost;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
let src = ::core::slice::from_raw_parts(self as *const RefineCost as *const u8, <Self as flatbuffers::Push>::size());
dst.copy_from_slice(src);
}
#[inline]
fn alignment() -> flatbuffers::PushAlignment {
flatbuffers::PushAlignment::new(4)
}
}
impl<'a> flatbuffers::Verifiable for RefineCost {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.in_buffer::<Self>(pos)
}
}
impl<'a> RefineCost {
#[allow(clippy::too_many_arguments)]
pub fn new(
item_id: i32,
number: i32,
) -> Self {
let mut s = Self([0; 8]);
s.set_item_id(item_id);
s.set_number(number);
s
}
pub fn item_id(&self) -> i32 {
let mut mem = core::mem::MaybeUninit::<<i32 as EndianScalar>::Scalar>::uninit();
// Safety:
// Created from a valid Table for this object
// Which contains a valid value in this slot
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[0..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_item_id(&mut self, x: i32) {
let x_le = x.to_little_endian();
// Safety:
// Created from a valid Table for this object
// Which contains a valid value in this slot
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[0..].as_mut_ptr(),
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
);
}
}
pub fn number(&self) -> i32 {
let mut mem = core::mem::MaybeUninit::<<i32 as EndianScalar>::Scalar>::uninit();
// Safety:
// Created from a valid Table for this object
// Which contains a valid value in this slot
EndianScalar::from_little_endian(unsafe {
core::ptr::copy_nonoverlapping(
self.0[4..].as_ptr(),
mem.as_mut_ptr() as *mut u8,
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
);
mem.assume_init()
})
}
pub fn set_number(&mut self, x: i32) {
let x_le = x.to_little_endian();
// Safety:
// Created from a valid Table for this object
// Which contains a valid value in this slot
unsafe {
core::ptr::copy_nonoverlapping(
&x_le as *const _ as *const u8,
self.0[4..].as_mut_ptr(),
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
);
}
}
}
pub enum AvatarBaseTemplateOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct AvatarBaseTemplate<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for AvatarBaseTemplate<'a> {
type Inner = AvatarBaseTemplate<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> AvatarBaseTemplate<'a> {
pub const VT_ID: flatbuffers::VOffsetT = 4;
pub const VT_CODE_NAME: flatbuffers::VOffsetT = 6;
pub const VT_NAME: flatbuffers::VOffsetT = 8;
pub const VT_FULL_NAME: flatbuffers::VOffsetT = 10;
pub const VT_AUDIO_EVENT_REPLACE_PARAM: flatbuffers::VOffsetT = 12;
pub const VT_AUDIO_BANK: flatbuffers::VOffsetT = 14;
pub const VT_HIT_TYPES: flatbuffers::VOffsetT = 16;
pub const VT_ELEMENT_TYPES: flatbuffers::VOffsetT = 18;
pub const VT_UNK_1: flatbuffers::VOffsetT = 20;
pub const VT_GENDER: flatbuffers::VOffsetT = 22;
pub const VT_CAMP: flatbuffers::VOffsetT = 24;
pub const VT_UNK_2: flatbuffers::VOffsetT = 26;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
AvatarBaseTemplate { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args AvatarBaseTemplateArgs<'args>
) -> flatbuffers::WIPOffset<AvatarBaseTemplate<'bldr>> {
let mut builder = AvatarBaseTemplateBuilder::new(_fbb);
if let Some(x) = args.unk_2 { builder.add_unk_2(x); }
builder.add_camp(args.camp);
builder.add_gender(args.gender);
builder.add_unk_1(args.unk_1);
if let Some(x) = args.element_types { builder.add_element_types(x); }
if let Some(x) = args.hit_types { builder.add_hit_types(x); }
if let Some(x) = args.audio_bank { builder.add_audio_bank(x); }
if let Some(x) = args.audio_event_replace_param { builder.add_audio_event_replace_param(x); }
if let Some(x) = args.full_name { builder.add_full_name(x); }
if let Some(x) = args.name { builder.add_name(x); }
if let Some(x) = args.code_name { builder.add_code_name(x); }
builder.add_id(args.id);
builder.finish()
}
#[inline]
pub fn id(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(AvatarBaseTemplate::VT_ID, Some(0)).unwrap()}
}
#[inline]
pub fn code_name(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AvatarBaseTemplate::VT_CODE_NAME, None)}
}
#[inline]
pub fn name(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AvatarBaseTemplate::VT_NAME, None)}
}
#[inline]
pub fn full_name(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AvatarBaseTemplate::VT_FULL_NAME, None)}
}
#[inline]
pub fn audio_event_replace_param(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AvatarBaseTemplate::VT_AUDIO_EVENT_REPLACE_PARAM, None)}
}
#[inline]
pub fn audio_bank(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AvatarBaseTemplate::VT_AUDIO_BANK, None)}
}
#[inline]
pub fn hit_types(&self) -> Option<flatbuffers::Vector<'a, i32>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(AvatarBaseTemplate::VT_HIT_TYPES, None)}
}
#[inline]
pub fn element_types(&self) -> Option<flatbuffers::Vector<'a, i32>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(AvatarBaseTemplate::VT_ELEMENT_TYPES, None)}
}
#[inline]
pub fn unk_1(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(AvatarBaseTemplate::VT_UNK_1, Some(0)).unwrap()}
}
#[inline]
pub fn gender(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(AvatarBaseTemplate::VT_GENDER, Some(0)).unwrap()}
}
#[inline]
pub fn camp(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(AvatarBaseTemplate::VT_CAMP, Some(0)).unwrap()}
}
#[inline]
pub fn unk_2(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(AvatarBaseTemplate::VT_UNK_2, None)}
}
}
impl flatbuffers::Verifiable for AvatarBaseTemplate<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<i32>("id", Self::VT_ID, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("code_name", Self::VT_CODE_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("full_name", Self::VT_FULL_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("audio_event_replace_param", Self::VT_AUDIO_EVENT_REPLACE_PARAM, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("audio_bank", Self::VT_AUDIO_BANK, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("hit_types", Self::VT_HIT_TYPES, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("element_types", Self::VT_ELEMENT_TYPES, false)?
.visit_field::<i32>("unk_1", Self::VT_UNK_1, false)?
.visit_field::<i32>("gender", Self::VT_GENDER, false)?
.visit_field::<i32>("camp", Self::VT_CAMP, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("unk_2", Self::VT_UNK_2, false)?
.finish();
Ok(())
}
}
pub struct AvatarBaseTemplateArgs<'a> {
pub id: i32,
pub code_name: Option<flatbuffers::WIPOffset<&'a str>>,
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
pub full_name: Option<flatbuffers::WIPOffset<&'a str>>,
pub audio_event_replace_param: Option<flatbuffers::WIPOffset<&'a str>>,
pub audio_bank: Option<flatbuffers::WIPOffset<&'a str>>,
pub hit_types: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
pub element_types: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
pub unk_1: i32,
pub gender: i32,
pub camp: i32,
pub unk_2: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
}
impl<'a> Default for AvatarBaseTemplateArgs<'a> {
#[inline]
fn default() -> Self {
AvatarBaseTemplateArgs {
id: 0,
code_name: None,
name: None,
full_name: None,
audio_event_replace_param: None,
audio_bank: None,
hit_types: None,
element_types: None,
unk_1: 0,
gender: 0,
camp: 0,
unk_2: None,
}
}
}
pub struct AvatarBaseTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AvatarBaseTemplateBuilder<'a, 'b, A> {
#[inline]
pub fn add_id(&mut self, id: i32) {
self.fbb_.push_slot::<i32>(AvatarBaseTemplate::VT_ID, id, 0);
}
#[inline]
pub fn add_code_name(&mut self, code_name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AvatarBaseTemplate::VT_CODE_NAME, code_name);
}
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AvatarBaseTemplate::VT_NAME, name);
}
#[inline]
pub fn add_full_name(&mut self, full_name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AvatarBaseTemplate::VT_FULL_NAME, full_name);
}
#[inline]
pub fn add_audio_event_replace_param(&mut self, audio_event_replace_param: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AvatarBaseTemplate::VT_AUDIO_EVENT_REPLACE_PARAM, audio_event_replace_param);
}
#[inline]
pub fn add_audio_bank(&mut self, audio_bank: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AvatarBaseTemplate::VT_AUDIO_BANK, audio_bank);
}
#[inline]
pub fn add_hit_types(&mut self, hit_types: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AvatarBaseTemplate::VT_HIT_TYPES, hit_types);
}
#[inline]
pub fn add_element_types(&mut self, element_types: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AvatarBaseTemplate::VT_ELEMENT_TYPES, element_types);
}
#[inline]
pub fn add_unk_1(&mut self, unk_1: i32) {
self.fbb_.push_slot::<i32>(AvatarBaseTemplate::VT_UNK_1, unk_1, 0);
}
#[inline]
pub fn add_gender(&mut self, gender: i32) {
self.fbb_.push_slot::<i32>(AvatarBaseTemplate::VT_GENDER, gender, 0);
}
#[inline]
pub fn add_camp(&mut self, camp: i32) {
self.fbb_.push_slot::<i32>(AvatarBaseTemplate::VT_CAMP, camp, 0);
}
#[inline]
pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b str>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AvatarBaseTemplate::VT_UNK_2, unk_2);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> AvatarBaseTemplateBuilder<'a, 'b, A> {
let start = _fbb.start_table();
AvatarBaseTemplateBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<AvatarBaseTemplate<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for AvatarBaseTemplate<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("AvatarBaseTemplate");
ds.field("id", &self.id());
ds.field("code_name", &self.code_name());
ds.field("name", &self.name());
ds.field("full_name", &self.full_name());
ds.field("audio_event_replace_param", &self.audio_event_replace_param());
ds.field("audio_bank", &self.audio_bank());
ds.field("hit_types", &self.hit_types());
ds.field("element_types", &self.element_types());
ds.field("unk_1", &self.unk_1());
ds.field("gender", &self.gender());
ds.field("camp", &self.camp());
ds.field("unk_2", &self.unk_2());
ds.finish()
}
}
pub enum WeaponTemplateOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct WeaponTemplate<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for WeaponTemplate<'a> {
type Inner = WeaponTemplate<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> WeaponTemplate<'a> {
pub const VT_ITEM_ID: flatbuffers::VOffsetT = 4;
pub const VT_WEAPON_NAME: flatbuffers::VOffsetT = 6;
pub const VT_UNK_MISSING_FIELD: flatbuffers::VOffsetT = 8;
pub const VT_BASE_PROPERTY: flatbuffers::VOffsetT = 10;
pub const VT_RAND_PROPERTY: flatbuffers::VOffsetT = 12;
pub const VT_STAR_LIMIT: flatbuffers::VOffsetT = 14;
pub const VT_EXP_RECYCLE: flatbuffers::VOffsetT = 16;
pub const VT_WEAPON_SCRIPT_CONFIG: flatbuffers::VOffsetT = 18;
pub const VT_WEAPON_UI_MODEL: flatbuffers::VOffsetT = 20;
pub const VT_UNK_1: flatbuffers::VOffsetT = 22;
pub const VT_UNK_MISSING_FIELD_2: flatbuffers::VOffsetT = 24;
pub const VT_UNK_WEAPON_PATH: flatbuffers::VOffsetT = 26;
pub const VT_UNK_MISSING_FIELD_3: flatbuffers::VOffsetT = 28;
pub const VT_REFINE_INITIAL: flatbuffers::VOffsetT = 30;
pub const VT_REFINE_LIMIT: flatbuffers::VOffsetT = 32;
pub const VT_UNK_MISSING_FIELD_4: flatbuffers::VOffsetT = 34;
pub const VT_UNK_MISSING_FIELD_5: flatbuffers::VOffsetT = 36;
pub const VT_UNK_STRING_WITH_VALUES: flatbuffers::VOffsetT = 38;
pub const VT_UNK_MISSING_FIELD_6: flatbuffers::VOffsetT = 40;
pub const VT_UNK_2: flatbuffers::VOffsetT = 42;
pub const VT_WEAPON_DESC: flatbuffers::VOffsetT = 44;
pub const VT_WEAPON_RELEASE_TAG: flatbuffers::VOffsetT = 46;
pub const VT_UNK_EMPTY_STRING: flatbuffers::VOffsetT = 48;
pub const VT_AVATAR_ID: flatbuffers::VOffsetT = 50;
pub const VT_WEAPON_COMMENT: flatbuffers::VOffsetT = 52;
pub const VT_REFINE_COSTS: flatbuffers::VOffsetT = 54;
pub const VT_UNK_3: flatbuffers::VOffsetT = 56;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
WeaponTemplate { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args WeaponTemplateArgs<'args>
) -> flatbuffers::WIPOffset<WeaponTemplate<'bldr>> {
let mut builder = WeaponTemplateBuilder::new(_fbb);
builder.add_unk_3(args.unk_3);
if let Some(x) = args.refine_costs { builder.add_refine_costs(x); }
if let Some(x) = args.weapon_comment { builder.add_weapon_comment(x); }
builder.add_avatar_id(args.avatar_id);
if let Some(x) = args.unk_empty_string { builder.add_unk_empty_string(x); }
if let Some(x) = args.weapon_release_tag { builder.add_weapon_release_tag(x); }
if let Some(x) = args.weapon_desc { builder.add_weapon_desc(x); }
builder.add_unk_2(args.unk_2);
builder.add_unk_missing_field_6(args.unk_missing_field_6);
if let Some(x) = args.unk_string_with_values { builder.add_unk_string_with_values(x); }
builder.add_unk_missing_field_5(args.unk_missing_field_5);
builder.add_unk_missing_field_4(args.unk_missing_field_4);
builder.add_refine_limit(args.refine_limit);
builder.add_refine_initial(args.refine_initial);
builder.add_unk_missing_field_3(args.unk_missing_field_3);
if let Some(x) = args.unk_weapon_path { builder.add_unk_weapon_path(x); }
builder.add_unk_missing_field_2(args.unk_missing_field_2);
builder.add_unk_1(args.unk_1);
if let Some(x) = args.weapon_ui_model { builder.add_weapon_ui_model(x); }
if let Some(x) = args.weapon_script_config { builder.add_weapon_script_config(x); }
builder.add_exp_recycle(args.exp_recycle);
builder.add_star_limit(args.star_limit);
if let Some(x) = args.rand_property { builder.add_rand_property(x); }
if let Some(x) = args.base_property { builder.add_base_property(x); }
builder.add_unk_missing_field(args.unk_missing_field);
if let Some(x) = args.weapon_name { builder.add_weapon_name(x); }
builder.add_item_id(args.item_id);
builder.finish()
}
#[inline]
pub fn item_id(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_ITEM_ID, Some(0)).unwrap()}
}
#[inline]
pub fn weapon_name(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_WEAPON_NAME, None)}
}
#[inline]
pub fn unk_missing_field(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD, Some(0)).unwrap()}
}
#[inline]
pub fn base_property(&self) -> Option<&'a Property> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<Property>(WeaponTemplate::VT_BASE_PROPERTY, None)}
}
#[inline]
pub fn rand_property(&self) -> Option<&'a Property> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<Property>(WeaponTemplate::VT_RAND_PROPERTY, None)}
}
#[inline]
pub fn star_limit(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_STAR_LIMIT, Some(0)).unwrap()}
}
#[inline]
pub fn exp_recycle(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_EXP_RECYCLE, Some(0)).unwrap()}
}
#[inline]
pub fn weapon_script_config(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_WEAPON_SCRIPT_CONFIG, None)}
}
#[inline]
pub fn weapon_ui_model(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_WEAPON_UI_MODEL, None)}
}
#[inline]
pub fn unk_1(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_1, Some(0)).unwrap()}
}
#[inline]
pub fn unk_missing_field_2(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_2, Some(0)).unwrap()}
}
#[inline]
pub fn unk_weapon_path(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_UNK_WEAPON_PATH, None)}
}
#[inline]
pub fn unk_missing_field_3(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_3, Some(0)).unwrap()}
}
#[inline]
pub fn refine_initial(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_REFINE_INITIAL, Some(0)).unwrap()}
}
#[inline]
pub fn refine_limit(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_REFINE_LIMIT, Some(0)).unwrap()}
}
#[inline]
pub fn unk_missing_field_4(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_4, Some(0)).unwrap()}
}
#[inline]
pub fn unk_missing_field_5(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_5, Some(0)).unwrap()}
}
#[inline]
pub fn unk_string_with_values(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_UNK_STRING_WITH_VALUES, None)}
}
#[inline]
pub fn unk_missing_field_6(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_6, Some(0)).unwrap()}
}
#[inline]
pub fn unk_2(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_2, Some(0)).unwrap()}
}
#[inline]
pub fn weapon_desc(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_WEAPON_DESC, None)}
}
#[inline]
pub fn weapon_release_tag(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_WEAPON_RELEASE_TAG, None)}
}
#[inline]
pub fn unk_empty_string(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_UNK_EMPTY_STRING, None)}
}
#[inline]
pub fn avatar_id(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_AVATAR_ID, Some(0)).unwrap()}
}
#[inline]
pub fn weapon_comment(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_WEAPON_COMMENT, None)}
}
#[inline]
pub fn refine_costs(&self) -> Option<flatbuffers::Vector<'a, RefineCost>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, RefineCost>>>(WeaponTemplate::VT_REFINE_COSTS, None)}
}
#[inline]
pub fn unk_3(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_3, Some(0)).unwrap()}
}
}
impl flatbuffers::Verifiable for WeaponTemplate<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<i32>("item_id", Self::VT_ITEM_ID, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("weapon_name", Self::VT_WEAPON_NAME, false)?
.visit_field::<i32>("unk_missing_field", Self::VT_UNK_MISSING_FIELD, false)?
.visit_field::<Property>("base_property", Self::VT_BASE_PROPERTY, false)?
.visit_field::<Property>("rand_property", Self::VT_RAND_PROPERTY, false)?
.visit_field::<i32>("star_limit", Self::VT_STAR_LIMIT, false)?
.visit_field::<i32>("exp_recycle", Self::VT_EXP_RECYCLE, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("weapon_script_config", Self::VT_WEAPON_SCRIPT_CONFIG, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("weapon_ui_model", Self::VT_WEAPON_UI_MODEL, false)?
.visit_field::<i32>("unk_1", Self::VT_UNK_1, false)?
.visit_field::<i32>("unk_missing_field_2", Self::VT_UNK_MISSING_FIELD_2, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_weapon_path", Self::VT_UNK_WEAPON_PATH, false)?
.visit_field::<i32>("unk_missing_field_3", Self::VT_UNK_MISSING_FIELD_3, false)?
.visit_field::<i32>("refine_initial", Self::VT_REFINE_INITIAL, false)?
.visit_field::<i32>("refine_limit", Self::VT_REFINE_LIMIT, false)?
.visit_field::<i32>("unk_missing_field_4", Self::VT_UNK_MISSING_FIELD_4, false)?
.visit_field::<i32>("unk_missing_field_5", Self::VT_UNK_MISSING_FIELD_5, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_string_with_values", Self::VT_UNK_STRING_WITH_VALUES, false)?
.visit_field::<i32>("unk_missing_field_6", Self::VT_UNK_MISSING_FIELD_6, false)?
.visit_field::<i32>("unk_2", Self::VT_UNK_2, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("weapon_desc", Self::VT_WEAPON_DESC, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("weapon_release_tag", Self::VT_WEAPON_RELEASE_TAG, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_empty_string", Self::VT_UNK_EMPTY_STRING, false)?
.visit_field::<i32>("avatar_id", Self::VT_AVATAR_ID, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("weapon_comment", Self::VT_WEAPON_COMMENT, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, RefineCost>>>("refine_costs", Self::VT_REFINE_COSTS, false)?
.visit_field::<i32>("unk_3", Self::VT_UNK_3, false)?
.finish();
Ok(())
}
}
pub struct WeaponTemplateArgs<'a> {
pub item_id: i32,
pub weapon_name: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_missing_field: i32,
pub base_property: Option<&'a Property>,
pub rand_property: Option<&'a Property>,
pub star_limit: i32,
pub exp_recycle: i32,
pub weapon_script_config: Option<flatbuffers::WIPOffset<&'a str>>,
pub weapon_ui_model: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_1: i32,
pub unk_missing_field_2: i32,
pub unk_weapon_path: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_missing_field_3: i32,
pub refine_initial: i32,
pub refine_limit: i32,
pub unk_missing_field_4: i32,
pub unk_missing_field_5: i32,
pub unk_string_with_values: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_missing_field_6: i32,
pub unk_2: i32,
pub weapon_desc: Option<flatbuffers::WIPOffset<&'a str>>,
pub weapon_release_tag: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_empty_string: Option<flatbuffers::WIPOffset<&'a str>>,
pub avatar_id: i32,
pub weapon_comment: Option<flatbuffers::WIPOffset<&'a str>>,
pub refine_costs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, RefineCost>>>,
pub unk_3: i32,
}
impl<'a> Default for WeaponTemplateArgs<'a> {
#[inline]
fn default() -> Self {
WeaponTemplateArgs {
item_id: 0,
weapon_name: None,
unk_missing_field: 0,
base_property: None,
rand_property: None,
star_limit: 0,
exp_recycle: 0,
weapon_script_config: None,
weapon_ui_model: None,
unk_1: 0,
unk_missing_field_2: 0,
unk_weapon_path: None,
unk_missing_field_3: 0,
refine_initial: 0,
refine_limit: 0,
unk_missing_field_4: 0,
unk_missing_field_5: 0,
unk_string_with_values: None,
unk_missing_field_6: 0,
unk_2: 0,
weapon_desc: None,
weapon_release_tag: None,
unk_empty_string: None,
avatar_id: 0,
weapon_comment: None,
refine_costs: None,
unk_3: 0,
}
}
}
pub struct WeaponTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> WeaponTemplateBuilder<'a, 'b, A> {
#[inline]
pub fn add_item_id(&mut self, item_id: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_ITEM_ID, item_id, 0);
}
#[inline]
pub fn add_weapon_name(&mut self, weapon_name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_WEAPON_NAME, weapon_name);
}
#[inline]
pub fn add_unk_missing_field(&mut self, unk_missing_field: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD, unk_missing_field, 0);
}
#[inline]
pub fn add_base_property(&mut self, base_property: &Property) {
self.fbb_.push_slot_always::<&Property>(WeaponTemplate::VT_BASE_PROPERTY, base_property);
}
#[inline]
pub fn add_rand_property(&mut self, rand_property: &Property) {
self.fbb_.push_slot_always::<&Property>(WeaponTemplate::VT_RAND_PROPERTY, rand_property);
}
#[inline]
pub fn add_star_limit(&mut self, star_limit: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_STAR_LIMIT, star_limit, 0);
}
#[inline]
pub fn add_exp_recycle(&mut self, exp_recycle: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_EXP_RECYCLE, exp_recycle, 0);
}
#[inline]
pub fn add_weapon_script_config(&mut self, weapon_script_config: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_WEAPON_SCRIPT_CONFIG, weapon_script_config);
}
#[inline]
pub fn add_weapon_ui_model(&mut self, weapon_ui_model: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_WEAPON_UI_MODEL, weapon_ui_model);
}
#[inline]
pub fn add_unk_1(&mut self, unk_1: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_1, unk_1, 0);
}
#[inline]
pub fn add_unk_missing_field_2(&mut self, unk_missing_field_2: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_2, unk_missing_field_2, 0);
}
#[inline]
pub fn add_unk_weapon_path(&mut self, unk_weapon_path: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_UNK_WEAPON_PATH, unk_weapon_path);
}
#[inline]
pub fn add_unk_missing_field_3(&mut self, unk_missing_field_3: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_3, unk_missing_field_3, 0);
}
#[inline]
pub fn add_refine_initial(&mut self, refine_initial: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_REFINE_INITIAL, refine_initial, 0);
}
#[inline]
pub fn add_refine_limit(&mut self, refine_limit: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_REFINE_LIMIT, refine_limit, 0);
}
#[inline]
pub fn add_unk_missing_field_4(&mut self, unk_missing_field_4: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_4, unk_missing_field_4, 0);
}
#[inline]
pub fn add_unk_missing_field_5(&mut self, unk_missing_field_5: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_5, unk_missing_field_5, 0);
}
#[inline]
pub fn add_unk_string_with_values(&mut self, unk_string_with_values: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_UNK_STRING_WITH_VALUES, unk_string_with_values);
}
#[inline]
pub fn add_unk_missing_field_6(&mut self, unk_missing_field_6: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_6, unk_missing_field_6, 0);
}
#[inline]
pub fn add_unk_2(&mut self, unk_2: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_2, unk_2, 0);
}
#[inline]
pub fn add_weapon_desc(&mut self, weapon_desc: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_WEAPON_DESC, weapon_desc);
}
#[inline]
pub fn add_weapon_release_tag(&mut self, weapon_release_tag: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_WEAPON_RELEASE_TAG, weapon_release_tag);
}
#[inline]
pub fn add_unk_empty_string(&mut self, unk_empty_string: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_UNK_EMPTY_STRING, unk_empty_string);
}
#[inline]
pub fn add_avatar_id(&mut self, avatar_id: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_AVATAR_ID, avatar_id, 0);
}
#[inline]
pub fn add_weapon_comment(&mut self, weapon_comment: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_WEAPON_COMMENT, weapon_comment);
}
#[inline]
pub fn add_refine_costs(&mut self, refine_costs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , RefineCost>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_REFINE_COSTS, refine_costs);
}
#[inline]
pub fn add_unk_3(&mut self, unk_3: i32) {
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_3, unk_3, 0);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> WeaponTemplateBuilder<'a, 'b, A> {
let start = _fbb.start_table();
WeaponTemplateBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<WeaponTemplate<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for WeaponTemplate<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("WeaponTemplate");
ds.field("item_id", &self.item_id());
ds.field("weapon_name", &self.weapon_name());
ds.field("unk_missing_field", &self.unk_missing_field());
ds.field("base_property", &self.base_property());
ds.field("rand_property", &self.rand_property());
ds.field("star_limit", &self.star_limit());
ds.field("exp_recycle", &self.exp_recycle());
ds.field("weapon_script_config", &self.weapon_script_config());
ds.field("weapon_ui_model", &self.weapon_ui_model());
ds.field("unk_1", &self.unk_1());
ds.field("unk_missing_field_2", &self.unk_missing_field_2());
ds.field("unk_weapon_path", &self.unk_weapon_path());
ds.field("unk_missing_field_3", &self.unk_missing_field_3());
ds.field("refine_initial", &self.refine_initial());
ds.field("refine_limit", &self.refine_limit());
ds.field("unk_missing_field_4", &self.unk_missing_field_4());
ds.field("unk_missing_field_5", &self.unk_missing_field_5());
ds.field("unk_string_with_values", &self.unk_string_with_values());
ds.field("unk_missing_field_6", &self.unk_missing_field_6());
ds.field("unk_2", &self.unk_2());
ds.field("weapon_desc", &self.weapon_desc());
ds.field("weapon_release_tag", &self.weapon_release_tag());
ds.field("unk_empty_string", &self.unk_empty_string());
ds.field("avatar_id", &self.avatar_id());
ds.field("weapon_comment", &self.weapon_comment());
ds.field("refine_costs", &self.refine_costs());
ds.field("unk_3", &self.unk_3());
ds.finish()
}
}
pub enum UnlockConfigTemplateOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct UnlockConfigTemplate<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for UnlockConfigTemplate<'a> {
type Inner = UnlockConfigTemplate<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> UnlockConfigTemplate<'a> {
pub const VT_ID: flatbuffers::VOffsetT = 4;
pub const VT_UNK_1: flatbuffers::VOffsetT = 6;
pub const VT_UNK_2: flatbuffers::VOffsetT = 8;
pub const VT_UNK_3: flatbuffers::VOffsetT = 10;
pub const VT_UNK_4: flatbuffers::VOffsetT = 12;
pub const VT_UNK_5: flatbuffers::VOffsetT = 14;
pub const VT_UNK_6: flatbuffers::VOffsetT = 16;
pub const VT_UNK_7: flatbuffers::VOffsetT = 18;
pub const VT_UNK_8: flatbuffers::VOffsetT = 20;
pub const VT_ICON_RES: flatbuffers::VOffsetT = 22;
pub const VT_UNK_9: flatbuffers::VOffsetT = 24;
pub const VT_NAME: flatbuffers::VOffsetT = 26;
pub const VT_UNK_10: flatbuffers::VOffsetT = 28;
pub const VT_UNK_11: flatbuffers::VOffsetT = 30;
pub const VT_UNK_12: flatbuffers::VOffsetT = 32;
pub const VT_UNK_13: flatbuffers::VOffsetT = 34;
pub const VT_UNK_14: flatbuffers::VOffsetT = 36;
pub const VT_UNK_15: flatbuffers::VOffsetT = 38;
pub const VT_UNK_16: flatbuffers::VOffsetT = 40;
pub const VT_UNK_17: flatbuffers::VOffsetT = 42;
pub const VT_UNK_18: flatbuffers::VOffsetT = 44;
pub const VT_UNK_19: flatbuffers::VOffsetT = 46;
pub const VT_UNK_20: flatbuffers::VOffsetT = 48;
pub const VT_UNK_21: flatbuffers::VOffsetT = 50;
pub const VT_UNK_22: flatbuffers::VOffsetT = 52;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
UnlockConfigTemplate { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args UnlockConfigTemplateArgs<'args>
) -> flatbuffers::WIPOffset<UnlockConfigTemplate<'bldr>> {
let mut builder = UnlockConfigTemplateBuilder::new(_fbb);
if let Some(x) = args.unk_22 { builder.add_unk_22(x); }
builder.add_unk_21(args.unk_21);
if let Some(x) = args.unk_20 { builder.add_unk_20(x); }
builder.add_unk_19(args.unk_19);
builder.add_unk_18(args.unk_18);
if let Some(x) = args.unk_17 { builder.add_unk_17(x); }
builder.add_unk_16(args.unk_16);
if let Some(x) = args.unk_15 { builder.add_unk_15(x); }
builder.add_unk_14(args.unk_14);
builder.add_unk_12(args.unk_12);
builder.add_unk_11(args.unk_11);
if let Some(x) = args.unk_10 { builder.add_unk_10(x); }
if let Some(x) = args.name { builder.add_name(x); }
builder.add_unk_9(args.unk_9);
if let Some(x) = args.icon_res { builder.add_icon_res(x); }
if let Some(x) = args.unk_8 { builder.add_unk_8(x); }
builder.add_unk_7(args.unk_7);
if let Some(x) = args.unk_6 { builder.add_unk_6(x); }
builder.add_unk_5(args.unk_5);
builder.add_unk_4(args.unk_4);
builder.add_unk_3(args.unk_3);
if let Some(x) = args.unk_2 { builder.add_unk_2(x); }
if let Some(x) = args.unk_1 { builder.add_unk_1(x); }
builder.add_id(args.id);
builder.add_unk_13(args.unk_13);
builder.finish()
}
#[inline]
pub fn id(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_ID, Some(0)).unwrap()}
}
#[inline]
pub fn unk_1(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(UnlockConfigTemplate::VT_UNK_1, None)}
}
#[inline]
pub fn unk_2(&self) -> Option<flatbuffers::Vector<'a, i32>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(UnlockConfigTemplate::VT_UNK_2, None)}
}
#[inline]
pub fn unk_3(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_UNK_3, Some(0)).unwrap()}
}
#[inline]
pub fn unk_4(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_UNK_4, Some(0)).unwrap()}
}
#[inline]
pub fn unk_5(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_UNK_5, Some(0)).unwrap()}
}
#[inline]
pub fn unk_6(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(UnlockConfigTemplate::VT_UNK_6, None)}
}
#[inline]
pub fn unk_7(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_UNK_7, Some(0)).unwrap()}
}
#[inline]
pub fn unk_8(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(UnlockConfigTemplate::VT_UNK_8, None)}
}
#[inline]
pub fn icon_res(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(UnlockConfigTemplate::VT_ICON_RES, None)}
}
#[inline]
pub fn unk_9(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_UNK_9, Some(0)).unwrap()}
}
#[inline]
pub fn name(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(UnlockConfigTemplate::VT_NAME, None)}
}
#[inline]
pub fn unk_10(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(UnlockConfigTemplate::VT_UNK_10, None)}
}
#[inline]
pub fn unk_11(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_UNK_11, Some(0)).unwrap()}
}
#[inline]
pub fn unk_12(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_UNK_12, Some(0)).unwrap()}
}
#[inline]
pub fn unk_13(&self) -> bool {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<bool>(UnlockConfigTemplate::VT_UNK_13, Some(false)).unwrap()}
}
#[inline]
pub fn unk_14(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_UNK_14, Some(0)).unwrap()}
}
#[inline]
pub fn unk_15(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(UnlockConfigTemplate::VT_UNK_15, None)}
}
#[inline]
pub fn unk_16(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_UNK_16, Some(0)).unwrap()}
}
#[inline]
pub fn unk_17(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(UnlockConfigTemplate::VT_UNK_17, None)}
}
#[inline]
pub fn unk_18(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_UNK_18, Some(0)).unwrap()}
}
#[inline]
pub fn unk_19(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_UNK_19, Some(0)).unwrap()}
}
#[inline]
pub fn unk_20(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(UnlockConfigTemplate::VT_UNK_20, None)}
}
#[inline]
pub fn unk_21(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(UnlockConfigTemplate::VT_UNK_21, Some(0)).unwrap()}
}
#[inline]
pub fn unk_22(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(UnlockConfigTemplate::VT_UNK_22, None)}
}
}
impl flatbuffers::Verifiable for UnlockConfigTemplate<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<i32>("id", Self::VT_ID, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_1", Self::VT_UNK_1, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("unk_2", Self::VT_UNK_2, false)?
.visit_field::<i32>("unk_3", Self::VT_UNK_3, false)?
.visit_field::<i32>("unk_4", Self::VT_UNK_4, false)?
.visit_field::<i32>("unk_5", Self::VT_UNK_5, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_6", Self::VT_UNK_6, false)?
.visit_field::<i32>("unk_7", Self::VT_UNK_7, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_8", Self::VT_UNK_8, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("icon_res", Self::VT_ICON_RES, false)?
.visit_field::<i32>("unk_9", Self::VT_UNK_9, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_10", Self::VT_UNK_10, false)?
.visit_field::<i32>("unk_11", Self::VT_UNK_11, false)?
.visit_field::<i32>("unk_12", Self::VT_UNK_12, false)?
.visit_field::<bool>("unk_13", Self::VT_UNK_13, false)?
.visit_field::<i32>("unk_14", Self::VT_UNK_14, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_15", Self::VT_UNK_15, false)?
.visit_field::<i32>("unk_16", Self::VT_UNK_16, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_17", Self::VT_UNK_17, false)?
.visit_field::<i32>("unk_18", Self::VT_UNK_18, false)?
.visit_field::<i32>("unk_19", Self::VT_UNK_19, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_20", Self::VT_UNK_20, false)?
.visit_field::<i32>("unk_21", Self::VT_UNK_21, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_22", Self::VT_UNK_22, false)?
.finish();
Ok(())
}
}
pub struct UnlockConfigTemplateArgs<'a> {
pub id: i32,
pub unk_1: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_2: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
pub unk_3: i32,
pub unk_4: i32,
pub unk_5: i32,
pub unk_6: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_7: i32,
pub unk_8: Option<flatbuffers::WIPOffset<&'a str>>,
pub icon_res: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_9: i32,
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_10: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_11: i32,
pub unk_12: i32,
pub unk_13: bool,
pub unk_14: i32,
pub unk_15: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_16: i32,
pub unk_17: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_18: i32,
pub unk_19: i32,
pub unk_20: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_21: i32,
pub unk_22: Option<flatbuffers::WIPOffset<&'a str>>,
}
impl<'a> Default for UnlockConfigTemplateArgs<'a> {
#[inline]
fn default() -> Self {
UnlockConfigTemplateArgs {
id: 0,
unk_1: None,
unk_2: None,
unk_3: 0,
unk_4: 0,
unk_5: 0,
unk_6: None,
unk_7: 0,
unk_8: None,
icon_res: None,
unk_9: 0,
name: None,
unk_10: None,
unk_11: 0,
unk_12: 0,
unk_13: false,
unk_14: 0,
unk_15: None,
unk_16: 0,
unk_17: None,
unk_18: 0,
unk_19: 0,
unk_20: None,
unk_21: 0,
unk_22: None,
}
}
}
pub struct UnlockConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UnlockConfigTemplateBuilder<'a, 'b, A> {
#[inline]
pub fn add_id(&mut self, id: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_ID, id, 0);
}
#[inline]
pub fn add_unk_1(&mut self, unk_1: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(UnlockConfigTemplate::VT_UNK_1, unk_1);
}
#[inline]
pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(UnlockConfigTemplate::VT_UNK_2, unk_2);
}
#[inline]
pub fn add_unk_3(&mut self, unk_3: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_UNK_3, unk_3, 0);
}
#[inline]
pub fn add_unk_4(&mut self, unk_4: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_UNK_4, unk_4, 0);
}
#[inline]
pub fn add_unk_5(&mut self, unk_5: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_UNK_5, unk_5, 0);
}
#[inline]
pub fn add_unk_6(&mut self, unk_6: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(UnlockConfigTemplate::VT_UNK_6, unk_6);
}
#[inline]
pub fn add_unk_7(&mut self, unk_7: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_UNK_7, unk_7, 0);
}
#[inline]
pub fn add_unk_8(&mut self, unk_8: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(UnlockConfigTemplate::VT_UNK_8, unk_8);
}
#[inline]
pub fn add_icon_res(&mut self, icon_res: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(UnlockConfigTemplate::VT_ICON_RES, icon_res);
}
#[inline]
pub fn add_unk_9(&mut self, unk_9: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_UNK_9, unk_9, 0);
}
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(UnlockConfigTemplate::VT_NAME, name);
}
#[inline]
pub fn add_unk_10(&mut self, unk_10: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(UnlockConfigTemplate::VT_UNK_10, unk_10);
}
#[inline]
pub fn add_unk_11(&mut self, unk_11: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_UNK_11, unk_11, 0);
}
#[inline]
pub fn add_unk_12(&mut self, unk_12: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_UNK_12, unk_12, 0);
}
#[inline]
pub fn add_unk_13(&mut self, unk_13: bool) {
self.fbb_.push_slot::<bool>(UnlockConfigTemplate::VT_UNK_13, unk_13, false);
}
#[inline]
pub fn add_unk_14(&mut self, unk_14: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_UNK_14, unk_14, 0);
}
#[inline]
pub fn add_unk_15(&mut self, unk_15: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(UnlockConfigTemplate::VT_UNK_15, unk_15);
}
#[inline]
pub fn add_unk_16(&mut self, unk_16: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_UNK_16, unk_16, 0);
}
#[inline]
pub fn add_unk_17(&mut self, unk_17: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(UnlockConfigTemplate::VT_UNK_17, unk_17);
}
#[inline]
pub fn add_unk_18(&mut self, unk_18: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_UNK_18, unk_18, 0);
}
#[inline]
pub fn add_unk_19(&mut self, unk_19: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_UNK_19, unk_19, 0);
}
#[inline]
pub fn add_unk_20(&mut self, unk_20: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(UnlockConfigTemplate::VT_UNK_20, unk_20);
}
#[inline]
pub fn add_unk_21(&mut self, unk_21: i32) {
self.fbb_.push_slot::<i32>(UnlockConfigTemplate::VT_UNK_21, unk_21, 0);
}
#[inline]
pub fn add_unk_22(&mut self, unk_22: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(UnlockConfigTemplate::VT_UNK_22, unk_22);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UnlockConfigTemplateBuilder<'a, 'b, A> {
let start = _fbb.start_table();
UnlockConfigTemplateBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<UnlockConfigTemplate<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for UnlockConfigTemplate<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("UnlockConfigTemplate");
ds.field("id", &self.id());
ds.field("unk_1", &self.unk_1());
ds.field("unk_2", &self.unk_2());
ds.field("unk_3", &self.unk_3());
ds.field("unk_4", &self.unk_4());
ds.field("unk_5", &self.unk_5());
ds.field("unk_6", &self.unk_6());
ds.field("unk_7", &self.unk_7());
ds.field("unk_8", &self.unk_8());
ds.field("icon_res", &self.icon_res());
ds.field("unk_9", &self.unk_9());
ds.field("name", &self.name());
ds.field("unk_10", &self.unk_10());
ds.field("unk_11", &self.unk_11());
ds.field("unk_12", &self.unk_12());
ds.field("unk_13", &self.unk_13());
ds.field("unk_14", &self.unk_14());
ds.field("unk_15", &self.unk_15());
ds.field("unk_16", &self.unk_16());
ds.field("unk_17", &self.unk_17());
ds.field("unk_18", &self.unk_18());
ds.field("unk_19", &self.unk_19());
ds.field("unk_20", &self.unk_20());
ds.field("unk_21", &self.unk_21());
ds.field("unk_22", &self.unk_22());
ds.finish()
}
}
pub enum PostGirlConfigTemplateOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct PostGirlConfigTemplate<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for PostGirlConfigTemplate<'a> {
type Inner = PostGirlConfigTemplate<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> PostGirlConfigTemplate<'a> {
pub const VT_ID: flatbuffers::VOffsetT = 4;
pub const VT_NAME: flatbuffers::VOffsetT = 6;
pub const VT_TAG: flatbuffers::VOffsetT = 8;
pub const VT_UNK_1: flatbuffers::VOffsetT = 10;
pub const VT_UNK_2: flatbuffers::VOffsetT = 12;
pub const VT_UNK_3: flatbuffers::VOffsetT = 14;
pub const VT_ROLE_ICON_NAME: flatbuffers::VOffsetT = 16;
pub const VT_UNK_4: flatbuffers::VOffsetT = 18;
pub const VT_UNK_5: flatbuffers::VOffsetT = 20;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
PostGirlConfigTemplate { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args PostGirlConfigTemplateArgs<'args>
) -> flatbuffers::WIPOffset<PostGirlConfigTemplate<'bldr>> {
let mut builder = PostGirlConfigTemplateBuilder::new(_fbb);
if let Some(x) = args.unk_5 { builder.add_unk_5(x); }
if let Some(x) = args.unk_4 { builder.add_unk_4(x); }
if let Some(x) = args.role_icon_name { builder.add_role_icon_name(x); }
builder.add_unk_3(args.unk_3);
if let Some(x) = args.unk_2 { builder.add_unk_2(x); }
builder.add_unk_1(args.unk_1);
if let Some(x) = args.tag { builder.add_tag(x); }
if let Some(x) = args.name { builder.add_name(x); }
builder.add_id(args.id);
builder.finish()
}
#[inline]
pub fn id(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(PostGirlConfigTemplate::VT_ID, Some(0)).unwrap()}
}
#[inline]
pub fn name(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PostGirlConfigTemplate::VT_NAME, None)}
}
#[inline]
pub fn tag(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PostGirlConfigTemplate::VT_TAG, None)}
}
#[inline]
pub fn unk_1(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(PostGirlConfigTemplate::VT_UNK_1, Some(0)).unwrap()}
}
#[inline]
pub fn unk_2(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PostGirlConfigTemplate::VT_UNK_2, None)}
}
#[inline]
pub fn unk_3(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(PostGirlConfigTemplate::VT_UNK_3, Some(0)).unwrap()}
}
#[inline]
pub fn role_icon_name(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PostGirlConfigTemplate::VT_ROLE_ICON_NAME, None)}
}
#[inline]
pub fn unk_4(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PostGirlConfigTemplate::VT_UNK_4, None)}
}
#[inline]
pub fn unk_5(&self) -> Option<flatbuffers::Vector<'a, i32>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(PostGirlConfigTemplate::VT_UNK_5, None)}
}
}
impl flatbuffers::Verifiable for PostGirlConfigTemplate<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<i32>("id", Self::VT_ID, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("tag", Self::VT_TAG, false)?
.visit_field::<i32>("unk_1", Self::VT_UNK_1, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_2", Self::VT_UNK_2, false)?
.visit_field::<i32>("unk_3", Self::VT_UNK_3, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("role_icon_name", Self::VT_ROLE_ICON_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_4", Self::VT_UNK_4, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("unk_5", Self::VT_UNK_5, false)?
.finish();
Ok(())
}
}
pub struct PostGirlConfigTemplateArgs<'a> {
pub id: i32,
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
pub tag: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_1: i32,
pub unk_2: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_3: i32,
pub role_icon_name: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_4: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_5: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
}
impl<'a> Default for PostGirlConfigTemplateArgs<'a> {
#[inline]
fn default() -> Self {
PostGirlConfigTemplateArgs {
id: 0,
name: None,
tag: None,
unk_1: 0,
unk_2: None,
unk_3: 0,
role_icon_name: None,
unk_4: None,
unk_5: None,
}
}
}
pub struct PostGirlConfigTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PostGirlConfigTemplateBuilder<'a, 'b, A> {
#[inline]
pub fn add_id(&mut self, id: i32) {
self.fbb_.push_slot::<i32>(PostGirlConfigTemplate::VT_ID, id, 0);
}
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PostGirlConfigTemplate::VT_NAME, name);
}
#[inline]
pub fn add_tag(&mut self, tag: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PostGirlConfigTemplate::VT_TAG, tag);
}
#[inline]
pub fn add_unk_1(&mut self, unk_1: i32) {
self.fbb_.push_slot::<i32>(PostGirlConfigTemplate::VT_UNK_1, unk_1, 0);
}
#[inline]
pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PostGirlConfigTemplate::VT_UNK_2, unk_2);
}
#[inline]
pub fn add_unk_3(&mut self, unk_3: i32) {
self.fbb_.push_slot::<i32>(PostGirlConfigTemplate::VT_UNK_3, unk_3, 0);
}
#[inline]
pub fn add_role_icon_name(&mut self, role_icon_name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PostGirlConfigTemplate::VT_ROLE_ICON_NAME, role_icon_name);
}
#[inline]
pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PostGirlConfigTemplate::VT_UNK_4, unk_4);
}
#[inline]
pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PostGirlConfigTemplate::VT_UNK_5, unk_5);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PostGirlConfigTemplateBuilder<'a, 'b, A> {
let start = _fbb.start_table();
PostGirlConfigTemplateBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<PostGirlConfigTemplate<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for PostGirlConfigTemplate<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("PostGirlConfigTemplate");
ds.field("id", &self.id());
ds.field("name", &self.name());
ds.field("tag", &self.tag());
ds.field("unk_1", &self.unk_1());
ds.field("unk_2", &self.unk_2());
ds.field("unk_3", &self.unk_3());
ds.field("role_icon_name", &self.role_icon_name());
ds.field("unk_4", &self.unk_4());
ds.field("unk_5", &self.unk_5());
ds.finish()
}
}
pub enum ArchiveFileQuestTemplateOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct ArchiveFileQuestTemplate<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for ArchiveFileQuestTemplate<'a> {
type Inner = ArchiveFileQuestTemplate<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> ArchiveFileQuestTemplate<'a> {
pub const VT_ID: flatbuffers::VOffsetT = 4;
pub const VT_ARCHIVE_ID: flatbuffers::VOffsetT = 6;
pub const VT_ARCHIVE_NAME: flatbuffers::VOffsetT = 8;
pub const VT_DIFFICULTY_LV: flatbuffers::VOffsetT = 10;
pub const VT_SHOW_TYPE: flatbuffers::VOffsetT = 12;
pub const VT_RECOMMENDED_HIT_TYPES: flatbuffers::VOffsetT = 14;
pub const VT_VIDEO: flatbuffers::VOffsetT = 16;
pub const VT_ARCHIVE_FILE_NAME: flatbuffers::VOffsetT = 18;
pub const VT_ARCHIVE_FILE_NUM: flatbuffers::VOffsetT = 20;
pub const VT_ARCHIVE_FILE_NI_IDS: flatbuffers::VOffsetT = 22;
pub const VT_AUTO_DISTRIBUTION: flatbuffers::VOffsetT = 24;
pub const VT_UNK_1: flatbuffers::VOffsetT = 26;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
ArchiveFileQuestTemplate { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args ArchiveFileQuestTemplateArgs<'args>
) -> flatbuffers::WIPOffset<ArchiveFileQuestTemplate<'bldr>> {
let mut builder = ArchiveFileQuestTemplateBuilder::new(_fbb);
if let Some(x) = args.archive_file_ni_ids { builder.add_archive_file_ni_ids(x); }
if let Some(x) = args.archive_file_num { builder.add_archive_file_num(x); }
if let Some(x) = args.archive_file_name { builder.add_archive_file_name(x); }
if let Some(x) = args.video { builder.add_video(x); }
if let Some(x) = args.recommended_hit_types { builder.add_recommended_hit_types(x); }
builder.add_show_type(args.show_type);
builder.add_difficulty_lv(args.difficulty_lv);
if let Some(x) = args.archive_name { builder.add_archive_name(x); }
builder.add_archive_id(args.archive_id);
builder.add_id(args.id);
builder.add_unk_1(args.unk_1);
builder.add_auto_distribution(args.auto_distribution);
builder.finish()
}
#[inline]
pub fn id(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveFileQuestTemplate::VT_ID, Some(0)).unwrap()}
}
#[inline]
pub fn archive_id(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveFileQuestTemplate::VT_ARCHIVE_ID, Some(0)).unwrap()}
}
#[inline]
pub fn archive_name(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ArchiveFileQuestTemplate::VT_ARCHIVE_NAME, None)}
}
#[inline]
pub fn difficulty_lv(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveFileQuestTemplate::VT_DIFFICULTY_LV, Some(0)).unwrap()}
}
#[inline]
pub fn show_type(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveFileQuestTemplate::VT_SHOW_TYPE, Some(0)).unwrap()}
}
#[inline]
pub fn recommended_hit_types(&self) -> Option<flatbuffers::Vector<'a, i32>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(ArchiveFileQuestTemplate::VT_RECOMMENDED_HIT_TYPES, None)}
}
#[inline]
pub fn video(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ArchiveFileQuestTemplate::VT_VIDEO, None)}
}
#[inline]
pub fn archive_file_name(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NAME, None)}
}
#[inline]
pub fn archive_file_num(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NUM, None)}
}
#[inline]
pub fn archive_file_ni_ids(&self) -> Option<flatbuffers::Vector<'a, i32>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NI_IDS, None)}
}
#[inline]
pub fn auto_distribution(&self) -> bool {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<bool>(ArchiveFileQuestTemplate::VT_AUTO_DISTRIBUTION, Some(false)).unwrap()}
}
#[inline]
pub fn unk_1(&self) -> bool {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<bool>(ArchiveFileQuestTemplate::VT_UNK_1, Some(false)).unwrap()}
}
}
impl flatbuffers::Verifiable for ArchiveFileQuestTemplate<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<i32>("id", Self::VT_ID, false)?
.visit_field::<i32>("archive_id", Self::VT_ARCHIVE_ID, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("archive_name", Self::VT_ARCHIVE_NAME, false)?
.visit_field::<i32>("difficulty_lv", Self::VT_DIFFICULTY_LV, false)?
.visit_field::<i32>("show_type", Self::VT_SHOW_TYPE, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("recommended_hit_types", Self::VT_RECOMMENDED_HIT_TYPES, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("video", Self::VT_VIDEO, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("archive_file_name", Self::VT_ARCHIVE_FILE_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("archive_file_num", Self::VT_ARCHIVE_FILE_NUM, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("archive_file_ni_ids", Self::VT_ARCHIVE_FILE_NI_IDS, false)?
.visit_field::<bool>("auto_distribution", Self::VT_AUTO_DISTRIBUTION, false)?
.visit_field::<bool>("unk_1", Self::VT_UNK_1, false)?
.finish();
Ok(())
}
}
pub struct ArchiveFileQuestTemplateArgs<'a> {
pub id: i32,
pub archive_id: i32,
pub archive_name: Option<flatbuffers::WIPOffset<&'a str>>,
pub difficulty_lv: i32,
pub show_type: i32,
pub recommended_hit_types: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
pub video: Option<flatbuffers::WIPOffset<&'a str>>,
pub archive_file_name: Option<flatbuffers::WIPOffset<&'a str>>,
pub archive_file_num: Option<flatbuffers::WIPOffset<&'a str>>,
pub archive_file_ni_ids: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
pub auto_distribution: bool,
pub unk_1: bool,
}
impl<'a> Default for ArchiveFileQuestTemplateArgs<'a> {
#[inline]
fn default() -> Self {
ArchiveFileQuestTemplateArgs {
id: 0,
archive_id: 0,
archive_name: None,
difficulty_lv: 0,
show_type: 0,
recommended_hit_types: None,
video: None,
archive_file_name: None,
archive_file_num: None,
archive_file_ni_ids: None,
auto_distribution: false,
unk_1: false,
}
}
}
pub struct ArchiveFileQuestTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ArchiveFileQuestTemplateBuilder<'a, 'b, A> {
#[inline]
pub fn add_id(&mut self, id: i32) {
self.fbb_.push_slot::<i32>(ArchiveFileQuestTemplate::VT_ID, id, 0);
}
#[inline]
pub fn add_archive_id(&mut self, archive_id: i32) {
self.fbb_.push_slot::<i32>(ArchiveFileQuestTemplate::VT_ARCHIVE_ID, archive_id, 0);
}
#[inline]
pub fn add_archive_name(&mut self, archive_name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveFileQuestTemplate::VT_ARCHIVE_NAME, archive_name);
}
#[inline]
pub fn add_difficulty_lv(&mut self, difficulty_lv: i32) {
self.fbb_.push_slot::<i32>(ArchiveFileQuestTemplate::VT_DIFFICULTY_LV, difficulty_lv, 0);
}
#[inline]
pub fn add_show_type(&mut self, show_type: i32) {
self.fbb_.push_slot::<i32>(ArchiveFileQuestTemplate::VT_SHOW_TYPE, show_type, 0);
}
#[inline]
pub fn add_recommended_hit_types(&mut self, recommended_hit_types: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveFileQuestTemplate::VT_RECOMMENDED_HIT_TYPES, recommended_hit_types);
}
#[inline]
pub fn add_video(&mut self, video: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveFileQuestTemplate::VT_VIDEO, video);
}
#[inline]
pub fn add_archive_file_name(&mut self, archive_file_name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NAME, archive_file_name);
}
#[inline]
pub fn add_archive_file_num(&mut self, archive_file_num: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NUM, archive_file_num);
}
#[inline]
pub fn add_archive_file_ni_ids(&mut self, archive_file_ni_ids: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveFileQuestTemplate::VT_ARCHIVE_FILE_NI_IDS, archive_file_ni_ids);
}
#[inline]
pub fn add_auto_distribution(&mut self, auto_distribution: bool) {
self.fbb_.push_slot::<bool>(ArchiveFileQuestTemplate::VT_AUTO_DISTRIBUTION, auto_distribution, false);
}
#[inline]
pub fn add_unk_1(&mut self, unk_1: bool) {
self.fbb_.push_slot::<bool>(ArchiveFileQuestTemplate::VT_UNK_1, unk_1, false);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ArchiveFileQuestTemplateBuilder<'a, 'b, A> {
let start = _fbb.start_table();
ArchiveFileQuestTemplateBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<ArchiveFileQuestTemplate<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for ArchiveFileQuestTemplate<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("ArchiveFileQuestTemplate");
ds.field("id", &self.id());
ds.field("archive_id", &self.archive_id());
ds.field("archive_name", &self.archive_name());
ds.field("difficulty_lv", &self.difficulty_lv());
ds.field("show_type", &self.show_type());
ds.field("recommended_hit_types", &self.recommended_hit_types());
ds.field("video", &self.video());
ds.field("archive_file_name", &self.archive_file_name());
ds.field("archive_file_num", &self.archive_file_num());
ds.field("archive_file_ni_ids", &self.archive_file_ni_ids());
ds.field("auto_distribution", &self.auto_distribution());
ds.field("unk_1", &self.unk_1());
ds.finish()
}
}
pub enum ArchiveBattleQuestTemplateOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct ArchiveBattleQuestTemplate<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for ArchiveBattleQuestTemplate<'a> {
type Inner = ArchiveBattleQuestTemplate<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> ArchiveBattleQuestTemplate<'a> {
pub const VT_ID: flatbuffers::VOffsetT = 4;
pub const VT_QUEST_NAME: flatbuffers::VOffsetT = 6;
pub const VT_QUEST_DESC: flatbuffers::VOffsetT = 8;
pub const VT_TARGET: flatbuffers::VOffsetT = 10;
pub const VT_QUEST_TYPE: flatbuffers::VOffsetT = 12;
pub const VT_CHAPTER: flatbuffers::VOffsetT = 14;
pub const VT_DIFFICULTY: flatbuffers::VOffsetT = 16;
pub const VT_MONSTER_LEVEL: flatbuffers::VOffsetT = 18;
pub const VT_RECOMMENDED_LEVEL: flatbuffers::VOffsetT = 20;
pub const VT_UNK_1: flatbuffers::VOffsetT = 22;
pub const VT_UNK_2: flatbuffers::VOffsetT = 24;
pub const VT_HOLLOW_ID: flatbuffers::VOffsetT = 26;
pub const VT_FIRST_BATTLE_EVENT_ID: flatbuffers::VOffsetT = 28;
pub const VT_BATTLE_EVENT_ID: flatbuffers::VOffsetT = 30;
pub const VT_UNK_3: flatbuffers::VOffsetT = 32;
pub const VT_BATTLE_RANK: flatbuffers::VOffsetT = 34;
pub const VT_SLOT_1_AVATAR: flatbuffers::VOffsetT = 36;
pub const VT_SLOT_2_AVATAR: flatbuffers::VOffsetT = 38;
pub const VT_SLOT_3_AVATAR: flatbuffers::VOffsetT = 40;
pub const VT_BUDDY: flatbuffers::VOffsetT = 42;
pub const VT_UNK_4: flatbuffers::VOffsetT = 44;
pub const VT_UNK_5: flatbuffers::VOffsetT = 46;
pub const VT_UNK_6: flatbuffers::VOffsetT = 48;
pub const VT_CHAPTER_NAME: flatbuffers::VOffsetT = 50;
pub const VT_QUEST_IMAGE: flatbuffers::VOffsetT = 52;
pub const VT_UNK_7: flatbuffers::VOffsetT = 54;
pub const VT_UNK_8: flatbuffers::VOffsetT = 56;
pub const VT_UNK_9: flatbuffers::VOffsetT = 58;
pub const VT_UNK_10: flatbuffers::VOffsetT = 60;
pub const VT_UNK_11: flatbuffers::VOffsetT = 62;
pub const VT_UNK_12: flatbuffers::VOffsetT = 64;
pub const VT_UNK_13: flatbuffers::VOffsetT = 66;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
ArchiveBattleQuestTemplate { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args ArchiveBattleQuestTemplateArgs<'args>
) -> flatbuffers::WIPOffset<ArchiveBattleQuestTemplate<'bldr>> {
let mut builder = ArchiveBattleQuestTemplateBuilder::new(_fbb);
builder.add_unk_13(args.unk_13);
if let Some(x) = args.unk_12 { builder.add_unk_12(x); }
builder.add_unk_11(args.unk_11);
builder.add_unk_9(args.unk_9);
if let Some(x) = args.unk_7 { builder.add_unk_7(x); }
builder.add_quest_image(args.quest_image);
if let Some(x) = args.chapter_name { builder.add_chapter_name(x); }
builder.add_unk_5(args.unk_5);
builder.add_buddy(args.buddy);
builder.add_slot_3_avatar(args.slot_3_avatar);
builder.add_slot_2_avatar(args.slot_2_avatar);
builder.add_slot_1_avatar(args.slot_1_avatar);
if let Some(x) = args.battle_rank { builder.add_battle_rank(x); }
builder.add_unk_3(args.unk_3);
builder.add_battle_event_id(args.battle_event_id);
builder.add_first_battle_event_id(args.first_battle_event_id);
builder.add_hollow_id(args.hollow_id);
builder.add_unk_2(args.unk_2);
builder.add_unk_1(args.unk_1);
builder.add_recommended_level(args.recommended_level);
builder.add_monster_level(args.monster_level);
builder.add_difficulty(args.difficulty);
builder.add_chapter(args.chapter);
builder.add_quest_type(args.quest_type);
if let Some(x) = args.target { builder.add_target(x); }
if let Some(x) = args.quest_desc { builder.add_quest_desc(x); }
if let Some(x) = args.quest_name { builder.add_quest_name(x); }
builder.add_id(args.id);
builder.add_unk_10(args.unk_10);
builder.add_unk_8(args.unk_8);
builder.add_unk_6(args.unk_6);
builder.add_unk_4(args.unk_4);
builder.finish()
}
#[inline]
pub fn id(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_ID, Some(0)).unwrap()}
}
#[inline]
pub fn quest_name(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ArchiveBattleQuestTemplate::VT_QUEST_NAME, None)}
}
#[inline]
pub fn quest_desc(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ArchiveBattleQuestTemplate::VT_QUEST_DESC, None)}
}
#[inline]
pub fn target(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ArchiveBattleQuestTemplate::VT_TARGET, None)}
}
#[inline]
pub fn quest_type(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_QUEST_TYPE, Some(0)).unwrap()}
}
#[inline]
pub fn chapter(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_CHAPTER, Some(0)).unwrap()}
}
#[inline]
pub fn difficulty(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_DIFFICULTY, Some(0)).unwrap()}
}
#[inline]
pub fn monster_level(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_MONSTER_LEVEL, Some(0)).unwrap()}
}
#[inline]
pub fn recommended_level(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_RECOMMENDED_LEVEL, Some(0)).unwrap()}
}
#[inline]
pub fn unk_1(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_UNK_1, Some(0)).unwrap()}
}
#[inline]
pub fn unk_2(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_UNK_2, Some(0)).unwrap()}
}
#[inline]
pub fn hollow_id(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_HOLLOW_ID, Some(0)).unwrap()}
}
#[inline]
pub fn first_battle_event_id(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_FIRST_BATTLE_EVENT_ID, Some(0)).unwrap()}
}
#[inline]
pub fn battle_event_id(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_BATTLE_EVENT_ID, Some(0)).unwrap()}
}
#[inline]
pub fn unk_3(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_UNK_3, Some(0)).unwrap()}
}
#[inline]
pub fn battle_rank(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ArchiveBattleQuestTemplate::VT_BATTLE_RANK, None)}
}
#[inline]
pub fn slot_1_avatar(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_SLOT_1_AVATAR, Some(0)).unwrap()}
}
#[inline]
pub fn slot_2_avatar(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_SLOT_2_AVATAR, Some(0)).unwrap()}
}
#[inline]
pub fn slot_3_avatar(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_SLOT_3_AVATAR, Some(0)).unwrap()}
}
#[inline]
pub fn buddy(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_BUDDY, Some(0)).unwrap()}
}
#[inline]
pub fn unk_4(&self) -> bool {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<bool>(ArchiveBattleQuestTemplate::VT_UNK_4, Some(false)).unwrap()}
}
#[inline]
pub fn unk_5(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_UNK_5, Some(0)).unwrap()}
}
#[inline]
pub fn unk_6(&self) -> bool {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<bool>(ArchiveBattleQuestTemplate::VT_UNK_6, Some(false)).unwrap()}
}
#[inline]
pub fn chapter_name(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ArchiveBattleQuestTemplate::VT_CHAPTER_NAME, None)}
}
#[inline]
pub fn quest_image(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_QUEST_IMAGE, Some(0)).unwrap()}
}
#[inline]
pub fn unk_7(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ArchiveBattleQuestTemplate::VT_UNK_7, None)}
}
#[inline]
pub fn unk_8(&self) -> bool {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<bool>(ArchiveBattleQuestTemplate::VT_UNK_8, Some(false)).unwrap()}
}
#[inline]
pub fn unk_9(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_UNK_9, Some(0)).unwrap()}
}
#[inline]
pub fn unk_10(&self) -> bool {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<bool>(ArchiveBattleQuestTemplate::VT_UNK_10, Some(false)).unwrap()}
}
#[inline]
pub fn unk_11(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_UNK_11, Some(0)).unwrap()}
}
#[inline]
pub fn unk_12(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ArchiveBattleQuestTemplate::VT_UNK_12, None)}
}
#[inline]
pub fn unk_13(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(ArchiveBattleQuestTemplate::VT_UNK_13, Some(0)).unwrap()}
}
}
impl flatbuffers::Verifiable for ArchiveBattleQuestTemplate<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<i32>("id", Self::VT_ID, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("quest_name", Self::VT_QUEST_NAME, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("quest_desc", Self::VT_QUEST_DESC, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("target", Self::VT_TARGET, false)?
.visit_field::<i32>("quest_type", Self::VT_QUEST_TYPE, false)?
.visit_field::<i32>("chapter", Self::VT_CHAPTER, false)?
.visit_field::<i32>("difficulty", Self::VT_DIFFICULTY, false)?
.visit_field::<i32>("monster_level", Self::VT_MONSTER_LEVEL, false)?
.visit_field::<i32>("recommended_level", Self::VT_RECOMMENDED_LEVEL, false)?
.visit_field::<i32>("unk_1", Self::VT_UNK_1, false)?
.visit_field::<i32>("unk_2", Self::VT_UNK_2, false)?
.visit_field::<i32>("hollow_id", Self::VT_HOLLOW_ID, false)?
.visit_field::<i32>("first_battle_event_id", Self::VT_FIRST_BATTLE_EVENT_ID, false)?
.visit_field::<i32>("battle_event_id", Self::VT_BATTLE_EVENT_ID, false)?
.visit_field::<i32>("unk_3", Self::VT_UNK_3, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("battle_rank", Self::VT_BATTLE_RANK, false)?
.visit_field::<i32>("slot_1_avatar", Self::VT_SLOT_1_AVATAR, false)?
.visit_field::<i32>("slot_2_avatar", Self::VT_SLOT_2_AVATAR, false)?
.visit_field::<i32>("slot_3_avatar", Self::VT_SLOT_3_AVATAR, false)?
.visit_field::<i32>("buddy", Self::VT_BUDDY, false)?
.visit_field::<bool>("unk_4", Self::VT_UNK_4, false)?
.visit_field::<i32>("unk_5", Self::VT_UNK_5, false)?
.visit_field::<bool>("unk_6", Self::VT_UNK_6, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("chapter_name", Self::VT_CHAPTER_NAME, false)?
.visit_field::<i32>("quest_image", Self::VT_QUEST_IMAGE, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_7", Self::VT_UNK_7, false)?
.visit_field::<bool>("unk_8", Self::VT_UNK_8, false)?
.visit_field::<i32>("unk_9", Self::VT_UNK_9, false)?
.visit_field::<bool>("unk_10", Self::VT_UNK_10, false)?
.visit_field::<i32>("unk_11", Self::VT_UNK_11, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_12", Self::VT_UNK_12, false)?
.visit_field::<i32>("unk_13", Self::VT_UNK_13, false)?
.finish();
Ok(())
}
}
pub struct ArchiveBattleQuestTemplateArgs<'a> {
pub id: i32,
pub quest_name: Option<flatbuffers::WIPOffset<&'a str>>,
pub quest_desc: Option<flatbuffers::WIPOffset<&'a str>>,
pub target: Option<flatbuffers::WIPOffset<&'a str>>,
pub quest_type: i32,
pub chapter: i32,
pub difficulty: i32,
pub monster_level: i32,
pub recommended_level: i32,
pub unk_1: i32,
pub unk_2: i32,
pub hollow_id: i32,
pub first_battle_event_id: i32,
pub battle_event_id: i32,
pub unk_3: i32,
pub battle_rank: Option<flatbuffers::WIPOffset<&'a str>>,
pub slot_1_avatar: i32,
pub slot_2_avatar: i32,
pub slot_3_avatar: i32,
pub buddy: i32,
pub unk_4: bool,
pub unk_5: i32,
pub unk_6: bool,
pub chapter_name: Option<flatbuffers::WIPOffset<&'a str>>,
pub quest_image: i32,
pub unk_7: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_8: bool,
pub unk_9: i32,
pub unk_10: bool,
pub unk_11: i32,
pub unk_12: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_13: i32,
}
impl<'a> Default for ArchiveBattleQuestTemplateArgs<'a> {
#[inline]
fn default() -> Self {
ArchiveBattleQuestTemplateArgs {
id: 0,
quest_name: None,
quest_desc: None,
target: None,
quest_type: 0,
chapter: 0,
difficulty: 0,
monster_level: 0,
recommended_level: 0,
unk_1: 0,
unk_2: 0,
hollow_id: 0,
first_battle_event_id: 0,
battle_event_id: 0,
unk_3: 0,
battle_rank: None,
slot_1_avatar: 0,
slot_2_avatar: 0,
slot_3_avatar: 0,
buddy: 0,
unk_4: false,
unk_5: 0,
unk_6: false,
chapter_name: None,
quest_image: 0,
unk_7: None,
unk_8: false,
unk_9: 0,
unk_10: false,
unk_11: 0,
unk_12: None,
unk_13: 0,
}
}
}
pub struct ArchiveBattleQuestTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ArchiveBattleQuestTemplateBuilder<'a, 'b, A> {
#[inline]
pub fn add_id(&mut self, id: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_ID, id, 0);
}
#[inline]
pub fn add_quest_name(&mut self, quest_name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveBattleQuestTemplate::VT_QUEST_NAME, quest_name);
}
#[inline]
pub fn add_quest_desc(&mut self, quest_desc: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveBattleQuestTemplate::VT_QUEST_DESC, quest_desc);
}
#[inline]
pub fn add_target(&mut self, target: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveBattleQuestTemplate::VT_TARGET, target);
}
#[inline]
pub fn add_quest_type(&mut self, quest_type: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_QUEST_TYPE, quest_type, 0);
}
#[inline]
pub fn add_chapter(&mut self, chapter: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_CHAPTER, chapter, 0);
}
#[inline]
pub fn add_difficulty(&mut self, difficulty: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_DIFFICULTY, difficulty, 0);
}
#[inline]
pub fn add_monster_level(&mut self, monster_level: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_MONSTER_LEVEL, monster_level, 0);
}
#[inline]
pub fn add_recommended_level(&mut self, recommended_level: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_RECOMMENDED_LEVEL, recommended_level, 0);
}
#[inline]
pub fn add_unk_1(&mut self, unk_1: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_UNK_1, unk_1, 0);
}
#[inline]
pub fn add_unk_2(&mut self, unk_2: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_UNK_2, unk_2, 0);
}
#[inline]
pub fn add_hollow_id(&mut self, hollow_id: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_HOLLOW_ID, hollow_id, 0);
}
#[inline]
pub fn add_first_battle_event_id(&mut self, first_battle_event_id: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_FIRST_BATTLE_EVENT_ID, first_battle_event_id, 0);
}
#[inline]
pub fn add_battle_event_id(&mut self, battle_event_id: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_BATTLE_EVENT_ID, battle_event_id, 0);
}
#[inline]
pub fn add_unk_3(&mut self, unk_3: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_UNK_3, unk_3, 0);
}
#[inline]
pub fn add_battle_rank(&mut self, battle_rank: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveBattleQuestTemplate::VT_BATTLE_RANK, battle_rank);
}
#[inline]
pub fn add_slot_1_avatar(&mut self, slot_1_avatar: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_SLOT_1_AVATAR, slot_1_avatar, 0);
}
#[inline]
pub fn add_slot_2_avatar(&mut self, slot_2_avatar: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_SLOT_2_AVATAR, slot_2_avatar, 0);
}
#[inline]
pub fn add_slot_3_avatar(&mut self, slot_3_avatar: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_SLOT_3_AVATAR, slot_3_avatar, 0);
}
#[inline]
pub fn add_buddy(&mut self, buddy: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_BUDDY, buddy, 0);
}
#[inline]
pub fn add_unk_4(&mut self, unk_4: bool) {
self.fbb_.push_slot::<bool>(ArchiveBattleQuestTemplate::VT_UNK_4, unk_4, false);
}
#[inline]
pub fn add_unk_5(&mut self, unk_5: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_UNK_5, unk_5, 0);
}
#[inline]
pub fn add_unk_6(&mut self, unk_6: bool) {
self.fbb_.push_slot::<bool>(ArchiveBattleQuestTemplate::VT_UNK_6, unk_6, false);
}
#[inline]
pub fn add_chapter_name(&mut self, chapter_name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveBattleQuestTemplate::VT_CHAPTER_NAME, chapter_name);
}
#[inline]
pub fn add_quest_image(&mut self, quest_image: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_QUEST_IMAGE, quest_image, 0);
}
#[inline]
pub fn add_unk_7(&mut self, unk_7: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveBattleQuestTemplate::VT_UNK_7, unk_7);
}
#[inline]
pub fn add_unk_8(&mut self, unk_8: bool) {
self.fbb_.push_slot::<bool>(ArchiveBattleQuestTemplate::VT_UNK_8, unk_8, false);
}
#[inline]
pub fn add_unk_9(&mut self, unk_9: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_UNK_9, unk_9, 0);
}
#[inline]
pub fn add_unk_10(&mut self, unk_10: bool) {
self.fbb_.push_slot::<bool>(ArchiveBattleQuestTemplate::VT_UNK_10, unk_10, false);
}
#[inline]
pub fn add_unk_11(&mut self, unk_11: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_UNK_11, unk_11, 0);
}
#[inline]
pub fn add_unk_12(&mut self, unk_12: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveBattleQuestTemplate::VT_UNK_12, unk_12);
}
#[inline]
pub fn add_unk_13(&mut self, unk_13: i32) {
self.fbb_.push_slot::<i32>(ArchiveBattleQuestTemplate::VT_UNK_13, unk_13, 0);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ArchiveBattleQuestTemplateBuilder<'a, 'b, A> {
let start = _fbb.start_table();
ArchiveBattleQuestTemplateBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<ArchiveBattleQuestTemplate<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for ArchiveBattleQuestTemplate<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("ArchiveBattleQuestTemplate");
ds.field("id", &self.id());
ds.field("quest_name", &self.quest_name());
ds.field("quest_desc", &self.quest_desc());
ds.field("target", &self.target());
ds.field("quest_type", &self.quest_type());
ds.field("chapter", &self.chapter());
ds.field("difficulty", &self.difficulty());
ds.field("monster_level", &self.monster_level());
ds.field("recommended_level", &self.recommended_level());
ds.field("unk_1", &self.unk_1());
ds.field("unk_2", &self.unk_2());
ds.field("hollow_id", &self.hollow_id());
ds.field("first_battle_event_id", &self.first_battle_event_id());
ds.field("battle_event_id", &self.battle_event_id());
ds.field("unk_3", &self.unk_3());
ds.field("battle_rank", &self.battle_rank());
ds.field("slot_1_avatar", &self.slot_1_avatar());
ds.field("slot_2_avatar", &self.slot_2_avatar());
ds.field("slot_3_avatar", &self.slot_3_avatar());
ds.field("buddy", &self.buddy());
ds.field("unk_4", &self.unk_4());
ds.field("unk_5", &self.unk_5());
ds.field("unk_6", &self.unk_6());
ds.field("chapter_name", &self.chapter_name());
ds.field("quest_image", &self.quest_image());
ds.field("unk_7", &self.unk_7());
ds.field("unk_8", &self.unk_8());
ds.field("unk_9", &self.unk_9());
ds.field("unk_10", &self.unk_10());
ds.field("unk_11", &self.unk_11());
ds.field("unk_12", &self.unk_12());
ds.field("unk_13", &self.unk_13());
ds.finish()
}
}
pub enum AvatarBaseTemplateTbOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct AvatarBaseTemplateTb<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for AvatarBaseTemplateTb<'a> {
type Inner = AvatarBaseTemplateTb<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> AvatarBaseTemplateTb<'a> {
pub const VT_DATA: flatbuffers::VOffsetT = 4;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
AvatarBaseTemplateTb { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args AvatarBaseTemplateTbArgs<'args>
) -> flatbuffers::WIPOffset<AvatarBaseTemplateTb<'bldr>> {
let mut builder = AvatarBaseTemplateTbBuilder::new(_fbb);
if let Some(x) = args.data { builder.add_data(x); }
builder.finish()
}
#[inline]
pub fn data(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AvatarBaseTemplate<'a>>>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AvatarBaseTemplate>>>>(AvatarBaseTemplateTb::VT_DATA, None)}
}
}
impl flatbuffers::Verifiable for AvatarBaseTemplateTb<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<AvatarBaseTemplate>>>>("data", Self::VT_DATA, false)?
.finish();
Ok(())
}
}
pub struct AvatarBaseTemplateTbArgs<'a> {
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AvatarBaseTemplate<'a>>>>>,
}
impl<'a> Default for AvatarBaseTemplateTbArgs<'a> {
#[inline]
fn default() -> Self {
AvatarBaseTemplateTbArgs {
data: None,
}
}
}
pub struct AvatarBaseTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AvatarBaseTemplateTbBuilder<'a, 'b, A> {
#[inline]
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<AvatarBaseTemplate<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AvatarBaseTemplateTb::VT_DATA, data);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> AvatarBaseTemplateTbBuilder<'a, 'b, A> {
let start = _fbb.start_table();
AvatarBaseTemplateTbBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<AvatarBaseTemplateTb<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for AvatarBaseTemplateTb<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("AvatarBaseTemplateTb");
ds.field("data", &self.data());
ds.finish()
}
}
pub enum WeaponTemplateTbOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct WeaponTemplateTb<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for WeaponTemplateTb<'a> {
type Inner = WeaponTemplateTb<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> WeaponTemplateTb<'a> {
pub const VT_DATA: flatbuffers::VOffsetT = 4;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
WeaponTemplateTb { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args WeaponTemplateTbArgs<'args>
) -> flatbuffers::WIPOffset<WeaponTemplateTb<'bldr>> {
let mut builder = WeaponTemplateTbBuilder::new(_fbb);
if let Some(x) = args.data { builder.add_data(x); }
builder.finish()
}
#[inline]
pub fn data(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<WeaponTemplate<'a>>>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<WeaponTemplate>>>>(WeaponTemplateTb::VT_DATA, None)}
}
}
impl flatbuffers::Verifiable for WeaponTemplateTb<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<WeaponTemplate>>>>("data", Self::VT_DATA, false)?
.finish();
Ok(())
}
}
pub struct WeaponTemplateTbArgs<'a> {
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<WeaponTemplate<'a>>>>>,
}
impl<'a> Default for WeaponTemplateTbArgs<'a> {
#[inline]
fn default() -> Self {
WeaponTemplateTbArgs {
data: None,
}
}
}
pub struct WeaponTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> WeaponTemplateTbBuilder<'a, 'b, A> {
#[inline]
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<WeaponTemplate<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplateTb::VT_DATA, data);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> WeaponTemplateTbBuilder<'a, 'b, A> {
let start = _fbb.start_table();
WeaponTemplateTbBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<WeaponTemplateTb<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for WeaponTemplateTb<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("WeaponTemplateTb");
ds.field("data", &self.data());
ds.finish()
}
}
pub enum UnlockConfigTemplateTbOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct UnlockConfigTemplateTb<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for UnlockConfigTemplateTb<'a> {
type Inner = UnlockConfigTemplateTb<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> UnlockConfigTemplateTb<'a> {
pub const VT_DATA: flatbuffers::VOffsetT = 4;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
UnlockConfigTemplateTb { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args UnlockConfigTemplateTbArgs<'args>
) -> flatbuffers::WIPOffset<UnlockConfigTemplateTb<'bldr>> {
let mut builder = UnlockConfigTemplateTbBuilder::new(_fbb);
if let Some(x) = args.data { builder.add_data(x); }
builder.finish()
}
#[inline]
pub fn data(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<UnlockConfigTemplate<'a>>>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<UnlockConfigTemplate>>>>(UnlockConfigTemplateTb::VT_DATA, None)}
}
}
impl flatbuffers::Verifiable for UnlockConfigTemplateTb<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<UnlockConfigTemplate>>>>("data", Self::VT_DATA, false)?
.finish();
Ok(())
}
}
pub struct UnlockConfigTemplateTbArgs<'a> {
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<UnlockConfigTemplate<'a>>>>>,
}
impl<'a> Default for UnlockConfigTemplateTbArgs<'a> {
#[inline]
fn default() -> Self {
UnlockConfigTemplateTbArgs {
data: None,
}
}
}
pub struct UnlockConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UnlockConfigTemplateTbBuilder<'a, 'b, A> {
#[inline]
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<UnlockConfigTemplate<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(UnlockConfigTemplateTb::VT_DATA, data);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UnlockConfigTemplateTbBuilder<'a, 'b, A> {
let start = _fbb.start_table();
UnlockConfigTemplateTbBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<UnlockConfigTemplateTb<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for UnlockConfigTemplateTb<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("UnlockConfigTemplateTb");
ds.field("data", &self.data());
ds.finish()
}
}
pub enum PostGirlConfigTemplateTbOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct PostGirlConfigTemplateTb<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for PostGirlConfigTemplateTb<'a> {
type Inner = PostGirlConfigTemplateTb<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> PostGirlConfigTemplateTb<'a> {
pub const VT_DATA: flatbuffers::VOffsetT = 4;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
PostGirlConfigTemplateTb { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args PostGirlConfigTemplateTbArgs<'args>
) -> flatbuffers::WIPOffset<PostGirlConfigTemplateTb<'bldr>> {
let mut builder = PostGirlConfigTemplateTbBuilder::new(_fbb);
if let Some(x) = args.data { builder.add_data(x); }
builder.finish()
}
#[inline]
pub fn data(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PostGirlConfigTemplate<'a>>>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PostGirlConfigTemplate>>>>(PostGirlConfigTemplateTb::VT_DATA, None)}
}
}
impl flatbuffers::Verifiable for PostGirlConfigTemplateTb<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<PostGirlConfigTemplate>>>>("data", Self::VT_DATA, false)?
.finish();
Ok(())
}
}
pub struct PostGirlConfigTemplateTbArgs<'a> {
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PostGirlConfigTemplate<'a>>>>>,
}
impl<'a> Default for PostGirlConfigTemplateTbArgs<'a> {
#[inline]
fn default() -> Self {
PostGirlConfigTemplateTbArgs {
data: None,
}
}
}
pub struct PostGirlConfigTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PostGirlConfigTemplateTbBuilder<'a, 'b, A> {
#[inline]
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<PostGirlConfigTemplate<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PostGirlConfigTemplateTb::VT_DATA, data);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PostGirlConfigTemplateTbBuilder<'a, 'b, A> {
let start = _fbb.start_table();
PostGirlConfigTemplateTbBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<PostGirlConfigTemplateTb<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for PostGirlConfigTemplateTb<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("PostGirlConfigTemplateTb");
ds.field("data", &self.data());
ds.finish()
}
}
pub enum ArchiveFileQuestTemplateTbOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct ArchiveFileQuestTemplateTb<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for ArchiveFileQuestTemplateTb<'a> {
type Inner = ArchiveFileQuestTemplateTb<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> ArchiveFileQuestTemplateTb<'a> {
pub const VT_DATA: flatbuffers::VOffsetT = 4;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
ArchiveFileQuestTemplateTb { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args ArchiveFileQuestTemplateTbArgs<'args>
) -> flatbuffers::WIPOffset<ArchiveFileQuestTemplateTb<'bldr>> {
let mut builder = ArchiveFileQuestTemplateTbBuilder::new(_fbb);
if let Some(x) = args.data { builder.add_data(x); }
builder.finish()
}
#[inline]
pub fn data(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ArchiveFileQuestTemplate<'a>>>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ArchiveFileQuestTemplate>>>>(ArchiveFileQuestTemplateTb::VT_DATA, None)}
}
}
impl flatbuffers::Verifiable for ArchiveFileQuestTemplateTb<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ArchiveFileQuestTemplate>>>>("data", Self::VT_DATA, false)?
.finish();
Ok(())
}
}
pub struct ArchiveFileQuestTemplateTbArgs<'a> {
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ArchiveFileQuestTemplate<'a>>>>>,
}
impl<'a> Default for ArchiveFileQuestTemplateTbArgs<'a> {
#[inline]
fn default() -> Self {
ArchiveFileQuestTemplateTbArgs {
data: None,
}
}
}
pub struct ArchiveFileQuestTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ArchiveFileQuestTemplateTbBuilder<'a, 'b, A> {
#[inline]
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ArchiveFileQuestTemplate<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveFileQuestTemplateTb::VT_DATA, data);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ArchiveFileQuestTemplateTbBuilder<'a, 'b, A> {
let start = _fbb.start_table();
ArchiveFileQuestTemplateTbBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<ArchiveFileQuestTemplateTb<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for ArchiveFileQuestTemplateTb<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("ArchiveFileQuestTemplateTb");
ds.field("data", &self.data());
ds.finish()
}
}
pub enum ArchiveBattleQuestTemplateTbOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct ArchiveBattleQuestTemplateTb<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for ArchiveBattleQuestTemplateTb<'a> {
type Inner = ArchiveBattleQuestTemplateTb<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> ArchiveBattleQuestTemplateTb<'a> {
pub const VT_DATA: flatbuffers::VOffsetT = 4;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
ArchiveBattleQuestTemplateTb { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args ArchiveBattleQuestTemplateTbArgs<'args>
) -> flatbuffers::WIPOffset<ArchiveBattleQuestTemplateTb<'bldr>> {
let mut builder = ArchiveBattleQuestTemplateTbBuilder::new(_fbb);
if let Some(x) = args.data { builder.add_data(x); }
builder.finish()
}
#[inline]
pub fn data(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ArchiveBattleQuestTemplate<'a>>>> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ArchiveBattleQuestTemplate>>>>(ArchiveBattleQuestTemplateTb::VT_DATA, None)}
}
}
impl flatbuffers::Verifiable for ArchiveBattleQuestTemplateTb<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ArchiveBattleQuestTemplate>>>>("data", Self::VT_DATA, false)?
.finish();
Ok(())
}
}
pub struct ArchiveBattleQuestTemplateTbArgs<'a> {
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ArchiveBattleQuestTemplate<'a>>>>>,
}
impl<'a> Default for ArchiveBattleQuestTemplateTbArgs<'a> {
#[inline]
fn default() -> Self {
ArchiveBattleQuestTemplateTbArgs {
data: None,
}
}
}
pub struct ArchiveBattleQuestTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ArchiveBattleQuestTemplateTbBuilder<'a, 'b, A> {
#[inline]
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ArchiveBattleQuestTemplate<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ArchiveBattleQuestTemplateTb::VT_DATA, data);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ArchiveBattleQuestTemplateTbBuilder<'a, 'b, A> {
let start = _fbb.start_table();
ArchiveBattleQuestTemplateTbBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<ArchiveBattleQuestTemplateTb<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for ArchiveBattleQuestTemplateTb<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("ArchiveBattleQuestTemplateTb");
ds.field("data", &self.data());
ds.finish()
}
}