// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::SCHALE.Common.Crypto; using global::Google.FlatBuffers; public struct CharacterVoiceExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static CharacterVoiceExcel GetRootAsCharacterVoiceExcel(ByteBuffer _bb) { return GetRootAsCharacterVoiceExcel(_bb, new CharacterVoiceExcel()); } public static CharacterVoiceExcel GetRootAsCharacterVoiceExcel(ByteBuffer _bb, CharacterVoiceExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public CharacterVoiceExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long CharacterVoiceUniqueId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long CharacterVoiceGroupId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public uint VoiceHash { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public bool OnlyOne { get { int o = __p.__offset(10); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public int Priority { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public long DisplayOrder { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public bool CollectionVisible { get { int o = __p.__offset(16); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public SCHALE.Common.FlatData.CVCollectionType CVCollectionType_ { get { int o = __p.__offset(18); return o != 0 ? (SCHALE.Common.FlatData.CVCollectionType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.CVCollectionType.CVNormal; } } public long UnlockFavorRank { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string LocalizeCVGroup { get { int o = __p.__offset(22); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetLocalizeCVGroupBytes() { return __p.__vector_as_span(22, 1); } #else public ArraySegment? GetLocalizeCVGroupBytes() { return __p.__vector_as_arraysegment(22); } #endif public byte[] GetLocalizeCVGroupArray() { return __p.__vector_as_array(22); } public SCHALE.Common.FlatData.Nation Nation_(int j) { int o = __p.__offset(24); return o != 0 ? (SCHALE.Common.FlatData.Nation)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.Nation)0; } public int Nation_Length { get { int o = __p.__offset(24); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetNation_Bytes() { return __p.__vector_as_span(24, 4); } #else public ArraySegment? GetNation_Bytes() { return __p.__vector_as_arraysegment(24); } #endif public SCHALE.Common.FlatData.Nation[] GetNation_Array() { int o = __p.__offset(24); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.Nation[] a = new SCHALE.Common.FlatData.Nation[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.Nation)__p.bb.GetInt(p + i * 4); } return a; } public float Volume(int j) { int o = __p.__offset(26); return o != 0 ? __p.bb.GetFloat(__p.__vector(o) + j * 4) : (float)0; } public int VolumeLength { get { int o = __p.__offset(26); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetVolumeBytes() { return __p.__vector_as_span(26, 4); } #else public ArraySegment? GetVolumeBytes() { return __p.__vector_as_arraysegment(26); } #endif public float[] GetVolumeArray() { return __p.__vector_as_array(26); } public float Delay(int j) { int o = __p.__offset(28); return o != 0 ? __p.bb.GetFloat(__p.__vector(o) + j * 4) : (float)0; } public int DelayLength { get { int o = __p.__offset(28); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetDelayBytes() { return __p.__vector_as_span(28, 4); } #else public ArraySegment? GetDelayBytes() { return __p.__vector_as_arraysegment(28); } #endif public float[] GetDelayArray() { return __p.__vector_as_array(28); } public string Path(int j) { int o = __p.__offset(30); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } public int PathLength { get { int o = __p.__offset(30); return o != 0 ? __p.__vector_len(o) : 0; } } public static Offset CreateCharacterVoiceExcel(FlatBufferBuilder builder, long CharacterVoiceUniqueId = 0, long CharacterVoiceGroupId = 0, uint VoiceHash = 0, bool OnlyOne = false, int Priority = 0, long DisplayOrder = 0, bool CollectionVisible = false, SCHALE.Common.FlatData.CVCollectionType CVCollectionType_ = SCHALE.Common.FlatData.CVCollectionType.CVNormal, long UnlockFavorRank = 0, StringOffset LocalizeCVGroupOffset = default(StringOffset), VectorOffset Nation_Offset = default(VectorOffset), VectorOffset VolumeOffset = default(VectorOffset), VectorOffset DelayOffset = default(VectorOffset), VectorOffset PathOffset = default(VectorOffset)) { builder.StartTable(14); CharacterVoiceExcel.AddUnlockFavorRank(builder, UnlockFavorRank); CharacterVoiceExcel.AddDisplayOrder(builder, DisplayOrder); CharacterVoiceExcel.AddCharacterVoiceGroupId(builder, CharacterVoiceGroupId); CharacterVoiceExcel.AddCharacterVoiceUniqueId(builder, CharacterVoiceUniqueId); CharacterVoiceExcel.AddPath(builder, PathOffset); CharacterVoiceExcel.AddDelay(builder, DelayOffset); CharacterVoiceExcel.AddVolume(builder, VolumeOffset); CharacterVoiceExcel.AddNation_(builder, Nation_Offset); CharacterVoiceExcel.AddLocalizeCVGroup(builder, LocalizeCVGroupOffset); CharacterVoiceExcel.AddCVCollectionType_(builder, CVCollectionType_); CharacterVoiceExcel.AddPriority(builder, Priority); CharacterVoiceExcel.AddVoiceHash(builder, VoiceHash); CharacterVoiceExcel.AddCollectionVisible(builder, CollectionVisible); CharacterVoiceExcel.AddOnlyOne(builder, OnlyOne); return CharacterVoiceExcel.EndCharacterVoiceExcel(builder); } public static void StartCharacterVoiceExcel(FlatBufferBuilder builder) { builder.StartTable(14); } public static void AddCharacterVoiceUniqueId(FlatBufferBuilder builder, long characterVoiceUniqueId) { builder.AddLong(0, characterVoiceUniqueId, 0); } public static void AddCharacterVoiceGroupId(FlatBufferBuilder builder, long characterVoiceGroupId) { builder.AddLong(1, characterVoiceGroupId, 0); } public static void AddVoiceHash(FlatBufferBuilder builder, uint voiceHash) { builder.AddUint(2, voiceHash, 0); } public static void AddOnlyOne(FlatBufferBuilder builder, bool onlyOne) { builder.AddBool(3, onlyOne, false); } public static void AddPriority(FlatBufferBuilder builder, int priority) { builder.AddInt(4, priority, 0); } public static void AddDisplayOrder(FlatBufferBuilder builder, long displayOrder) { builder.AddLong(5, displayOrder, 0); } public static void AddCollectionVisible(FlatBufferBuilder builder, bool collectionVisible) { builder.AddBool(6, collectionVisible, false); } public static void AddCVCollectionType_(FlatBufferBuilder builder, SCHALE.Common.FlatData.CVCollectionType cVCollectionType_) { builder.AddInt(7, (int)cVCollectionType_, 0); } public static void AddUnlockFavorRank(FlatBufferBuilder builder, long unlockFavorRank) { builder.AddLong(8, unlockFavorRank, 0); } public static void AddLocalizeCVGroup(FlatBufferBuilder builder, StringOffset localizeCVGroupOffset) { builder.AddOffset(9, localizeCVGroupOffset.Value, 0); } public static void AddNation_(FlatBufferBuilder builder, VectorOffset nation_Offset) { builder.AddOffset(10, nation_Offset.Value, 0); } public static VectorOffset CreateNation_Vector(FlatBufferBuilder builder, SCHALE.Common.FlatData.Nation[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt((int)data[i]); return builder.EndVector(); } public static VectorOffset CreateNation_VectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.Nation[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateNation_VectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateNation_VectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartNation_Vector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddVolume(FlatBufferBuilder builder, VectorOffset volumeOffset) { builder.AddOffset(11, volumeOffset.Value, 0); } public static VectorOffset CreateVolumeVector(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddFloat(data[i]); return builder.EndVector(); } public static VectorOffset CreateVolumeVectorBlock(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateVolumeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateVolumeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartVolumeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddDelay(FlatBufferBuilder builder, VectorOffset delayOffset) { builder.AddOffset(12, delayOffset.Value, 0); } public static VectorOffset CreateDelayVector(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddFloat(data[i]); return builder.EndVector(); } public static VectorOffset CreateDelayVectorBlock(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateDelayVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateDelayVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartDelayVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddPath(FlatBufferBuilder builder, VectorOffset pathOffset) { builder.AddOffset(13, pathOffset.Value, 0); } public static VectorOffset CreatePathVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } public static VectorOffset CreatePathVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreatePathVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreatePathVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartPathVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static Offset EndCharacterVoiceExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public CharacterVoiceExcelT UnPack() { var _o = new CharacterVoiceExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(CharacterVoiceExcelT _o) { byte[] key = TableEncryptionService.CreateKey("CharacterVoice"); _o.CharacterVoiceUniqueId = TableEncryptionService.Convert(this.CharacterVoiceUniqueId, key); _o.CharacterVoiceGroupId = TableEncryptionService.Convert(this.CharacterVoiceGroupId, key); _o.VoiceHash = TableEncryptionService.Convert(this.VoiceHash, key); _o.OnlyOne = TableEncryptionService.Convert(this.OnlyOne, key); _o.Priority = TableEncryptionService.Convert(this.Priority, key); _o.DisplayOrder = TableEncryptionService.Convert(this.DisplayOrder, key); _o.CollectionVisible = TableEncryptionService.Convert(this.CollectionVisible, key); _o.CVCollectionType_ = TableEncryptionService.Convert(this.CVCollectionType_, key); _o.UnlockFavorRank = TableEncryptionService.Convert(this.UnlockFavorRank, key); _o.LocalizeCVGroup = TableEncryptionService.Convert(this.LocalizeCVGroup, key); _o.Nation_ = new List(); for (var _j = 0; _j < this.Nation_Length; ++_j) {_o.Nation_.Add(TableEncryptionService.Convert(this.Nation_(_j), key));} _o.Volume = new List(); for (var _j = 0; _j < this.VolumeLength; ++_j) {_o.Volume.Add(TableEncryptionService.Convert(this.Volume(_j), key));} _o.Delay = new List(); for (var _j = 0; _j < this.DelayLength; ++_j) {_o.Delay.Add(TableEncryptionService.Convert(this.Delay(_j), key));} _o.Path = new List(); for (var _j = 0; _j < this.PathLength; ++_j) {_o.Path.Add(TableEncryptionService.Convert(this.Path(_j), key));} } public static Offset Pack(FlatBufferBuilder builder, CharacterVoiceExcelT _o) { if (_o == null) return default(Offset); var _LocalizeCVGroup = _o.LocalizeCVGroup == null ? default(StringOffset) : builder.CreateString(_o.LocalizeCVGroup); var _Nation_ = default(VectorOffset); if (_o.Nation_ != null) { var __Nation_ = _o.Nation_.ToArray(); _Nation_ = CreateNation_Vector(builder, __Nation_); } var _Volume = default(VectorOffset); if (_o.Volume != null) { var __Volume = _o.Volume.ToArray(); _Volume = CreateVolumeVector(builder, __Volume); } var _Delay = default(VectorOffset); if (_o.Delay != null) { var __Delay = _o.Delay.ToArray(); _Delay = CreateDelayVector(builder, __Delay); } var _Path = default(VectorOffset); if (_o.Path != null) { var __Path = new StringOffset[_o.Path.Count]; for (var _j = 0; _j < __Path.Length; ++_j) { __Path[_j] = builder.CreateString(_o.Path[_j]); } _Path = CreatePathVector(builder, __Path); } return CreateCharacterVoiceExcel( builder, _o.CharacterVoiceUniqueId, _o.CharacterVoiceGroupId, _o.VoiceHash, _o.OnlyOne, _o.Priority, _o.DisplayOrder, _o.CollectionVisible, _o.CVCollectionType_, _o.UnlockFavorRank, _LocalizeCVGroup, _Nation_, _Volume, _Delay, _Path); } } public class CharacterVoiceExcelT { public long CharacterVoiceUniqueId { get; set; } public long CharacterVoiceGroupId { get; set; } public uint VoiceHash { get; set; } public bool OnlyOne { get; set; } public int Priority { get; set; } public long DisplayOrder { get; set; } public bool CollectionVisible { get; set; } public SCHALE.Common.FlatData.CVCollectionType CVCollectionType_ { get; set; } public long UnlockFavorRank { get; set; } public string LocalizeCVGroup { get; set; } public List Nation_ { get; set; } public List Volume { get; set; } public List Delay { get; set; } public List Path { get; set; } public CharacterVoiceExcelT() { this.CharacterVoiceUniqueId = 0; this.CharacterVoiceGroupId = 0; this.VoiceHash = 0; this.OnlyOne = false; this.Priority = 0; this.DisplayOrder = 0; this.CollectionVisible = false; this.CVCollectionType_ = SCHALE.Common.FlatData.CVCollectionType.CVNormal; this.UnlockFavorRank = 0; this.LocalizeCVGroup = null; this.Nation_ = null; this.Volume = null; this.Delay = null; this.Path = null; } } static public class CharacterVoiceExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*CharacterVoiceUniqueId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*CharacterVoiceGroupId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*VoiceHash*/, 4 /*uint*/, 4, false) && verifier.VerifyField(tablePos, 10 /*OnlyOne*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 12 /*Priority*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 14 /*DisplayOrder*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 16 /*CollectionVisible*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 18 /*CVCollectionType_*/, 4 /*SCHALE.Common.FlatData.CVCollectionType*/, 4, false) && verifier.VerifyField(tablePos, 20 /*UnlockFavorRank*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 22 /*LocalizeCVGroup*/, false) && verifier.VerifyVectorOfData(tablePos, 24 /*Nation_*/, 4 /*SCHALE.Common.FlatData.Nation*/, false) && verifier.VerifyVectorOfData(tablePos, 26 /*Volume*/, 4 /*float*/, false) && verifier.VerifyVectorOfData(tablePos, 28 /*Delay*/, 4 /*float*/, false) && verifier.VerifyVectorOfStrings(tablePos, 30 /*Path*/, false) && verifier.VerifyTableEnd(tablePos); } } }