Implement BusinessCard and PlayerAccessory (new player outfits)

This commit is contained in:
traffic95 2025-05-28 18:14:32 +02:00
parent b839a1e6ba
commit dfe96f7a85
21 changed files with 77664 additions and 588 deletions

View file

@ -0,0 +1,17 @@
table CallingCardConfigTemplate {
id: uint;
unk_1: int;
unk_2: string;
unk_3: int;
unk_4: string;
unk_5: int;
unk_6: int;
avatar_id: uint;
unk_8: int;
unk_9: string;
unk_10: string;
}
table CallingCardConfigTemplateTb {
data: [CallingCardConfigTemplate];
}

View file

@ -0,0 +1,25 @@
table PlayerSkinAccessoriesConfigTemplate {
accessory_id: uint;
name: string;
unk_2: string;
unk_3: int;
unk_4: int;
unk_5: string;
unk_6: string;
unk_7: int;
player_skin_id: uint;
unk_9: int;
unk_10: [int];
unk_11: string;
unk_12: string;
unk_13: string;
bone_name: string;
unk_15: string;
unk_16: int;
unk_17: string;
source: string;
}
table PlayerSkinAccessoriesConfigTemplateTb {
data: [PlayerSkinAccessoriesConfigTemplate];
}

View file

@ -0,0 +1,16 @@
table PlayerSkinConfigTemplate {
player_skin_id: uint;
gender: uint;
needs_unlock: bool;
unk_3: int;
unk_4: string;
unk_5: uint;
unk_6: int;
unk_7: int;
unk_8: string;
unk_9: string;
}
table PlayerSkinConfigTemplateTb {
data: [PlayerSkinConfigTemplate];
}

View file

@ -0,0 +1,375 @@
// 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 CallingCardConfigTemplateOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct CallingCardConfigTemplate<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for CallingCardConfigTemplate<'a> {
type Inner = CallingCardConfigTemplate<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> CallingCardConfigTemplate<'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_AVATAR_ID: flatbuffers::VOffsetT = 18;
pub const VT_UNK_8: flatbuffers::VOffsetT = 20;
pub const VT_UNK_9: flatbuffers::VOffsetT = 22;
pub const VT_UNK_10: flatbuffers::VOffsetT = 24;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
CallingCardConfigTemplate { _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 CallingCardConfigTemplateArgs<'args>
) -> flatbuffers::WIPOffset<CallingCardConfigTemplate<'bldr>> {
let mut builder = CallingCardConfigTemplateBuilder::new(_fbb);
if let Some(x) = args.unk_10 { builder.add_unk_10(x); }
if let Some(x) = args.unk_9 { builder.add_unk_9(x); }
builder.add_unk_8(args.unk_8);
builder.add_avatar_id(args.avatar_id);
builder.add_unk_6(args.unk_6);
builder.add_unk_5(args.unk_5);
if let Some(x) = args.unk_4 { builder.add_unk_4(x); }
builder.add_unk_3(args.unk_3);
if let Some(x) = args.unk_2 { builder.add_unk_2(x); }
builder.add_unk_1(args.unk_1);
builder.add_id(args.id);
builder.finish()
}
#[inline]
pub fn id(&self) -> u32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<u32>(CallingCardConfigTemplate::VT_ID, Some(0)).unwrap()}
}
#[inline]
pub fn unk_1(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(CallingCardConfigTemplate::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>>(CallingCardConfigTemplate::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>(CallingCardConfigTemplate::VT_UNK_3, Some(0)).unwrap()}
}
#[inline]
pub fn unk_4(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(CallingCardConfigTemplate::VT_UNK_4, None)}
}
#[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>(CallingCardConfigTemplate::VT_UNK_5, Some(0)).unwrap()}
}
#[inline]
pub fn unk_6(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(CallingCardConfigTemplate::VT_UNK_6, Some(0)).unwrap()}
}
#[inline]
pub fn avatar_id(&self) -> u32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<u32>(CallingCardConfigTemplate::VT_AVATAR_ID, Some(0)).unwrap()}
}
#[inline]
pub fn unk_8(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(CallingCardConfigTemplate::VT_UNK_8, Some(0)).unwrap()}
}
#[inline]
pub fn unk_9(&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>>(CallingCardConfigTemplate::VT_UNK_9, 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>>(CallingCardConfigTemplate::VT_UNK_10, None)}
}
}
impl flatbuffers::Verifiable for CallingCardConfigTemplate<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<u32>("id", Self::VT_ID, 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>>("unk_4", Self::VT_UNK_4, false)?
.visit_field::<i32>("unk_5", Self::VT_UNK_5, false)?
.visit_field::<i32>("unk_6", Self::VT_UNK_6, false)?
.visit_field::<u32>("avatar_id", Self::VT_AVATAR_ID, false)?
.visit_field::<i32>("unk_8", Self::VT_UNK_8, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_9", Self::VT_UNK_9, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_10", Self::VT_UNK_10, false)?
.finish();
Ok(())
}
}
pub struct CallingCardConfigTemplateArgs<'a> {
pub id: u32,
pub unk_1: i32,
pub unk_2: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_3: i32,
pub unk_4: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_5: i32,
pub unk_6: i32,
pub avatar_id: u32,
pub unk_8: i32,
pub unk_9: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_10: Option<flatbuffers::WIPOffset<&'a str>>,
}
impl<'a> Default for CallingCardConfigTemplateArgs<'a> {
#[inline]
fn default() -> Self {
CallingCardConfigTemplateArgs {
id: 0,
unk_1: 0,
unk_2: None,
unk_3: 0,
unk_4: None,
unk_5: 0,
unk_6: 0,
avatar_id: 0,
unk_8: 0,
unk_9: None,
unk_10: None,
}
}
}
pub struct CallingCardConfigTemplateBuilder<'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> CallingCardConfigTemplateBuilder<'a, 'b, A> {
#[inline]
pub fn add_id(&mut self, id: u32) {
self.fbb_.push_slot::<u32>(CallingCardConfigTemplate::VT_ID, id, 0);
}
#[inline]
pub fn add_unk_1(&mut self, unk_1: i32) {
self.fbb_.push_slot::<i32>(CallingCardConfigTemplate::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<_>>(CallingCardConfigTemplate::VT_UNK_2, unk_2);
}
#[inline]
pub fn add_unk_3(&mut self, unk_3: i32) {
self.fbb_.push_slot::<i32>(CallingCardConfigTemplate::VT_UNK_3, unk_3, 0);
}
#[inline]
pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CallingCardConfigTemplate::VT_UNK_4, unk_4);
}
#[inline]
pub fn add_unk_5(&mut self, unk_5: i32) {
self.fbb_.push_slot::<i32>(CallingCardConfigTemplate::VT_UNK_5, unk_5, 0);
}
#[inline]
pub fn add_unk_6(&mut self, unk_6: i32) {
self.fbb_.push_slot::<i32>(CallingCardConfigTemplate::VT_UNK_6, unk_6, 0);
}
#[inline]
pub fn add_avatar_id(&mut self, avatar_id: u32) {
self.fbb_.push_slot::<u32>(CallingCardConfigTemplate::VT_AVATAR_ID, avatar_id, 0);
}
#[inline]
pub fn add_unk_8(&mut self, unk_8: i32) {
self.fbb_.push_slot::<i32>(CallingCardConfigTemplate::VT_UNK_8, unk_8, 0);
}
#[inline]
pub fn add_unk_9(&mut self, unk_9: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CallingCardConfigTemplate::VT_UNK_9, unk_9);
}
#[inline]
pub fn add_unk_10(&mut self, unk_10: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CallingCardConfigTemplate::VT_UNK_10, unk_10);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CallingCardConfigTemplateBuilder<'a, 'b, A> {
let start = _fbb.start_table();
CallingCardConfigTemplateBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<CallingCardConfigTemplate<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for CallingCardConfigTemplate<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("CallingCardConfigTemplate");
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("avatar_id", &self.avatar_id());
ds.field("unk_8", &self.unk_8());
ds.field("unk_9", &self.unk_9());
ds.field("unk_10", &self.unk_10());
ds.finish()
}
}
pub enum CallingCardConfigTemplateTbOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct CallingCardConfigTemplateTb<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for CallingCardConfigTemplateTb<'a> {
type Inner = CallingCardConfigTemplateTb<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> CallingCardConfigTemplateTb<'a> {
pub const VT_DATA: flatbuffers::VOffsetT = 4;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
CallingCardConfigTemplateTb { _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 CallingCardConfigTemplateTbArgs<'args>
) -> flatbuffers::WIPOffset<CallingCardConfigTemplateTb<'bldr>> {
let mut builder = CallingCardConfigTemplateTbBuilder::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<CallingCardConfigTemplate<'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<CallingCardConfigTemplate>>>>(CallingCardConfigTemplateTb::VT_DATA, None)}
}
}
impl flatbuffers::Verifiable for CallingCardConfigTemplateTb<'_> {
#[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<CallingCardConfigTemplate>>>>("data", Self::VT_DATA, false)?
.finish();
Ok(())
}
}
pub struct CallingCardConfigTemplateTbArgs<'a> {
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<CallingCardConfigTemplate<'a>>>>>,
}
impl<'a> Default for CallingCardConfigTemplateTbArgs<'a> {
#[inline]
fn default() -> Self {
CallingCardConfigTemplateTbArgs {
data: None,
}
}
}
pub struct CallingCardConfigTemplateTbBuilder<'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> CallingCardConfigTemplateTbBuilder<'a, 'b, A> {
#[inline]
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<CallingCardConfigTemplate<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CallingCardConfigTemplateTb::VT_DATA, data);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CallingCardConfigTemplateTbBuilder<'a, 'b, A> {
let start = _fbb.start_table();
CallingCardConfigTemplateTbBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<CallingCardConfigTemplateTb<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for CallingCardConfigTemplateTb<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("CallingCardConfigTemplateTb");
ds.field("data", &self.data());
ds.finish()
}
}

View file

@ -0,0 +1,511 @@
// 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 PlayerSkinAccessoriesConfigTemplateOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct PlayerSkinAccessoriesConfigTemplate<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for PlayerSkinAccessoriesConfigTemplate<'a> {
type Inner = PlayerSkinAccessoriesConfigTemplate<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> PlayerSkinAccessoriesConfigTemplate<'a> {
pub const VT_ID: flatbuffers::VOffsetT = 4;
pub const VT_NAME: 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_SKIN_ID: flatbuffers::VOffsetT = 20;
pub const VT_UNK_9: flatbuffers::VOffsetT = 22;
pub const VT_UNK_10: flatbuffers::VOffsetT = 24;
pub const VT_UNK_11: flatbuffers::VOffsetT = 26;
pub const VT_UNK_12: flatbuffers::VOffsetT = 28;
pub const VT_UNK_13: flatbuffers::VOffsetT = 30;
pub const VT_BONE_NAME: flatbuffers::VOffsetT = 32;
pub const VT_UNK_15: flatbuffers::VOffsetT = 34;
pub const VT_UNK_16: flatbuffers::VOffsetT = 36;
pub const VT_UNK_17: flatbuffers::VOffsetT = 38;
pub const VT_SOURCE: flatbuffers::VOffsetT = 40;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
PlayerSkinAccessoriesConfigTemplate { _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 PlayerSkinAccessoriesConfigTemplateArgs<'args>
) -> flatbuffers::WIPOffset<PlayerSkinAccessoriesConfigTemplate<'bldr>> {
let mut builder = PlayerSkinAccessoriesConfigTemplateBuilder::new(_fbb);
if let Some(x) = args.source { builder.add_source(x); }
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); }
if let Some(x) = args.bone_name { builder.add_bone_name(x); }
if let Some(x) = args.unk_13 { builder.add_unk_13(x); }
if let Some(x) = args.unk_12 { builder.add_unk_12(x); }
if let Some(x) = args.unk_11 { builder.add_unk_11(x); }
if let Some(x) = args.unk_10 { builder.add_unk_10(x); }
builder.add_unk_9(args.unk_9);
builder.add_skin_id(args.skin_id);
builder.add_unk_7(args.unk_7);
if let Some(x) = args.unk_6 { builder.add_unk_6(x); }
if let Some(x) = args.unk_5 { builder.add_unk_5(x); }
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.name { builder.add_name(x); }
builder.add_id(args.id);
builder.finish()
}
#[inline]
pub fn id(&self) -> u32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<u32>(PlayerSkinAccessoriesConfigTemplate::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>>(PlayerSkinAccessoriesConfigTemplate::VT_NAME, None)}
}
#[inline]
pub fn unk_2(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PlayerSkinAccessoriesConfigTemplate::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>(PlayerSkinAccessoriesConfigTemplate::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>(PlayerSkinAccessoriesConfigTemplate::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>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_5, None)}
}
#[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>>(PlayerSkinAccessoriesConfigTemplate::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>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_7, Some(0)).unwrap()}
}
#[inline]
pub fn skin_id(&self) -> u32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<u32>(PlayerSkinAccessoriesConfigTemplate::VT_SKIN_ID, Some(0)).unwrap()}
}
#[inline]
pub fn unk_9(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_9, Some(0)).unwrap()}
}
#[inline]
pub fn unk_10(&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>>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_10, None)}
}
#[inline]
pub fn unk_11(&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>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_11, None)}
}
#[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>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_12, None)}
}
#[inline]
pub fn unk_13(&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>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_13, None)}
}
#[inline]
pub fn bone_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>>(PlayerSkinAccessoriesConfigTemplate::VT_BONE_NAME, None)}
}
#[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>>(PlayerSkinAccessoriesConfigTemplate::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>(PlayerSkinAccessoriesConfigTemplate::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>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_17, None)}
}
#[inline]
pub fn source(&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>>(PlayerSkinAccessoriesConfigTemplate::VT_SOURCE, None)}
}
}
impl flatbuffers::Verifiable for PlayerSkinAccessoriesConfigTemplate<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<u32>("id", Self::VT_ID, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, 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::<i32>("unk_4", Self::VT_UNK_4, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("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::<u32>("skin_id", Self::VT_SKIN_ID, false)?
.visit_field::<i32>("unk_9", Self::VT_UNK_9, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("unk_10", Self::VT_UNK_10, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_11", Self::VT_UNK_11, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_12", Self::VT_UNK_12, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_13", Self::VT_UNK_13, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("bone_name", Self::VT_BONE_NAME, 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::<flatbuffers::ForwardsUOffset<&str>>("source", Self::VT_SOURCE, false)?
.finish();
Ok(())
}
}
pub struct PlayerSkinAccessoriesConfigTemplateArgs<'a> {
pub id: u32,
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_2: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_3: i32,
pub unk_4: i32,
pub unk_5: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_6: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_7: i32,
pub skin_id: u32,
pub unk_9: i32,
pub unk_10: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
pub unk_11: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_12: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_13: Option<flatbuffers::WIPOffset<&'a str>>,
pub bone_name: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_15: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_16: i32,
pub unk_17: Option<flatbuffers::WIPOffset<&'a str>>,
pub source: Option<flatbuffers::WIPOffset<&'a str>>,
}
impl<'a> Default for PlayerSkinAccessoriesConfigTemplateArgs<'a> {
#[inline]
fn default() -> Self {
PlayerSkinAccessoriesConfigTemplateArgs {
id: 0,
name: None,
unk_2: None,
unk_3: 0,
unk_4: 0,
unk_5: None,
unk_6: None,
unk_7: 0,
skin_id: 0,
unk_9: 0,
unk_10: None,
unk_11: None,
unk_12: None,
unk_13: None,
bone_name: None,
unk_15: None,
unk_16: 0,
unk_17: None,
source: None,
}
}
}
pub struct PlayerSkinAccessoriesConfigTemplateBuilder<'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> PlayerSkinAccessoriesConfigTemplateBuilder<'a, 'b, A> {
#[inline]
pub fn add_id(&mut self, id: u32) {
self.fbb_.push_slot::<u32>(PlayerSkinAccessoriesConfigTemplate::VT_ID, id, 0);
}
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_NAME, name);
}
#[inline]
pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_2, unk_2);
}
#[inline]
pub fn add_unk_3(&mut self, unk_3: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_3, unk_3, 0);
}
#[inline]
pub fn add_unk_4(&mut self, unk_4: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinAccessoriesConfigTemplate::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<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_5, unk_5);
}
#[inline]
pub fn add_unk_6(&mut self, unk_6: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_6, unk_6);
}
#[inline]
pub fn add_unk_7(&mut self, unk_7: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_7, unk_7, 0);
}
#[inline]
pub fn add_skin_id(&mut self, skin_id: u32) {
self.fbb_.push_slot::<u32>(PlayerSkinAccessoriesConfigTemplate::VT_SKIN_ID, skin_id, 0);
}
#[inline]
pub fn add_unk_9(&mut self, unk_9: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_9, unk_9, 0);
}
#[inline]
pub fn add_unk_10(&mut self, unk_10: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_10, unk_10);
}
#[inline]
pub fn add_unk_11(&mut self, unk_11: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_11, unk_11);
}
#[inline]
pub fn add_unk_12(&mut self, unk_12: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_12, unk_12);
}
#[inline]
pub fn add_unk_13(&mut self, unk_13: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_13, unk_13);
}
#[inline]
pub fn add_bone_name(&mut self, bone_name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_BONE_NAME, bone_name);
}
#[inline]
pub fn add_unk_15(&mut self, unk_15: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_15, unk_15);
}
#[inline]
pub fn add_unk_16(&mut self, unk_16: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinAccessoriesConfigTemplate::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<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_17, unk_17);
}
#[inline]
pub fn add_source(&mut self, source: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_SOURCE, source);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PlayerSkinAccessoriesConfigTemplateBuilder<'a, 'b, A> {
let start = _fbb.start_table();
PlayerSkinAccessoriesConfigTemplateBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<PlayerSkinAccessoriesConfigTemplate<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for PlayerSkinAccessoriesConfigTemplate<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("PlayerSkinAccessoriesConfigTemplate");
ds.field("id", &self.id());
ds.field("name", &self.name());
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("skin_id", &self.skin_id());
ds.field("unk_9", &self.unk_9());
ds.field("unk_10", &self.unk_10());
ds.field("unk_11", &self.unk_11());
ds.field("unk_12", &self.unk_12());
ds.field("unk_13", &self.unk_13());
ds.field("bone_name", &self.bone_name());
ds.field("unk_15", &self.unk_15());
ds.field("unk_16", &self.unk_16());
ds.field("unk_17", &self.unk_17());
ds.field("source", &self.source());
ds.finish()
}
}
pub enum PlayerSkinAccessoriesConfigTemplateTbOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct PlayerSkinAccessoriesConfigTemplateTb<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for PlayerSkinAccessoriesConfigTemplateTb<'a> {
type Inner = PlayerSkinAccessoriesConfigTemplateTb<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> PlayerSkinAccessoriesConfigTemplateTb<'a> {
pub const VT_DATA: flatbuffers::VOffsetT = 4;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
PlayerSkinAccessoriesConfigTemplateTb { _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 PlayerSkinAccessoriesConfigTemplateTbArgs<'args>
) -> flatbuffers::WIPOffset<PlayerSkinAccessoriesConfigTemplateTb<'bldr>> {
let mut builder = PlayerSkinAccessoriesConfigTemplateTbBuilder::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<PlayerSkinAccessoriesConfigTemplate<'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<PlayerSkinAccessoriesConfigTemplate>>>>(PlayerSkinAccessoriesConfigTemplateTb::VT_DATA, None)}
}
}
impl flatbuffers::Verifiable for PlayerSkinAccessoriesConfigTemplateTb<'_> {
#[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<PlayerSkinAccessoriesConfigTemplate>>>>("data", Self::VT_DATA, false)?
.finish();
Ok(())
}
}
pub struct PlayerSkinAccessoriesConfigTemplateTbArgs<'a> {
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PlayerSkinAccessoriesConfigTemplate<'a>>>>>,
}
impl<'a> Default for PlayerSkinAccessoriesConfigTemplateTbArgs<'a> {
#[inline]
fn default() -> Self {
PlayerSkinAccessoriesConfigTemplateTbArgs {
data: None,
}
}
}
pub struct PlayerSkinAccessoriesConfigTemplateTbBuilder<'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> PlayerSkinAccessoriesConfigTemplateTbBuilder<'a, 'b, A> {
#[inline]
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<PlayerSkinAccessoriesConfigTemplate<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplateTb::VT_DATA, data);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PlayerSkinAccessoriesConfigTemplateTbBuilder<'a, 'b, A> {
let start = _fbb.start_table();
PlayerSkinAccessoriesConfigTemplateTbBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<PlayerSkinAccessoriesConfigTemplateTb<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for PlayerSkinAccessoriesConfigTemplateTb<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("PlayerSkinAccessoriesConfigTemplateTb");
ds.field("data", &self.data());
ds.finish()
}
}

View file

@ -0,0 +1,511 @@
// 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 PlayerSkinAccessoriesConfigTemplateOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct PlayerSkinAccessoriesConfigTemplate<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for PlayerSkinAccessoriesConfigTemplate<'a> {
type Inner = PlayerSkinAccessoriesConfigTemplate<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> PlayerSkinAccessoriesConfigTemplate<'a> {
pub const VT_ACCESSORY_ID: flatbuffers::VOffsetT = 4;
pub const VT_NAME: 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_PLAYER_SKIN_ID: flatbuffers::VOffsetT = 20;
pub const VT_UNK_9: flatbuffers::VOffsetT = 22;
pub const VT_UNK_10: flatbuffers::VOffsetT = 24;
pub const VT_UNK_11: flatbuffers::VOffsetT = 26;
pub const VT_UNK_12: flatbuffers::VOffsetT = 28;
pub const VT_UNK_13: flatbuffers::VOffsetT = 30;
pub const VT_BONE_NAME: flatbuffers::VOffsetT = 32;
pub const VT_UNK_15: flatbuffers::VOffsetT = 34;
pub const VT_UNK_16: flatbuffers::VOffsetT = 36;
pub const VT_UNK_17: flatbuffers::VOffsetT = 38;
pub const VT_SOURCE: flatbuffers::VOffsetT = 40;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
PlayerSkinAccessoriesConfigTemplate { _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 PlayerSkinAccessoriesConfigTemplateArgs<'args>
) -> flatbuffers::WIPOffset<PlayerSkinAccessoriesConfigTemplate<'bldr>> {
let mut builder = PlayerSkinAccessoriesConfigTemplateBuilder::new(_fbb);
if let Some(x) = args.source { builder.add_source(x); }
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); }
if let Some(x) = args.bone_name { builder.add_bone_name(x); }
if let Some(x) = args.unk_13 { builder.add_unk_13(x); }
if let Some(x) = args.unk_12 { builder.add_unk_12(x); }
if let Some(x) = args.unk_11 { builder.add_unk_11(x); }
if let Some(x) = args.unk_10 { builder.add_unk_10(x); }
builder.add_unk_9(args.unk_9);
builder.add_player_skin_id(args.player_skin_id);
builder.add_unk_7(args.unk_7);
if let Some(x) = args.unk_6 { builder.add_unk_6(x); }
if let Some(x) = args.unk_5 { builder.add_unk_5(x); }
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.name { builder.add_name(x); }
builder.add_accessory_id(args.accessory_id);
builder.finish()
}
#[inline]
pub fn accessory_id(&self) -> u32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<u32>(PlayerSkinAccessoriesConfigTemplate::VT_ACCESSORY_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>>(PlayerSkinAccessoriesConfigTemplate::VT_NAME, None)}
}
#[inline]
pub fn unk_2(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PlayerSkinAccessoriesConfigTemplate::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>(PlayerSkinAccessoriesConfigTemplate::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>(PlayerSkinAccessoriesConfigTemplate::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>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_5, None)}
}
#[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>>(PlayerSkinAccessoriesConfigTemplate::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>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_7, Some(0)).unwrap()}
}
#[inline]
pub fn player_skin_id(&self) -> u32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<u32>(PlayerSkinAccessoriesConfigTemplate::VT_PLAYER_SKIN_ID, Some(0)).unwrap()}
}
#[inline]
pub fn unk_9(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_9, Some(0)).unwrap()}
}
#[inline]
pub fn unk_10(&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>>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_10, None)}
}
#[inline]
pub fn unk_11(&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>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_11, None)}
}
#[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>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_12, None)}
}
#[inline]
pub fn unk_13(&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>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_13, None)}
}
#[inline]
pub fn bone_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>>(PlayerSkinAccessoriesConfigTemplate::VT_BONE_NAME, None)}
}
#[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>>(PlayerSkinAccessoriesConfigTemplate::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>(PlayerSkinAccessoriesConfigTemplate::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>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_17, None)}
}
#[inline]
pub fn source(&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>>(PlayerSkinAccessoriesConfigTemplate::VT_SOURCE, None)}
}
}
impl flatbuffers::Verifiable for PlayerSkinAccessoriesConfigTemplate<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<u32>("accessory_id", Self::VT_ACCESSORY_ID, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, 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::<i32>("unk_4", Self::VT_UNK_4, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("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::<u32>("player_skin_id", Self::VT_PLAYER_SKIN_ID, false)?
.visit_field::<i32>("unk_9", Self::VT_UNK_9, false)?
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("unk_10", Self::VT_UNK_10, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_11", Self::VT_UNK_11, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_12", Self::VT_UNK_12, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_13", Self::VT_UNK_13, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("bone_name", Self::VT_BONE_NAME, 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::<flatbuffers::ForwardsUOffset<&str>>("source", Self::VT_SOURCE, false)?
.finish();
Ok(())
}
}
pub struct PlayerSkinAccessoriesConfigTemplateArgs<'a> {
pub accessory_id: u32,
pub name: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_2: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_3: i32,
pub unk_4: i32,
pub unk_5: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_6: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_7: i32,
pub player_skin_id: u32,
pub unk_9: i32,
pub unk_10: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
pub unk_11: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_12: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_13: Option<flatbuffers::WIPOffset<&'a str>>,
pub bone_name: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_15: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_16: i32,
pub unk_17: Option<flatbuffers::WIPOffset<&'a str>>,
pub source: Option<flatbuffers::WIPOffset<&'a str>>,
}
impl<'a> Default for PlayerSkinAccessoriesConfigTemplateArgs<'a> {
#[inline]
fn default() -> Self {
PlayerSkinAccessoriesConfigTemplateArgs {
accessory_id: 0,
name: None,
unk_2: None,
unk_3: 0,
unk_4: 0,
unk_5: None,
unk_6: None,
unk_7: 0,
player_skin_id: 0,
unk_9: 0,
unk_10: None,
unk_11: None,
unk_12: None,
unk_13: None,
bone_name: None,
unk_15: None,
unk_16: 0,
unk_17: None,
source: None,
}
}
}
pub struct PlayerSkinAccessoriesConfigTemplateBuilder<'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> PlayerSkinAccessoriesConfigTemplateBuilder<'a, 'b, A> {
#[inline]
pub fn add_accessory_id(&mut self, accessory_id: u32) {
self.fbb_.push_slot::<u32>(PlayerSkinAccessoriesConfigTemplate::VT_ACCESSORY_ID, accessory_id, 0);
}
#[inline]
pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_NAME, name);
}
#[inline]
pub fn add_unk_2(&mut self, unk_2: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_2, unk_2);
}
#[inline]
pub fn add_unk_3(&mut self, unk_3: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_3, unk_3, 0);
}
#[inline]
pub fn add_unk_4(&mut self, unk_4: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinAccessoriesConfigTemplate::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<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_5, unk_5);
}
#[inline]
pub fn add_unk_6(&mut self, unk_6: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_6, unk_6);
}
#[inline]
pub fn add_unk_7(&mut self, unk_7: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_7, unk_7, 0);
}
#[inline]
pub fn add_player_skin_id(&mut self, player_skin_id: u32) {
self.fbb_.push_slot::<u32>(PlayerSkinAccessoriesConfigTemplate::VT_PLAYER_SKIN_ID, player_skin_id, 0);
}
#[inline]
pub fn add_unk_9(&mut self, unk_9: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_9, unk_9, 0);
}
#[inline]
pub fn add_unk_10(&mut self, unk_10: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_10, unk_10);
}
#[inline]
pub fn add_unk_11(&mut self, unk_11: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_11, unk_11);
}
#[inline]
pub fn add_unk_12(&mut self, unk_12: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_12, unk_12);
}
#[inline]
pub fn add_unk_13(&mut self, unk_13: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_13, unk_13);
}
#[inline]
pub fn add_bone_name(&mut self, bone_name: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_BONE_NAME, bone_name);
}
#[inline]
pub fn add_unk_15(&mut self, unk_15: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_15, unk_15);
}
#[inline]
pub fn add_unk_16(&mut self, unk_16: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinAccessoriesConfigTemplate::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<_>>(PlayerSkinAccessoriesConfigTemplate::VT_UNK_17, unk_17);
}
#[inline]
pub fn add_source(&mut self, source: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplate::VT_SOURCE, source);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PlayerSkinAccessoriesConfigTemplateBuilder<'a, 'b, A> {
let start = _fbb.start_table();
PlayerSkinAccessoriesConfigTemplateBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<PlayerSkinAccessoriesConfigTemplate<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for PlayerSkinAccessoriesConfigTemplate<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("PlayerSkinAccessoriesConfigTemplate");
ds.field("accessory_id", &self.accessory_id());
ds.field("name", &self.name());
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("player_skin_id", &self.player_skin_id());
ds.field("unk_9", &self.unk_9());
ds.field("unk_10", &self.unk_10());
ds.field("unk_11", &self.unk_11());
ds.field("unk_12", &self.unk_12());
ds.field("unk_13", &self.unk_13());
ds.field("bone_name", &self.bone_name());
ds.field("unk_15", &self.unk_15());
ds.field("unk_16", &self.unk_16());
ds.field("unk_17", &self.unk_17());
ds.field("source", &self.source());
ds.finish()
}
}
pub enum PlayerSkinAccessoriesConfigTemplateTbOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct PlayerSkinAccessoriesConfigTemplateTb<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for PlayerSkinAccessoriesConfigTemplateTb<'a> {
type Inner = PlayerSkinAccessoriesConfigTemplateTb<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> PlayerSkinAccessoriesConfigTemplateTb<'a> {
pub const VT_DATA: flatbuffers::VOffsetT = 4;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
PlayerSkinAccessoriesConfigTemplateTb { _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 PlayerSkinAccessoriesConfigTemplateTbArgs<'args>
) -> flatbuffers::WIPOffset<PlayerSkinAccessoriesConfigTemplateTb<'bldr>> {
let mut builder = PlayerSkinAccessoriesConfigTemplateTbBuilder::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<PlayerSkinAccessoriesConfigTemplate<'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<PlayerSkinAccessoriesConfigTemplate>>>>(PlayerSkinAccessoriesConfigTemplateTb::VT_DATA, None)}
}
}
impl flatbuffers::Verifiable for PlayerSkinAccessoriesConfigTemplateTb<'_> {
#[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<PlayerSkinAccessoriesConfigTemplate>>>>("data", Self::VT_DATA, false)?
.finish();
Ok(())
}
}
pub struct PlayerSkinAccessoriesConfigTemplateTbArgs<'a> {
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PlayerSkinAccessoriesConfigTemplate<'a>>>>>,
}
impl<'a> Default for PlayerSkinAccessoriesConfigTemplateTbArgs<'a> {
#[inline]
fn default() -> Self {
PlayerSkinAccessoriesConfigTemplateTbArgs {
data: None,
}
}
}
pub struct PlayerSkinAccessoriesConfigTemplateTbBuilder<'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> PlayerSkinAccessoriesConfigTemplateTbBuilder<'a, 'b, A> {
#[inline]
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<PlayerSkinAccessoriesConfigTemplate<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinAccessoriesConfigTemplateTb::VT_DATA, data);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PlayerSkinAccessoriesConfigTemplateTbBuilder<'a, 'b, A> {
let start = _fbb.start_table();
PlayerSkinAccessoriesConfigTemplateTbBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<PlayerSkinAccessoriesConfigTemplateTb<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for PlayerSkinAccessoriesConfigTemplateTb<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("PlayerSkinAccessoriesConfigTemplateTb");
ds.field("data", &self.data());
ds.finish()
}
}

View file

@ -0,0 +1,358 @@
// 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 PlayerSkinConfigTemplateOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct PlayerSkinConfigTemplate<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for PlayerSkinConfigTemplate<'a> {
type Inner = PlayerSkinConfigTemplate<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> PlayerSkinConfigTemplate<'a> {
pub const VT_PLAYER_SKIN_ID: flatbuffers::VOffsetT = 4;
pub const VT_GENDER: flatbuffers::VOffsetT = 6;
pub const VT_NEEDS_UNLOCK: flatbuffers::VOffsetT = 8;
pub const VT_UNK_3: flatbuffers::VOffsetT = 10;
pub const VT_UNK_4: flatbuffers::VOffsetT = 12;
pub const VT_UNK_5: flatbuffers::VOffsetT = 14;
pub const VT_UNK_6: flatbuffers::VOffsetT = 16;
pub const VT_UNK_7: flatbuffers::VOffsetT = 18;
pub const VT_UNK_8: flatbuffers::VOffsetT = 20;
pub const VT_UNK_9: flatbuffers::VOffsetT = 22;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
PlayerSkinConfigTemplate { _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 PlayerSkinConfigTemplateArgs<'args>
) -> flatbuffers::WIPOffset<PlayerSkinConfigTemplate<'bldr>> {
let mut builder = PlayerSkinConfigTemplateBuilder::new(_fbb);
if let Some(x) = args.unk_9 { builder.add_unk_9(x); }
if let Some(x) = args.unk_8 { builder.add_unk_8(x); }
builder.add_unk_7(args.unk_7);
builder.add_unk_6(args.unk_6);
builder.add_unk_5(args.unk_5);
if let Some(x) = args.unk_4 { builder.add_unk_4(x); }
builder.add_unk_3(args.unk_3);
builder.add_gender(args.gender);
builder.add_player_skin_id(args.player_skin_id);
builder.add_needs_unlock(args.needs_unlock);
builder.finish()
}
#[inline]
pub fn player_skin_id(&self) -> u32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<u32>(PlayerSkinConfigTemplate::VT_PLAYER_SKIN_ID, Some(0)).unwrap()}
}
#[inline]
pub fn gender(&self) -> u32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<u32>(PlayerSkinConfigTemplate::VT_GENDER, Some(0)).unwrap()}
}
#[inline]
pub fn needs_unlock(&self) -> bool {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<bool>(PlayerSkinConfigTemplate::VT_NEEDS_UNLOCK, Some(false)).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>(PlayerSkinConfigTemplate::VT_UNK_3, Some(0)).unwrap()}
}
#[inline]
pub fn unk_4(&self) -> Option<&'a str> {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PlayerSkinConfigTemplate::VT_UNK_4, None)}
}
#[inline]
pub fn unk_5(&self) -> u32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<u32>(PlayerSkinConfigTemplate::VT_UNK_5, Some(0)).unwrap()}
}
#[inline]
pub fn unk_6(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(PlayerSkinConfigTemplate::VT_UNK_6, Some(0)).unwrap()}
}
#[inline]
pub fn unk_7(&self) -> i32 {
// Safety:
// Created from valid Table for this object
// which contains a valid value in this slot
unsafe { self._tab.get::<i32>(PlayerSkinConfigTemplate::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>>(PlayerSkinConfigTemplate::VT_UNK_8, None)}
}
#[inline]
pub fn unk_9(&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>>(PlayerSkinConfigTemplate::VT_UNK_9, None)}
}
}
impl flatbuffers::Verifiable for PlayerSkinConfigTemplate<'_> {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
v.visit_table(pos)?
.visit_field::<u32>("player_skin_id", Self::VT_PLAYER_SKIN_ID, false)?
.visit_field::<u32>("gender", Self::VT_GENDER, false)?
.visit_field::<bool>("needs_unlock", Self::VT_NEEDS_UNLOCK, false)?
.visit_field::<i32>("unk_3", Self::VT_UNK_3, false)?
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_4", Self::VT_UNK_4, false)?
.visit_field::<u32>("unk_5", Self::VT_UNK_5, false)?
.visit_field::<i32>("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>>("unk_9", Self::VT_UNK_9, false)?
.finish();
Ok(())
}
}
pub struct PlayerSkinConfigTemplateArgs<'a> {
pub player_skin_id: u32,
pub gender: u32,
pub needs_unlock: bool,
pub unk_3: i32,
pub unk_4: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_5: u32,
pub unk_6: i32,
pub unk_7: i32,
pub unk_8: Option<flatbuffers::WIPOffset<&'a str>>,
pub unk_9: Option<flatbuffers::WIPOffset<&'a str>>,
}
impl<'a> Default for PlayerSkinConfigTemplateArgs<'a> {
#[inline]
fn default() -> Self {
PlayerSkinConfigTemplateArgs {
player_skin_id: 0,
gender: 0,
needs_unlock: false,
unk_3: 0,
unk_4: None,
unk_5: 0,
unk_6: 0,
unk_7: 0,
unk_8: None,
unk_9: None,
}
}
}
pub struct PlayerSkinConfigTemplateBuilder<'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> PlayerSkinConfigTemplateBuilder<'a, 'b, A> {
#[inline]
pub fn add_player_skin_id(&mut self, player_skin_id: u32) {
self.fbb_.push_slot::<u32>(PlayerSkinConfigTemplate::VT_PLAYER_SKIN_ID, player_skin_id, 0);
}
#[inline]
pub fn add_gender(&mut self, gender: u32) {
self.fbb_.push_slot::<u32>(PlayerSkinConfigTemplate::VT_GENDER, gender, 0);
}
#[inline]
pub fn add_needs_unlock(&mut self, needs_unlock: bool) {
self.fbb_.push_slot::<bool>(PlayerSkinConfigTemplate::VT_NEEDS_UNLOCK, needs_unlock, false);
}
#[inline]
pub fn add_unk_3(&mut self, unk_3: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinConfigTemplate::VT_UNK_3, unk_3, 0);
}
#[inline]
pub fn add_unk_4(&mut self, unk_4: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinConfigTemplate::VT_UNK_4, unk_4);
}
#[inline]
pub fn add_unk_5(&mut self, unk_5: u32) {
self.fbb_.push_slot::<u32>(PlayerSkinConfigTemplate::VT_UNK_5, unk_5, 0);
}
#[inline]
pub fn add_unk_6(&mut self, unk_6: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinConfigTemplate::VT_UNK_6, unk_6, 0);
}
#[inline]
pub fn add_unk_7(&mut self, unk_7: i32) {
self.fbb_.push_slot::<i32>(PlayerSkinConfigTemplate::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<_>>(PlayerSkinConfigTemplate::VT_UNK_8, unk_8);
}
#[inline]
pub fn add_unk_9(&mut self, unk_9: flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinConfigTemplate::VT_UNK_9, unk_9);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PlayerSkinConfigTemplateBuilder<'a, 'b, A> {
let start = _fbb.start_table();
PlayerSkinConfigTemplateBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<PlayerSkinConfigTemplate<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for PlayerSkinConfigTemplate<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("PlayerSkinConfigTemplate");
ds.field("player_skin_id", &self.player_skin_id());
ds.field("gender", &self.gender());
ds.field("needs_unlock", &self.needs_unlock());
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.finish()
}
}
pub enum PlayerSkinConfigTemplateTbOffset {}
#[derive(Copy, Clone, PartialEq)]
pub struct PlayerSkinConfigTemplateTb<'a> {
pub _tab: flatbuffers::Table<'a>,
}
impl<'a> flatbuffers::Follow<'a> for PlayerSkinConfigTemplateTb<'a> {
type Inner = PlayerSkinConfigTemplateTb<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: flatbuffers::Table::new(buf, loc) }
}
}
impl<'a> PlayerSkinConfigTemplateTb<'a> {
pub const VT_DATA: flatbuffers::VOffsetT = 4;
#[inline]
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
PlayerSkinConfigTemplateTb { _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 PlayerSkinConfigTemplateTbArgs<'args>
) -> flatbuffers::WIPOffset<PlayerSkinConfigTemplateTb<'bldr>> {
let mut builder = PlayerSkinConfigTemplateTbBuilder::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<PlayerSkinConfigTemplate<'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<PlayerSkinConfigTemplate>>>>(PlayerSkinConfigTemplateTb::VT_DATA, None)}
}
}
impl flatbuffers::Verifiable for PlayerSkinConfigTemplateTb<'_> {
#[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<PlayerSkinConfigTemplate>>>>("data", Self::VT_DATA, false)?
.finish();
Ok(())
}
}
pub struct PlayerSkinConfigTemplateTbArgs<'a> {
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PlayerSkinConfigTemplate<'a>>>>>,
}
impl<'a> Default for PlayerSkinConfigTemplateTbArgs<'a> {
#[inline]
fn default() -> Self {
PlayerSkinConfigTemplateTbArgs {
data: None,
}
}
}
pub struct PlayerSkinConfigTemplateTbBuilder<'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> PlayerSkinConfigTemplateTbBuilder<'a, 'b, A> {
#[inline]
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<PlayerSkinConfigTemplate<'b >>>>) {
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PlayerSkinConfigTemplateTb::VT_DATA, data);
}
#[inline]
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PlayerSkinConfigTemplateTbBuilder<'a, 'b, A> {
let start = _fbb.start_table();
PlayerSkinConfigTemplateTbBuilder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> flatbuffers::WIPOffset<PlayerSkinConfigTemplateTb<'a>> {
let o = self.fbb_.end_table(self.start_);
flatbuffers::WIPOffset::new(o.value())
}
}
impl core::fmt::Debug for PlayerSkinConfigTemplateTb<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut ds = f.debug_struct("PlayerSkinConfigTemplateTb");
ds.field("data", &self.data());
ds.finish()
}
}

View file

@ -39,6 +39,9 @@ file_cfg! {
TeleportConfigTemplate;
UrbanAreaMapGroupTemplate;
UrbanAreaMapTemplate;
CallingCardConfigTemplate;
PlayerSkinConfigTemplate;
PlayerSkinAccessoriesConfigTemplate;
}
macro_rules! file_cfg {

View file

@ -25,8 +25,9 @@ pub use item::ItemModel;
pub use main_city::MainCityModel;
pub use map::{AreaGroupInfo, AreaStreetInfo, MapModel};
pub use misc::{
InputSetting, MiscModel, PropertyNewbieData, PropertyNewsStandData, PropertyPostGirlData,
PropertySwitchData, PropertyUnlockData, QuickAccess,
InputSetting, MiscModel, PlayerAccessory, PlayerSkin, PropertyNewbieData,
PropertyNewsStandData, PropertyPlayerAccessoryData, PropertyPostGirlData, PropertySwitchData,
PropertyUnlockData, QuickAccess,
};
pub use quest::{MainCityQuestExt, Quest, QuestCollection, QuestModel};
pub use scene::*;

View file

@ -1,4 +1,4 @@
use std::collections::HashMap;
use std::collections::{HashMap, HashSet};
use super::*;
use vivian_codegen::Property;
@ -62,6 +62,28 @@ pub struct PropertySwitchData {
pub input_setting_map: PropertyHashMap<u32, InputSetting>,
}
#[derive(Property, Default)]
pub struct PropertyBusinessCardData {
pub unlocked_items: PropertyHashSet<u32>,
pub selected_id: PrimitiveProperty<u32>,
}
#[derive(Default)]
pub struct PlayerSkin {
pub equipped_accessory_id_list: HashSet<u32>,
}
#[derive(Default)]
pub struct PlayerAccessory {
pub avatar_skin_id: u32,
pub player_skin_map: HashMap<u32, PlayerSkin>,
}
#[derive(Property, Default)]
pub struct PropertyPlayerAccessoryData {
pub player_accessory_map: PropertyHashMap<u32, PlayerAccessory>,
}
#[derive(Model)]
pub struct MiscModel {
pub switch: PropertySwitchData,
@ -70,6 +92,8 @@ pub struct MiscModel {
pub newbie: PropertyNewbieData,
pub news_stand: PropertyNewsStandData,
pub post_girl: PropertyPostGirlData,
pub business_card: PropertyBusinessCardData,
pub player_accessory: PropertyPlayerAccessoryData,
}
impl MiscModel {
@ -140,6 +164,45 @@ impl MiscModel {
unlocked_id: data.unlocked_id_list.into_iter().collect(),
})
.unwrap_or_default(),
business_card: pb
.business_card
.map(|data| PropertyBusinessCardData {
unlocked_items: data.unlocked_id_list.into_iter().collect(),
selected_id: data.selected_id.into(),
})
.unwrap_or_default(),
player_accessory: pb
.player_accessory
.map(|data| PropertyPlayerAccessoryData {
player_accessory_map: data
.player_accessory_list
.into_iter()
.map(|player_accessory| {
(
player_accessory.avatar_id,
PlayerAccessory {
avatar_skin_id: player_accessory.avatar_skin_id,
player_skin_map: player_accessory
.player_skin_list
.into_iter()
.map(|player_skin| {
(
player_skin.player_skin_id,
PlayerSkin {
equipped_accessory_id_list: player_skin
.equipped_accessory_id_list
.into_iter()
.collect(),
},
)
})
.collect(),
},
)
})
.collect(),
})
.unwrap_or_default(),
}
}
}
@ -205,6 +268,33 @@ impl Saveable for MiscModel {
teleport: Some(TeleportUnlockData {
unlocked_id_list: self.teleport.unlocked_id.iter().copied().collect(),
}),
business_card: Some(BusinessCardData {
unlocked_id_list: self.business_card.unlocked_items.iter().copied().collect(),
selected_id: self.business_card.selected_id.get(),
}),
player_accessory: Some(PlayerAccessoryData {
player_accessory_list: self
.player_accessory
.player_accessory_map
.iter()
.map(|(&avatar_id, player_accessory)| PlayerAccessoryInfo {
avatar_id,
avatar_skin_id: player_accessory.avatar_skin_id,
player_skin_list: player_accessory
.player_skin_map
.iter()
.map(|(&player_skin_id, player_skin)| PlayerSkinInfo {
player_skin_id,
equipped_accessory_id_list: player_skin
.equipped_accessory_id_list
.iter()
.copied()
.collect(),
})
.collect(),
})
.collect(),
}),
});
}
}

View file

@ -1,22 +1,19 @@
// This file is @generated by prost-build.
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct Transform {
#[prost(double, repeated, tag = "1")]
pub position: ::prost::alloc::vec::Vec<f64>,
#[prost(double, repeated, tag = "2")]
pub rotation: ::prost::alloc::vec::Vec<f64>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct Vector2Int {
#[prost(int32, tag = "1")]
pub x: i32,
#[prost(int32, tag = "2")]
pub y: i32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct HollowGridState {
#[prost(int32, tag = "1")]
pub node_state: i32,
@ -27,8 +24,7 @@ pub struct HollowGridState {
#[prost(int32, tag = "4")]
pub sub_state: i32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct LogSkillUseInfo {
#[prost(int32, tag = "1")]
pub skill_id: i32,
@ -43,8 +39,7 @@ pub struct LogSkillUseInfo {
#[prost(string, tag = "6")]
pub skill_name: ::prost::alloc::string::String,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct LogBattleAvatarInfo {
#[prost(int32, tag = "1")]
pub avatar_id: i32,
@ -73,8 +68,7 @@ pub struct LogBattleAvatarInfo {
#[prost(message, repeated, tag = "14")]
pub skill_use: ::prost::alloc::vec::Vec<LogSkillUseInfo>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct LogBattleStatistics {
#[prost(int64, tag = "1")]
pub battle_uid: i64,
@ -93,8 +87,7 @@ pub struct LogBattleStatistics {
#[prost(int32, tag = "11")]
pub star: i32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct FightResult {
#[prost(int32, tag = "1")]
pub result: i32,
@ -192,9 +185,7 @@ impl HollowGridFlag {
Self::SyncToClient => "HOLLOW_GRID_FLAG_SYNC_TO_CLIENT",
Self::Door => "HOLLOW_GRID_FLAG_DOOR",
Self::CanTriggerMultiTimes => "HOLLOW_GRID_FLAG_CAN_TRIGGER_MULTI_TIMES",
Self::TemporaryVisibleAtAround => {
"HOLLOW_GRID_FLAG_TEMPORARY_VISIBLE_AT_AROUND"
}
Self::TemporaryVisibleAtAround => "HOLLOW_GRID_FLAG_TEMPORARY_VISIBLE_AT_AROUND",
Self::Unlocked => "HOLLOW_GRID_FLAG_UNLOCKED",
Self::Brighten => "HOLLOW_GRID_FLAG_BRIGHTEN",
Self::Guide => "HOLLOW_GRID_FLAG_GUIDE",
@ -222,17 +213,11 @@ impl HollowGridFlag {
"HOLLOW_GRID_FLAG_CAN_TRIGGER_EVENT" => Some(Self::CanTriggerEvent),
"HOLLOW_GRID_FLAG_VISIBLE" => Some(Self::Visible),
"HOLLOW_GRID_FLAG_VISIBLE_AT_GRID_AROUND" => Some(Self::VisibleAtGridAround),
"HOLLOW_GRID_FLAG_VISIBLE_BY_TRIGGER_EVENT" => {
Some(Self::VisibleByTriggerEvent)
}
"HOLLOW_GRID_FLAG_VISIBLE_BY_TRIGGER_EVENT" => Some(Self::VisibleByTriggerEvent),
"HOLLOW_GRID_FLAG_SYNC_TO_CLIENT" => Some(Self::SyncToClient),
"HOLLOW_GRID_FLAG_DOOR" => Some(Self::Door),
"HOLLOW_GRID_FLAG_CAN_TRIGGER_MULTI_TIMES" => {
Some(Self::CanTriggerMultiTimes)
}
"HOLLOW_GRID_FLAG_TEMPORARY_VISIBLE_AT_AROUND" => {
Some(Self::TemporaryVisibleAtAround)
}
"HOLLOW_GRID_FLAG_CAN_TRIGGER_MULTI_TIMES" => Some(Self::CanTriggerMultiTimes),
"HOLLOW_GRID_FLAG_TEMPORARY_VISIBLE_AT_AROUND" => Some(Self::TemporaryVisibleAtAround),
"HOLLOW_GRID_FLAG_UNLOCKED" => Some(Self::Unlocked),
"HOLLOW_GRID_FLAG_BRIGHTEN" => Some(Self::Brighten),
"HOLLOW_GRID_FLAG_GUIDE" => Some(Self::Guide),
@ -344,9 +329,7 @@ impl NodeVisible {
"NODE_VISIBLE_VISIBLE" => Some(Self::Visible),
"NODE_VISIBLE_VISIBLE_AT_GRID_AROUND" => Some(Self::VisibleAtGridAround),
"NODE_VISIBLE_VISIBLE_BY_TRIGGER_EVENT" => Some(Self::VisibleByTriggerEvent),
"NODE_VISIBLE_TEMPORARY_VISIBLE_AT_AROUND" => {
Some(Self::TemporaryVisibleAtAround)
}
"NODE_VISIBLE_TEMPORARY_VISIBLE_AT_AROUND" => Some(Self::TemporaryVisibleAtAround),
"NODE_VISIBLE_BLOCKED" => Some(Self::Blocked),
_ => None,
}

70556
lib/proto/out/cs_current.rs Normal file

File diff suppressed because it is too large Load diff

4527
lib/proto/out/cs_internal.rs Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,5 @@
// This file is @generated by prost-build.
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct PlayerData {
#[prost(message, optional, tag = "1")]
pub basic: ::core::option::Option<BasicData>,
@ -29,8 +28,7 @@ pub struct PlayerData {
#[prost(message, optional, tag = "13")]
pub map: ::core::option::Option<MapData>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct BasicData {
#[prost(string, tag = "1")]
pub nick_name: ::prost::alloc::string::String,
@ -51,14 +49,12 @@ pub struct BasicData {
#[prost(uint32, tag = "9")]
pub portrait_id: u32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct AvatarData {
#[prost(message, repeated, tag = "1")]
pub avatar_list: ::prost::alloc::vec::Vec<AvatarItemInfo>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct AvatarItemInfo {
#[prost(uint32, tag = "1")]
pub id: u32,
@ -91,8 +87,7 @@ pub struct AvatarItemInfo {
#[prost(bool, tag = "15")]
pub is_favorite: bool,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct ItemData {
#[prost(message, repeated, tag = "1")]
pub item_list: ::prost::alloc::vec::Vec<GenericItemInfo>,
@ -105,16 +100,14 @@ pub struct ItemData {
#[prost(uint32, tag = "5")]
pub item_uid_counter: u32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct GenericItemInfo {
#[prost(uint32, tag = "1")]
pub id: u32,
#[prost(int32, tag = "2")]
pub count: i32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct WeaponItemInfo {
#[prost(uint32, tag = "1")]
pub uid: u32,
@ -131,8 +124,7 @@ pub struct WeaponItemInfo {
#[prost(bool, tag = "7")]
pub lock: bool,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct EquipPropertyInfo {
#[prost(uint32, tag = "1")]
pub property_type: u32,
@ -141,8 +133,7 @@ pub struct EquipPropertyInfo {
#[prost(uint32, tag = "3")]
pub add_value: u32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct EquipItemInfo {
#[prost(uint32, tag = "1")]
pub uid: u32,
@ -161,28 +152,24 @@ pub struct EquipItemInfo {
#[prost(message, repeated, tag = "8")]
pub sub_properties: ::prost::alloc::vec::Vec<EquipPropertyInfo>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct AutoRecoveryItemInfo {
#[prost(uint32, tag = "1")]
pub buy_times: u32,
#[prost(int64, tag = "2")]
pub last_recovery_timestamp: i64,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct QuestData {
#[prost(message, repeated, tag = "1")]
pub quest_collection_list: ::prost::alloc::vec::Vec<QuestCollectionInfo>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct MainCityQuestInfo {
#[prost(uint32, repeated, tag = "1")]
pub track_npc_id_list: ::prost::alloc::vec::Vec<u32>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct QuestInfo {
#[prost(uint32, tag = "1")]
pub id: u32,
@ -199,8 +186,7 @@ pub struct QuestInfo {
#[prost(message, optional, tag = "7")]
pub main_city_quest_info: ::core::option::Option<MainCityQuestInfo>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct QuestCollectionInfo {
#[prost(uint32, tag = "1")]
pub quest_type: u32,
@ -209,24 +195,21 @@ pub struct QuestCollectionInfo {
#[prost(uint32, repeated, tag = "3")]
pub finish_quest_id_list: ::prost::alloc::vec::Vec<u32>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct ArchiveData {
#[prost(uint32, repeated, tag = "1")]
pub hollow_archive_id_list: ::prost::alloc::vec::Vec<u32>,
#[prost(message, repeated, tag = "2")]
pub videotape_list: ::prost::alloc::vec::Vec<VideotapeInfo>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct VideotapeInfo {
#[prost(uint32, tag = "1")]
pub archive_file_id: u32,
#[prost(bool, tag = "2")]
pub finished: bool,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct HollowData {
#[prost(uint32, repeated, tag = "1")]
pub hollow_group_list: ::prost::alloc::vec::Vec<u32>,
@ -241,8 +224,7 @@ pub struct HollowData {
#[prost(uint32, repeated, tag = "6")]
pub executed_hollow_event_id_list: ::prost::alloc::vec::Vec<u32>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct HollowInfo {
#[prost(uint32, tag = "1")]
pub hollow_quest_id: u32,
@ -251,17 +233,14 @@ pub struct HollowInfo {
#[prost(uint32, tag = "3")]
pub acquired_hollow_challenge_reward: u32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct AbyssData {}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct BuddyData {
#[prost(message, repeated, tag = "1")]
pub buddy_list: ::prost::alloc::vec::Vec<BuddyItemInfo>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct BuddyItemInfo {
#[prost(uint32, tag = "1")]
pub id: u32,
@ -280,8 +259,7 @@ pub struct BuddyItemInfo {
#[prost(uint32, repeated, tag = "8")]
pub taken_rank_up_reward_list: ::prost::alloc::vec::Vec<u32>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct MiscData {
#[prost(message, optional, tag = "1")]
pub switch: ::core::option::Option<SwitchData>,
@ -295,15 +273,45 @@ pub struct MiscData {
pub post_girl: ::core::option::Option<PostGirlData>,
#[prost(message, optional, tag = "6")]
pub teleport: ::core::option::Option<TeleportUnlockData>,
#[prost(message, optional, tag = "7")]
pub business_card: ::core::option::Option<BusinessCardData>,
#[prost(message, optional, tag = "8")]
pub player_accessory: ::core::option::Option<PlayerAccessoryData>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct PlayerSkinInfo {
#[prost(uint32, tag = "1")]
pub player_skin_id: u32,
#[prost(uint32, repeated, tag = "2")]
pub equipped_accessory_id_list: ::prost::alloc::vec::Vec<u32>,
}
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct PlayerAccessoryInfo {
#[prost(uint32, tag = "1")]
pub avatar_id: u32,
#[prost(uint32, tag = "2")]
pub avatar_skin_id: u32,
#[prost(message, repeated, tag = "3")]
pub player_skin_list: ::prost::alloc::vec::Vec<PlayerSkinInfo>,
}
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct PlayerAccessoryData {
#[prost(message, repeated, tag = "1")]
pub player_accessory_list: ::prost::alloc::vec::Vec<PlayerAccessoryInfo>,
}
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct BusinessCardData {
#[prost(uint32, repeated, tag = "1")]
pub unlocked_id_list: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, tag = "2")]
pub selected_id: u32,
}
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct InputSettingInfo {
#[prost(map = "uint32, int32", tag = "1")]
pub input_type_map: ::std::collections::HashMap<u32, i32>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct SwitchData {
#[prost(uint32, repeated, tag = "1")]
pub open_system_id_list: ::prost::alloc::vec::Vec<u32>,
@ -314,8 +322,7 @@ pub struct SwitchData {
#[prost(map = "uint32, message", tag = "4")]
pub input_setting_map: ::std::collections::HashMap<u32, InputSettingInfo>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct QuickAccessItem {
#[prost(uint32, tag = "1")]
pub quick_access_id: u32,
@ -324,22 +331,19 @@ pub struct QuickAccessItem {
#[prost(int32, tag = "3")]
pub quick_access_type: i32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct UnlockData {
#[prost(int32, repeated, tag = "1")]
pub unlocked_id_list: ::prost::alloc::vec::Vec<i32>,
#[prost(message, repeated, tag = "2")]
pub quick_access_list: ::prost::alloc::vec::Vec<QuickAccessItem>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct NewbieData {
#[prost(int32, repeated, tag = "1")]
pub finished_group_id_list: ::prost::alloc::vec::Vec<i32>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct NewsStandData {
#[prost(int32, tag = "1")]
pub cur_style: i32,
@ -362,16 +366,14 @@ pub struct NewsStandData {
#[prost(int64, tag = "10")]
pub last_sign_time: i64,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct PostGirlItem {
#[prost(uint32, tag = "1")]
pub id: u32,
#[prost(int64, tag = "2")]
pub unlock_time: i64,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct PostGirlData {
#[prost(message, repeated, tag = "1")]
pub post_girl_item_list: ::prost::alloc::vec::Vec<PostGirlItem>,
@ -380,14 +382,12 @@ pub struct PostGirlData {
#[prost(bool, tag = "3")]
pub post_girl_random_toggle: bool,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct TeleportUnlockData {
#[prost(int32, repeated, tag = "1")]
pub unlocked_id_list: ::prost::alloc::vec::Vec<i32>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct MainCityData {
#[prost(uint32, tag = "3")]
pub bgm_id: u32,
@ -410,8 +410,7 @@ pub mod main_city_data {
TransformId(::prost::alloc::string::String),
}
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct SceneData {
#[prost(uint64, tag = "1")]
pub cur_scene_uid: u64,
@ -422,8 +421,7 @@ pub struct SceneData {
#[prost(map = "uint64, message", tag = "4")]
pub dungeons: ::std::collections::HashMap<u64, DungeonInfo>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct SceneInfo {
#[prost(uint32, tag = "1")]
pub id: u32,
@ -452,8 +450,7 @@ pub mod scene_info {
LongFight(super::LongFightSceneInfo),
}
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct HallSceneInfo {
#[prost(uint32, tag = "1")]
pub cur_section_id: u32,
@ -462,8 +459,7 @@ pub struct HallSceneInfo {
#[prost(map = "int32, int32", tag = "3")]
pub main_city_objects_state: ::std::collections::HashMap<i32, i32>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct UnitInteract {
#[prost(int32, tag = "1")]
pub tag_id: i32,
@ -484,8 +480,7 @@ pub struct UnitInteract {
#[prost(int32, repeated, tag = "9")]
pub interact_target_list: ::prost::alloc::vec::Vec<i32>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct HallSceneUnit {
#[prost(uint32, tag = "1")]
pub npc_tag_id: u32,
@ -494,16 +489,14 @@ pub struct HallSceneUnit {
#[prost(map = "uint32, message", tag = "3")]
pub interacts: ::std::collections::HashMap<u32, UnitInteract>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct AttachedGraphInfo {
#[prost(uint32, tag = "1")]
pub reference_id: u32,
#[prost(enumeration = "GraphReferenceType", tag = "2")]
pub reference_type: i32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct EventStateInfo {
#[prost(uint64, tag = "1")]
pub event_uid: u64,
@ -520,8 +513,7 @@ pub struct EventStateInfo {
#[prost(uint32, tag = "7")]
pub tag: u32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct HallSectionInfo {
#[prost(uint32, tag = "1")]
pub section_id: u32,
@ -534,35 +526,30 @@ pub struct HallSectionInfo {
#[prost(uint64, repeated, tag = "5")]
pub already_executed_event_uid_list: ::prost::alloc::vec::Vec<u64>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct HollowSceneInfo {}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct FightSceneInfo {
#[prost(string, tag = "1")]
pub time_period: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub weather: ::prost::alloc::string::String,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct LongFightSceneInfo {
#[prost(string, tag = "1")]
pub time_period: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub weather: ::prost::alloc::string::String,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct DungeonInfo {
#[prost(uint32, tag = "1")]
pub quest_id: u32,
#[prost(uint32, tag = "2")]
pub quest_type: u32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct GachaStatisticsInfo {
#[prost(uint32, tag = "1")]
pub gacha_id: u32,
@ -577,16 +564,14 @@ pub struct GachaStatisticsInfo {
#[prost(bool, tag = "6")]
pub optional_up_item_state: bool,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct GachaData {
#[prost(message, repeated, tag = "1")]
pub gacha_statistics_list: ::prost::alloc::vec::Vec<GachaStatisticsInfo>,
#[prost(uint32, tag = "2")]
pub gacha_random: u32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct MapAreaGroupInfo {
#[prost(uint32, tag = "1")]
pub group_id: u32,
@ -595,8 +580,7 @@ pub struct MapAreaGroupInfo {
#[prost(uint32, tag = "3")]
pub area_progress: u32,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
pub struct MapAreaStreetInfo {
#[prost(uint32, tag = "1")]
pub area_id: u32,
@ -611,8 +595,7 @@ pub struct MapAreaStreetInfo {
#[prost(bool, tag = "6")]
pub new_area_portals_showed: bool,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct MapData {
#[prost(message, repeated, tag = "1")]
pub area_group_list: ::prost::alloc::vec::Vec<MapAreaGroupInfo>,
@ -670,8 +653,7 @@ pub struct PlayerGetDataRsp {
#[prost(message, optional, tag = "2")]
pub player_data: ::core::option::Option<PlayerData>,
}
#[derive(::proto_derive::NetCmd)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
pub struct NetCommand {
#[prost(uint32, tag = "1")]
pub cmd_id: u32,

View file

@ -1,9 +1,9 @@
use std::collections::HashMap;
use vivian_proto::server_only::{
AbyssData, ArchiveData, AvatarData, BuddyData, GachaData, HollowData, ItemData, MainCityData,
MapData, MiscData, NewbieData, NewsStandData, PostGirlData, QuestData, SceneData, SwitchData,
TeleportUnlockData, UnlockData,
AbyssData, ArchiveData, AvatarData, BuddyData, BusinessCardData, GachaData, HollowData,
ItemData, MainCityData, MapData, MiscData, NewbieData, NewsStandData, PlayerAccessoryData,
PostGirlData, QuestData, SceneData, SwitchData, TeleportUnlockData, UnlockData,
};
pub trait ModelData {
@ -100,6 +100,8 @@ impl ModelData for MiscData {
news_stand: Some(NewsStandData::default()),
post_girl: Some(PostGirlData::default()),
teleport: Some(TeleportUnlockData::default()),
business_card: Some(BusinessCardData::default()),
player_accessory: Some(PlayerAccessoryData::default()),
}
}
}

View file

@ -4,14 +4,7 @@ use vivian_codegen::{handlers, required_state};
use vivian_logic::system::{ClientSystemType, EOperator};
use vivian_models::InputSetting;
use vivian_proto::{
BattleReportCsReq, BattleReportScRsp, EndNewbieCsReq, EndNewbieScRsp, FinishNewbieGroupCsReq,
FinishNewbieGroupScRsp, GameLogReportCsReq, GameLogReportScRsp, GetMiscDataCsReq,
GetMiscDataScRsp, GetNewsStandDataCsReq, GetNewsStandDataScRsp, GetSwitchDataCsReq,
GetSwitchDataScRsp, ItemRewardInfo, NewsStandSignCsReq, NewsStandSignScRsp,
PlayerOperationCsReq, PlayerOperationScRsp, ReadNewsCsReq, ReadNewsScRsp,
ReportUiLayoutPlatformCsReq, ReportUiLayoutPlatformScRsp, SavePlayerSystemSettingCsReq,
SavePlayerSystemSettingScRsp, SelectPostGirlCsReq, SelectPostGirlScRsp,
SyncGlobalVariablesCsReq, SyncGlobalVariablesScRsp, VideoGetInfoCsReq, VideoGetInfoScRsp,
BattleReportCsReq, BattleReportScRsp, EndNewbieCsReq, EndNewbieScRsp, FinishNewbieGroupCsReq, FinishNewbieGroupScRsp, GameLogReportCsReq, GameLogReportScRsp, GetMiscDataCsReq, GetMiscDataScRsp, GetNewsStandDataCsReq, GetNewsStandDataScRsp, GetSwitchDataCsReq, GetSwitchDataScRsp, ItemRewardInfo, NewsStandSignCsReq, NewsStandSignScRsp, PlayerOperationCsReq, PlayerOperationScRsp, ReadNewsCsReq, ReadNewsScRsp, ReportUiLayoutPlatformCsReq, ReportUiLayoutPlatformScRsp, SavePlayerAccessoryCsReq, SavePlayerAccessoryScRsp, SavePlayerSystemSettingCsReq, SavePlayerSystemSettingScRsp, SelectPostGirlCsReq, SelectPostGirlScRsp, SyncGlobalVariablesCsReq, SyncGlobalVariablesScRsp, VideoGetInfoCsReq, VideoGetInfoScRsp
};
use crate::{sync::SyncType, util::item_util};
@ -281,4 +274,41 @@ impl MiscHandler {
) -> SyncGlobalVariablesScRsp {
SyncGlobalVariablesScRsp { retcode: 0 }
}
pub fn on_save_player_accessory_cs_req(
context: &mut NetContext<'_>,
request: SavePlayerAccessoryCsReq,
) -> SavePlayerAccessoryScRsp {
debug!("{request:?}");
let player_accessory_data = &mut context.player.misc_model.player_accessory;
if let Some(info) = request.player_accessory {
let Some(player_accessory) = player_accessory_data
.player_accessory_map
.get_mut(&info.avatar_id)
else {
return SavePlayerAccessoryScRsp { retcode: 1 }
};
player_accessory.avatar_skin_id = info.avatar_skin_id;
info
.player_skin_list
.into_iter()
.for_each(|skin_info| {
let player_skin = player_accessory
.player_skin_map
.entry(skin_info.player_skin_id)
.or_default();
player_skin.equipped_accessory_id_list = skin_info
.equipped_accessory_id_list
.into_iter()
.collect();
});
}
SavePlayerAccessoryScRsp { retcode: 0 }
}
}

View file

@ -294,6 +294,42 @@ impl LoginDataSyncComponent for MiscModel {
.collect(),
post_girl_random_toggle: self.post_girl.random_toggle.get(),
}),
business_card: Some(vivian_proto::BusinessCardData {
unlocked_business_card_id_list: self
.business_card
.unlocked_items
.iter()
.copied()
.collect(),
selected_id: self.business_card.selected_id.get(),
}),
player_accessory: Some(vivian_proto::PlayerAccessoryData {
player_accessory_list: self
.player_accessory
.player_accessory_map
.iter()
.map(|(&avatar_id, player_accessory)| {
vivian_proto::PlayerAccessoryInfo {
avatar_id,
avatar_skin_id: player_accessory.avatar_skin_id,
player_skin_list: player_accessory
.player_skin_map
.iter()
.map(|(&player_skin_id, player_skin)| {
vivian_proto::PlayerSkinInfo {
player_skin_id,
equipped_accessory_id_list: player_skin
.equipped_accessory_id_list
.iter()
.copied()
.collect(),
}
})
.collect(),
}
})
.collect(),
}),
}),
},
);

View file

@ -228,6 +228,48 @@ impl PlayerSyncComponent for MiscModel {
post_girl_random_toggle: self.post_girl.random_toggle.get(),
});
}
if self.business_card.is_changed() {
sync.business_card = Some(vivian_proto::BusinessCardSync {
unlocked_business_card_id_list: self
.business_card
.unlocked_items
.iter()
.copied()
.collect(),
selected_id: self.business_card.selected_id.get(),
});
}
if self.player_accessory.is_changed() {
sync.player_accessory = Some(vivian_proto::PlayerAccessorySync {
player_accessory_list: self
.player_accessory
.player_accessory_map
.iter()
.map(
|(&avatar_id, player_accessory)| vivian_proto::PlayerAccessoryInfo {
avatar_id,
avatar_skin_id: player_accessory.avatar_skin_id,
player_skin_list: player_accessory
.player_skin_map
.iter()
.map(|(&player_skin_id, player_skin)| {
vivian_proto::PlayerSkinInfo {
player_skin_id,
equipped_accessory_id_list: player_skin
.equipped_accessory_id_list
.iter()
.copied()
.collect(),
}
})
.collect(),
},
)
.collect(),
});
}
}
}

View file

@ -15,6 +15,18 @@ pub fn add_items_on_first_login(player: &mut Player) {
.avatar_skin_base_template_tb()
.for_each(|tmpl| player.item_model.item_count_map.insert(tmpl.id(), 1));
// Unlock all player skin accessories by default for now
player
.resources
.templates
.player_skin_accessories_config_template_tb()
.for_each(|tmpl| {
player
.item_model
.item_count_map
.insert(tmpl.accessory_id(), 1)
});
let weapon_cfg = &player.resources.gameplay.first_login.weapon;
if weapon_cfg.unlock_all {

View file

@ -1,5 +1,5 @@
use common::time_util;
use vivian_models::property::PropertyHashSet;
use vivian_models::{PlayerAccessory, PlayerSkin, property::PropertyHashSet};
use crate::player::Player;
@ -37,4 +37,50 @@ pub fn init_misc_structs_on_first_login(player: &mut Player) {
.for_each(|tmpl| {
model.teleport.unlocked_id.insert(tmpl.teleport_id());
});
player
.resources
.templates
.calling_card_config_template_tb()
.for_each(|tmpl| {
model.business_card.unlocked_items.insert(tmpl.id());
});
model.business_card.selected_id.set(
player
.resources
.templates
.calling_card_config_template_tb()
.next()
.unwrap()
.id(),
);
// TODO: Dynamically find player avatar IDs <-> gender
init_player_accessory(player, 2011, 1);
init_player_accessory(player, 2021, 2);
}
fn init_player_accessory(player: &mut Player, avatar_id: u32, gender: u32) {
let model = &mut player.misc_model;
model.player_accessory.player_accessory_map.insert(
avatar_id,
PlayerAccessory {
avatar_skin_id: player
.resources
.templates
.player_skin_config_template_tb()
.find(|tmpl| tmpl.gender() == gender && !tmpl.needs_unlock())
.unwrap()
.player_skin_id(),
player_skin_map: player
.resources
.templates
.player_skin_config_template_tb()
.filter(|tmpl| tmpl.gender() == gender)
.map(|tmpl| (tmpl.player_skin_id(), PlayerSkin::default()))
.collect(),
},
);
}