// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::Google.FlatBuffers; public struct CharacterGearExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static CharacterGearExcel GetRootAsCharacterGearExcel(ByteBuffer _bb) { return GetRootAsCharacterGearExcel(_bb, new CharacterGearExcel()); } public static CharacterGearExcel GetRootAsCharacterGearExcel(ByteBuffer _bb, CharacterGearExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public CharacterGearExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long CharacterId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.StatLevelUpType StatLevelUpType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.StatLevelUpType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.StatLevelUpType.Standard; } } public long Tier { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long NextTierEquipment { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long RecipeId { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long OpenFavorLevel { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long MaxLevel { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string LearnSkillSlot { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetLearnSkillSlotBytes() { return __p.__vector_as_span(20, 1); } #else public ArraySegment? GetLearnSkillSlotBytes() { return __p.__vector_as_arraysegment(20); } #endif public byte[] GetLearnSkillSlotArray() { return __p.__vector_as_array(20); } public SCHALE.Common.FlatData.EquipmentOptionType StatType(int j) { int o = __p.__offset(22); return o != 0 ? (SCHALE.Common.FlatData.EquipmentOptionType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.EquipmentOptionType)0; } public int StatTypeLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetStatTypeBytes() { return __p.__vector_as_span(22, 4); } #else public ArraySegment? GetStatTypeBytes() { return __p.__vector_as_arraysegment(22); } #endif public SCHALE.Common.FlatData.EquipmentOptionType[] GetStatTypeArray() { int o = __p.__offset(22); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.EquipmentOptionType[] a = new SCHALE.Common.FlatData.EquipmentOptionType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.EquipmentOptionType)__p.bb.GetInt(p + i * 4); } return a; } public long MinStatValue(int j) { int o = __p.__offset(24); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int MinStatValueLength { get { int o = __p.__offset(24); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetMinStatValueBytes() { return __p.__vector_as_span(24, 8); } #else public ArraySegment? GetMinStatValueBytes() { return __p.__vector_as_arraysegment(24); } #endif public long[] GetMinStatValueArray() { return __p.__vector_as_array(24); } public long MaxStatValue(int j) { int o = __p.__offset(26); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int MaxStatValueLength { get { int o = __p.__offset(26); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetMaxStatValueBytes() { return __p.__vector_as_span(26, 8); } #else public ArraySegment? GetMaxStatValueBytes() { return __p.__vector_as_arraysegment(26); } #endif public long[] GetMaxStatValueArray() { return __p.__vector_as_array(26); } public string Icon { get { int o = __p.__offset(28); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetIconBytes() { return __p.__vector_as_span(28, 1); } #else public ArraySegment? GetIconBytes() { return __p.__vector_as_arraysegment(28); } #endif public byte[] GetIconArray() { return __p.__vector_as_array(28); } public uint LocalizeEtcId { get { int o = __p.__offset(30); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public SCHALE.Common.FlatData.Tag Tags(int j) { int o = __p.__offset(32); return o != 0 ? (SCHALE.Common.FlatData.Tag)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.Tag)0; } public int TagsLength { get { int o = __p.__offset(32); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetTagsBytes() { return __p.__vector_as_span(32, 4); } #else public ArraySegment? GetTagsBytes() { return __p.__vector_as_arraysegment(32); } #endif public SCHALE.Common.FlatData.Tag[] GetTagsArray() { int o = __p.__offset(32); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.Tag[] a = new SCHALE.Common.FlatData.Tag[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.Tag)__p.bb.GetInt(p + i * 4); } return a; } public static Offset CreateCharacterGearExcel(FlatBufferBuilder builder, long Id = 0, long CharacterId = 0, SCHALE.Common.FlatData.StatLevelUpType StatLevelUpType = SCHALE.Common.FlatData.StatLevelUpType.Standard, long Tier = 0, long NextTierEquipment = 0, long RecipeId = 0, long OpenFavorLevel = 0, long MaxLevel = 0, StringOffset LearnSkillSlotOffset = default(StringOffset), VectorOffset StatTypeOffset = default(VectorOffset), VectorOffset MinStatValueOffset = default(VectorOffset), VectorOffset MaxStatValueOffset = default(VectorOffset), StringOffset IconOffset = default(StringOffset), uint LocalizeEtcId = 0, VectorOffset TagsOffset = default(VectorOffset)) { builder.StartTable(15); CharacterGearExcel.AddMaxLevel(builder, MaxLevel); CharacterGearExcel.AddOpenFavorLevel(builder, OpenFavorLevel); CharacterGearExcel.AddRecipeId(builder, RecipeId); CharacterGearExcel.AddNextTierEquipment(builder, NextTierEquipment); CharacterGearExcel.AddTier(builder, Tier); CharacterGearExcel.AddCharacterId(builder, CharacterId); CharacterGearExcel.AddId(builder, Id); CharacterGearExcel.AddTags(builder, TagsOffset); CharacterGearExcel.AddLocalizeEtcId(builder, LocalizeEtcId); CharacterGearExcel.AddIcon(builder, IconOffset); CharacterGearExcel.AddMaxStatValue(builder, MaxStatValueOffset); CharacterGearExcel.AddMinStatValue(builder, MinStatValueOffset); CharacterGearExcel.AddStatType(builder, StatTypeOffset); CharacterGearExcel.AddLearnSkillSlot(builder, LearnSkillSlotOffset); CharacterGearExcel.AddStatLevelUpType(builder, StatLevelUpType); return CharacterGearExcel.EndCharacterGearExcel(builder); } public static void StartCharacterGearExcel(FlatBufferBuilder builder) { builder.StartTable(15); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddCharacterId(FlatBufferBuilder builder, long characterId) { builder.AddLong(1, characterId, 0); } public static void AddStatLevelUpType(FlatBufferBuilder builder, SCHALE.Common.FlatData.StatLevelUpType statLevelUpType) { builder.AddInt(2, (int)statLevelUpType, 0); } public static void AddTier(FlatBufferBuilder builder, long tier) { builder.AddLong(3, tier, 0); } public static void AddNextTierEquipment(FlatBufferBuilder builder, long nextTierEquipment) { builder.AddLong(4, nextTierEquipment, 0); } public static void AddRecipeId(FlatBufferBuilder builder, long recipeId) { builder.AddLong(5, recipeId, 0); } public static void AddOpenFavorLevel(FlatBufferBuilder builder, long openFavorLevel) { builder.AddLong(6, openFavorLevel, 0); } public static void AddMaxLevel(FlatBufferBuilder builder, long maxLevel) { builder.AddLong(7, maxLevel, 0); } public static void AddLearnSkillSlot(FlatBufferBuilder builder, StringOffset learnSkillSlotOffset) { builder.AddOffset(8, learnSkillSlotOffset.Value, 0); } public static void AddStatType(FlatBufferBuilder builder, VectorOffset statTypeOffset) { builder.AddOffset(9, statTypeOffset.Value, 0); } public static VectorOffset CreateStatTypeVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.EquipmentOptionType[] 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 CreateStatTypeVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.EquipmentOptionType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateStatTypeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateStatTypeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartStatTypeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddMinStatValue(FlatBufferBuilder builder, VectorOffset minStatValueOffset) { builder.AddOffset(10, minStatValueOffset.Value, 0); } public static VectorOffset CreateMinStatValueVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } public static VectorOffset CreateMinStatValueVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateMinStatValueVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateMinStatValueVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartMinStatValueVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddMaxStatValue(FlatBufferBuilder builder, VectorOffset maxStatValueOffset) { builder.AddOffset(11, maxStatValueOffset.Value, 0); } public static VectorOffset CreateMaxStatValueVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } public static VectorOffset CreateMaxStatValueVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateMaxStatValueVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateMaxStatValueVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartMaxStatValueVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddIcon(FlatBufferBuilder builder, StringOffset iconOffset) { builder.AddOffset(12, iconOffset.Value, 0); } public static void AddLocalizeEtcId(FlatBufferBuilder builder, uint localizeEtcId) { builder.AddUint(13, localizeEtcId, 0); } public static void AddTags(FlatBufferBuilder builder, VectorOffset tagsOffset) { builder.AddOffset(14, tagsOffset.Value, 0); } public static VectorOffset CreateTagsVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.Tag[] 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 CreateTagsVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.Tag[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateTagsVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateTagsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartTagsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static Offset EndCharacterGearExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class CharacterGearExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*CharacterId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*StatLevelUpType*/, 4 /*SCHALE.Common.FlatData.StatLevelUpType*/, 4, false) && verifier.VerifyField(tablePos, 10 /*Tier*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 12 /*NextTierEquipment*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 14 /*RecipeId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 16 /*OpenFavorLevel*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 18 /*MaxLevel*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 20 /*LearnSkillSlot*/, false) && verifier.VerifyVectorOfData(tablePos, 22 /*StatType*/, 4 /*SCHALE.Common.FlatData.EquipmentOptionType*/, false) && verifier.VerifyVectorOfData(tablePos, 24 /*MinStatValue*/, 8 /*long*/, false) && verifier.VerifyVectorOfData(tablePos, 26 /*MaxStatValue*/, 8 /*long*/, false) && verifier.VerifyString(tablePos, 28 /*Icon*/, false) && verifier.VerifyField(tablePos, 30 /*LocalizeEtcId*/, 4 /*uint*/, 4, false) && verifier.VerifyVectorOfData(tablePos, 32 /*Tags*/, 4 /*SCHALE.Common.FlatData.Tag*/, false) && verifier.VerifyTableEnd(tablePos); } } }