forked from yixuan-rs/yixuan-rs
596 lines
24 KiB
Rust
596 lines
24 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};
|
|
|
|
pub enum QuestConfigTemplateOffset {}
|
|
#[derive(Copy, Clone, PartialEq)]
|
|
|
|
pub struct QuestConfigTemplate<'a> {
|
|
pub _tab: flatbuffers::Table<'a>,
|
|
}
|
|
|
|
impl<'a> flatbuffers::Follow<'a> for QuestConfigTemplate<'a> {
|
|
type Inner = QuestConfigTemplate<'a>;
|
|
#[inline]
|
|
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
|
Self { _tab: flatbuffers::Table::new(buf, loc) }
|
|
}
|
|
}
|
|
|
|
impl<'a> QuestConfigTemplate<'a> {
|
|
pub const VT_QUEST_ID: flatbuffers::VOffsetT = 4;
|
|
pub const VT_QUEST_NAME: flatbuffers::VOffsetT = 6;
|
|
pub const VT_QUEST_TYPE: flatbuffers::VOffsetT = 8;
|
|
pub const VT_DESC: flatbuffers::VOffsetT = 10;
|
|
pub const VT_TARGET_DESC: flatbuffers::VOffsetT = 12;
|
|
pub const VT_QUEST_DESC: flatbuffers::VOffsetT = 14;
|
|
pub const VT_ICON: flatbuffers::VOffsetT = 16;
|
|
pub const VT_AUTO_FINISH: flatbuffers::VOffsetT = 18;
|
|
pub const VT_SUB_QUESTS: flatbuffers::VOffsetT = 20;
|
|
pub const VT_UNK_0: flatbuffers::VOffsetT = 22;
|
|
pub const VT_UNK_1: flatbuffers::VOffsetT = 24;
|
|
pub const VT_UNLOCK_CONDITION: flatbuffers::VOffsetT = 26;
|
|
pub const VT_FINISH_CONDITION: flatbuffers::VOffsetT = 28;
|
|
pub const VT_REWARD_ID: flatbuffers::VOffsetT = 30;
|
|
pub const VT_UNK_3: flatbuffers::VOffsetT = 32;
|
|
pub const VT_UNK_4: flatbuffers::VOffsetT = 34;
|
|
pub const VT_UNK_5: flatbuffers::VOffsetT = 36;
|
|
pub const VT_UNK_6: flatbuffers::VOffsetT = 38;
|
|
pub const VT_UNK_7: flatbuffers::VOffsetT = 40;
|
|
pub const VT_UNK_8: flatbuffers::VOffsetT = 42;
|
|
pub const VT_UNK_9: flatbuffers::VOffsetT = 44;
|
|
pub const VT_UNK_10: flatbuffers::VOffsetT = 46;
|
|
pub const VT_UNK_11: flatbuffers::VOffsetT = 48;
|
|
pub const VT_PREORDER_QUEST_IDS: flatbuffers::VOffsetT = 50;
|
|
|
|
#[inline]
|
|
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
|
|
QuestConfigTemplate { _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 QuestConfigTemplateArgs<'args>
|
|
) -> flatbuffers::WIPOffset<QuestConfigTemplate<'bldr>> {
|
|
let mut builder = QuestConfigTemplateBuilder::new(_fbb);
|
|
if let Some(x) = args.preorder_quest_ids { builder.add_preorder_quest_ids(x); }
|
|
builder.add_unk_11(args.unk_11);
|
|
builder.add_unk_10(args.unk_10);
|
|
if let Some(x) = args.unk_9 { builder.add_unk_9(x); }
|
|
if let Some(x) = args.unk_8 { builder.add_unk_8(x); }
|
|
if let Some(x) = args.unk_7 { builder.add_unk_7(x); }
|
|
if let Some(x) = args.unk_6 { builder.add_unk_6(x); }
|
|
if let Some(x) = args.unk_5 { builder.add_unk_5(x); }
|
|
builder.add_unk_4(args.unk_4);
|
|
builder.add_unk_3(args.unk_3);
|
|
builder.add_reward_id(args.reward_id);
|
|
if let Some(x) = args.finish_condition { builder.add_finish_condition(x); }
|
|
if let Some(x) = args.unlock_condition { builder.add_unlock_condition(x); }
|
|
builder.add_unk_1(args.unk_1);
|
|
if let Some(x) = args.unk_0 { builder.add_unk_0(x); }
|
|
if let Some(x) = args.sub_quests { builder.add_sub_quests(x); }
|
|
if let Some(x) = args.icon { builder.add_icon(x); }
|
|
if let Some(x) = args.quest_desc { builder.add_quest_desc(x); }
|
|
if let Some(x) = args.target_desc { builder.add_target_desc(x); }
|
|
if let Some(x) = args.desc { builder.add_desc(x); }
|
|
builder.add_quest_type(args.quest_type);
|
|
if let Some(x) = args.quest_name { builder.add_quest_name(x); }
|
|
builder.add_quest_id(args.quest_id);
|
|
builder.add_auto_finish(args.auto_finish);
|
|
builder.finish()
|
|
}
|
|
|
|
|
|
#[inline]
|
|
pub fn quest_id(&self) -> u32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<u32>(QuestConfigTemplate::VT_QUEST_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>>(QuestConfigTemplate::VT_QUEST_NAME, 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>(QuestConfigTemplate::VT_QUEST_TYPE, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn 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>>(QuestConfigTemplate::VT_DESC, None)}
|
|
}
|
|
#[inline]
|
|
pub fn target_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>>(QuestConfigTemplate::VT_TARGET_DESC, 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>>(QuestConfigTemplate::VT_QUEST_DESC, None)}
|
|
}
|
|
#[inline]
|
|
pub fn icon(&self) -> Option<&'a str> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(QuestConfigTemplate::VT_ICON, None)}
|
|
}
|
|
#[inline]
|
|
pub fn auto_finish(&self) -> bool {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<bool>(QuestConfigTemplate::VT_AUTO_FINISH, Some(false)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn sub_quests(&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>>>(QuestConfigTemplate::VT_SUB_QUESTS, None)}
|
|
}
|
|
#[inline]
|
|
pub fn unk_0(&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>>>(QuestConfigTemplate::VT_UNK_0, 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>(QuestConfigTemplate::VT_UNK_1, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn unlock_condition(&self) -> Option<&'a str> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(QuestConfigTemplate::VT_UNLOCK_CONDITION, None)}
|
|
}
|
|
#[inline]
|
|
pub fn finish_condition(&self) -> Option<&'a str> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(QuestConfigTemplate::VT_FINISH_CONDITION, None)}
|
|
}
|
|
#[inline]
|
|
pub fn reward_id(&self) -> u32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<u32>(QuestConfigTemplate::VT_REWARD_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>(QuestConfigTemplate::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>(QuestConfigTemplate::VT_UNK_4, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn unk_5(&self) -> Option<&'a str> {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(QuestConfigTemplate::VT_UNK_5, None)}
|
|
}
|
|
#[inline]
|
|
pub fn unk_6(&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>>>>(QuestConfigTemplate::VT_UNK_6, None)}
|
|
}
|
|
#[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>>(QuestConfigTemplate::VT_UNK_7, None)}
|
|
}
|
|
#[inline]
|
|
pub fn unk_8(&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>>>>(QuestConfigTemplate::VT_UNK_8, None)}
|
|
}
|
|
#[inline]
|
|
pub fn unk_9(&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>>>(QuestConfigTemplate::VT_UNK_9, None)}
|
|
}
|
|
#[inline]
|
|
pub fn unk_10(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(QuestConfigTemplate::VT_UNK_10, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn unk_11(&self) -> i32 {
|
|
// Safety:
|
|
// Created from valid Table for this object
|
|
// which contains a valid value in this slot
|
|
unsafe { self._tab.get::<i32>(QuestConfigTemplate::VT_UNK_11, Some(0)).unwrap()}
|
|
}
|
|
#[inline]
|
|
pub fn preorder_quest_ids(&self) -> Option<flatbuffers::Vector<'a, u32>> {
|
|
// 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, u32>>>(QuestConfigTemplate::VT_PREORDER_QUEST_IDS, None)}
|
|
}
|
|
}
|
|
|
|
impl flatbuffers::Verifiable for QuestConfigTemplate<'_> {
|
|
#[inline]
|
|
fn run_verifier(
|
|
v: &mut flatbuffers::Verifier, pos: usize
|
|
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
|
|
use self::flatbuffers::Verifiable;
|
|
v.visit_table(pos)?
|
|
.visit_field::<u32>("quest_id", Self::VT_QUEST_ID, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("quest_name", Self::VT_QUEST_NAME, false)?
|
|
.visit_field::<i32>("quest_type", Self::VT_QUEST_TYPE, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("desc", Self::VT_DESC, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("target_desc", Self::VT_TARGET_DESC, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("quest_desc", Self::VT_QUEST_DESC, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("icon", Self::VT_ICON, false)?
|
|
.visit_field::<bool>("auto_finish", Self::VT_AUTO_FINISH, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("sub_quests", Self::VT_SUB_QUESTS, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("unk_0", Self::VT_UNK_0, false)?
|
|
.visit_field::<i32>("unk_1", Self::VT_UNK_1, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unlock_condition", Self::VT_UNLOCK_CONDITION, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("finish_condition", Self::VT_FINISH_CONDITION, false)?
|
|
.visit_field::<u32>("reward_id", Self::VT_REWARD_ID, false)?
|
|
.visit_field::<i32>("unk_3", Self::VT_UNK_3, false)?
|
|
.visit_field::<i32>("unk_4", Self::VT_UNK_4, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_5", Self::VT_UNK_5, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("unk_6", Self::VT_UNK_6, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_7", Self::VT_UNK_7, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("unk_8", Self::VT_UNK_8, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("unk_9", Self::VT_UNK_9, false)?
|
|
.visit_field::<i32>("unk_10", Self::VT_UNK_10, false)?
|
|
.visit_field::<i32>("unk_11", Self::VT_UNK_11, false)?
|
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>("preorder_quest_ids", Self::VT_PREORDER_QUEST_IDS, false)?
|
|
.finish();
|
|
Ok(())
|
|
}
|
|
}
|
|
pub struct QuestConfigTemplateArgs<'a> {
|
|
pub quest_id: u32,
|
|
pub quest_name: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub quest_type: i32,
|
|
pub desc: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub target_desc: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub quest_desc: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub icon: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub auto_finish: bool,
|
|
pub sub_quests: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
|
|
pub unk_0: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
|
|
pub unk_1: i32,
|
|
pub unlock_condition: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub finish_condition: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub reward_id: u32,
|
|
pub unk_3: i32,
|
|
pub unk_4: i32,
|
|
pub unk_5: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub unk_6: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
|
|
pub unk_7: Option<flatbuffers::WIPOffset<&'a str>>,
|
|
pub unk_8: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
|
|
pub unk_9: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
|
|
pub unk_10: i32,
|
|
pub unk_11: i32,
|
|
pub preorder_quest_ids: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
|
|
}
|
|
impl<'a> Default for QuestConfigTemplateArgs<'a> {
|
|
#[inline]
|
|
fn default() -> Self {
|
|
QuestConfigTemplateArgs {
|
|
quest_id: 0,
|
|
quest_name: None,
|
|
quest_type: 0,
|
|
desc: None,
|
|
target_desc: None,
|
|
quest_desc: None,
|
|
icon: None,
|
|
auto_finish: false,
|
|
sub_quests: None,
|
|
unk_0: None,
|
|
unk_1: 0,
|
|
unlock_condition: None,
|
|
finish_condition: None,
|
|
reward_id: 0,
|
|
unk_3: 0,
|
|
unk_4: 0,
|
|
unk_5: None,
|
|
unk_6: None,
|
|
unk_7: None,
|
|
unk_8: None,
|
|
unk_9: None,
|
|
unk_10: 0,
|
|
unk_11: 0,
|
|
preorder_quest_ids: None,
|
|
}
|
|
}
|
|
}
|
|
|
|
pub struct QuestConfigTemplateBuilder<'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> QuestConfigTemplateBuilder<'a, 'b, A> {
|
|
#[inline]
|
|
pub fn add_quest_id(&mut self, quest_id: u32) {
|
|
self.fbb_.push_slot::<u32>(QuestConfigTemplate::VT_QUEST_ID, quest_id, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_quest_name(&mut self, quest_name: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_QUEST_NAME, quest_name);
|
|
}
|
|
#[inline]
|
|
pub fn add_quest_type(&mut self, quest_type: i32) {
|
|
self.fbb_.push_slot::<i32>(QuestConfigTemplate::VT_QUEST_TYPE, quest_type, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_desc(&mut self, desc: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_DESC, desc);
|
|
}
|
|
#[inline]
|
|
pub fn add_target_desc(&mut self, target_desc: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_TARGET_DESC, target_desc);
|
|
}
|
|
#[inline]
|
|
pub fn add_quest_desc(&mut self, quest_desc: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_QUEST_DESC, quest_desc);
|
|
}
|
|
#[inline]
|
|
pub fn add_icon(&mut self, icon: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_ICON, icon);
|
|
}
|
|
#[inline]
|
|
pub fn add_auto_finish(&mut self, auto_finish: bool) {
|
|
self.fbb_.push_slot::<bool>(QuestConfigTemplate::VT_AUTO_FINISH, auto_finish, false);
|
|
}
|
|
#[inline]
|
|
pub fn add_sub_quests(&mut self, sub_quests: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_SUB_QUESTS, sub_quests);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_0(&mut self, unk_0: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_UNK_0, unk_0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_1(&mut self, unk_1: i32) {
|
|
self.fbb_.push_slot::<i32>(QuestConfigTemplate::VT_UNK_1, unk_1, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unlock_condition(&mut self, unlock_condition: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_UNLOCK_CONDITION, unlock_condition);
|
|
}
|
|
#[inline]
|
|
pub fn add_finish_condition(&mut self, finish_condition: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_FINISH_CONDITION, finish_condition);
|
|
}
|
|
#[inline]
|
|
pub fn add_reward_id(&mut self, reward_id: u32) {
|
|
self.fbb_.push_slot::<u32>(QuestConfigTemplate::VT_REWARD_ID, reward_id, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_3(&mut self, unk_3: i32) {
|
|
self.fbb_.push_slot::<i32>(QuestConfigTemplate::VT_UNK_3, unk_3, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_4(&mut self, unk_4: i32) {
|
|
self.fbb_.push_slot::<i32>(QuestConfigTemplate::VT_UNK_4, unk_4, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_5(&mut self, unk_5: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_UNK_5, unk_5);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_6(&mut self, unk_6: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b str>>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_UNK_6, unk_6);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_7(&mut self, unk_7: flatbuffers::WIPOffset<&'b str>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_UNK_7, unk_7);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_8(&mut self, unk_8: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b str>>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_UNK_8, unk_8);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_9(&mut self, unk_9: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_UNK_9, unk_9);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_10(&mut self, unk_10: i32) {
|
|
self.fbb_.push_slot::<i32>(QuestConfigTemplate::VT_UNK_10, unk_10, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_unk_11(&mut self, unk_11: i32) {
|
|
self.fbb_.push_slot::<i32>(QuestConfigTemplate::VT_UNK_11, unk_11, 0);
|
|
}
|
|
#[inline]
|
|
pub fn add_preorder_quest_ids(&mut self, preorder_quest_ids: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u32>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplate::VT_PREORDER_QUEST_IDS, preorder_quest_ids);
|
|
}
|
|
#[inline]
|
|
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> QuestConfigTemplateBuilder<'a, 'b, A> {
|
|
let start = _fbb.start_table();
|
|
QuestConfigTemplateBuilder {
|
|
fbb_: _fbb,
|
|
start_: start,
|
|
}
|
|
}
|
|
#[inline]
|
|
pub fn finish(self) -> flatbuffers::WIPOffset<QuestConfigTemplate<'a>> {
|
|
let o = self.fbb_.end_table(self.start_);
|
|
flatbuffers::WIPOffset::new(o.value())
|
|
}
|
|
}
|
|
|
|
impl core::fmt::Debug for QuestConfigTemplate<'_> {
|
|
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
|
let mut ds = f.debug_struct("QuestConfigTemplate");
|
|
ds.field("quest_id", &self.quest_id());
|
|
ds.field("quest_name", &self.quest_name());
|
|
ds.field("quest_type", &self.quest_type());
|
|
ds.field("desc", &self.desc());
|
|
ds.field("target_desc", &self.target_desc());
|
|
ds.field("quest_desc", &self.quest_desc());
|
|
ds.field("icon", &self.icon());
|
|
ds.field("auto_finish", &self.auto_finish());
|
|
ds.field("sub_quests", &self.sub_quests());
|
|
ds.field("unk_0", &self.unk_0());
|
|
ds.field("unk_1", &self.unk_1());
|
|
ds.field("unlock_condition", &self.unlock_condition());
|
|
ds.field("finish_condition", &self.finish_condition());
|
|
ds.field("reward_id", &self.reward_id());
|
|
ds.field("unk_3", &self.unk_3());
|
|
ds.field("unk_4", &self.unk_4());
|
|
ds.field("unk_5", &self.unk_5());
|
|
ds.field("unk_6", &self.unk_6());
|
|
ds.field("unk_7", &self.unk_7());
|
|
ds.field("unk_8", &self.unk_8());
|
|
ds.field("unk_9", &self.unk_9());
|
|
ds.field("unk_10", &self.unk_10());
|
|
ds.field("unk_11", &self.unk_11());
|
|
ds.field("preorder_quest_ids", &self.preorder_quest_ids());
|
|
ds.finish()
|
|
}
|
|
}
|
|
pub enum QuestConfigTemplateTbOffset {}
|
|
#[derive(Copy, Clone, PartialEq)]
|
|
|
|
pub struct QuestConfigTemplateTb<'a> {
|
|
pub _tab: flatbuffers::Table<'a>,
|
|
}
|
|
|
|
impl<'a> flatbuffers::Follow<'a> for QuestConfigTemplateTb<'a> {
|
|
type Inner = QuestConfigTemplateTb<'a>;
|
|
#[inline]
|
|
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
|
Self { _tab: flatbuffers::Table::new(buf, loc) }
|
|
}
|
|
}
|
|
|
|
impl<'a> QuestConfigTemplateTb<'a> {
|
|
pub const VT_DATA: flatbuffers::VOffsetT = 4;
|
|
|
|
#[inline]
|
|
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
|
|
QuestConfigTemplateTb { _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 QuestConfigTemplateTbArgs<'args>
|
|
) -> flatbuffers::WIPOffset<QuestConfigTemplateTb<'bldr>> {
|
|
let mut builder = QuestConfigTemplateTbBuilder::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<QuestConfigTemplate<'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<QuestConfigTemplate>>>>(QuestConfigTemplateTb::VT_DATA, None)}
|
|
}
|
|
}
|
|
|
|
impl flatbuffers::Verifiable for QuestConfigTemplateTb<'_> {
|
|
#[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<QuestConfigTemplate>>>>("data", Self::VT_DATA, false)?
|
|
.finish();
|
|
Ok(())
|
|
}
|
|
}
|
|
pub struct QuestConfigTemplateTbArgs<'a> {
|
|
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<QuestConfigTemplate<'a>>>>>,
|
|
}
|
|
impl<'a> Default for QuestConfigTemplateTbArgs<'a> {
|
|
#[inline]
|
|
fn default() -> Self {
|
|
QuestConfigTemplateTbArgs {
|
|
data: None,
|
|
}
|
|
}
|
|
}
|
|
|
|
pub struct QuestConfigTemplateTbBuilder<'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> QuestConfigTemplateTbBuilder<'a, 'b, A> {
|
|
#[inline]
|
|
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<QuestConfigTemplate<'b >>>>) {
|
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(QuestConfigTemplateTb::VT_DATA, data);
|
|
}
|
|
#[inline]
|
|
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> QuestConfigTemplateTbBuilder<'a, 'b, A> {
|
|
let start = _fbb.start_table();
|
|
QuestConfigTemplateTbBuilder {
|
|
fbb_: _fbb,
|
|
start_: start,
|
|
}
|
|
}
|
|
#[inline]
|
|
pub fn finish(self) -> flatbuffers::WIPOffset<QuestConfigTemplateTb<'a>> {
|
|
let o = self.fbb_.end_table(self.start_);
|
|
flatbuffers::WIPOffset::new(o.value())
|
|
}
|
|
}
|
|
|
|
impl core::fmt::Debug for QuestConfigTemplateTb<'_> {
|
|
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
|
let mut ds = f.debug_struct("QuestConfigTemplateTb");
|
|
ds.field("data", &self.data());
|
|
ds.finish()
|
|
}
|
|
}
|