// // 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 ArenaSeasonCloseRewardExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ArenaSeasonCloseRewardExcel GetRootAsArenaSeasonCloseRewardExcel(ByteBuffer _bb) { return GetRootAsArenaSeasonCloseRewardExcel(_bb, new ArenaSeasonCloseRewardExcel()); } public static ArenaSeasonCloseRewardExcel GetRootAsArenaSeasonCloseRewardExcel(ByteBuffer _bb, ArenaSeasonCloseRewardExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ArenaSeasonCloseRewardExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long SeasonId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long RankStart { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long RankEnd { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.ParcelType RewardParcelType(int j) { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.ParcelType)0; } public int RewardParcelTypeLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetRewardParcelTypeBytes() { return __p.__vector_as_span(10, 4); } #else public ArraySegment? GetRewardParcelTypeBytes() { return __p.__vector_as_arraysegment(10); } #endif public SCHALE.Common.FlatData.ParcelType[] GetRewardParcelTypeArray() { int o = __p.__offset(10); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.ParcelType[] a = new SCHALE.Common.FlatData.ParcelType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(p + i * 4); } return a; } public long RewardParcelUniqueId(int j) { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int RewardParcelUniqueIdLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetRewardParcelUniqueIdBytes() { return __p.__vector_as_span(12, 8); } #else public ArraySegment? GetRewardParcelUniqueIdBytes() { return __p.__vector_as_arraysegment(12); } #endif public long[] GetRewardParcelUniqueIdArray() { return __p.__vector_as_array(12); } public string RewardParcelUniqueName(int j) { int o = __p.__offset(14); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } public int RewardParcelUniqueNameLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } } public long RewardParcelAmount(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int RewardParcelAmountLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetRewardParcelAmountBytes() { return __p.__vector_as_span(16, 8); } #else public ArraySegment? GetRewardParcelAmountBytes() { return __p.__vector_as_arraysegment(16); } #endif public long[] GetRewardParcelAmountArray() { return __p.__vector_as_array(16); } public static Offset CreateArenaSeasonCloseRewardExcel(FlatBufferBuilder builder, long SeasonId = 0, long RankStart = 0, long RankEnd = 0, VectorOffset RewardParcelTypeOffset = default(VectorOffset), VectorOffset RewardParcelUniqueIdOffset = default(VectorOffset), VectorOffset RewardParcelUniqueNameOffset = default(VectorOffset), VectorOffset RewardParcelAmountOffset = default(VectorOffset)) { builder.StartTable(7); ArenaSeasonCloseRewardExcel.AddRankEnd(builder, RankEnd); ArenaSeasonCloseRewardExcel.AddRankStart(builder, RankStart); ArenaSeasonCloseRewardExcel.AddSeasonId(builder, SeasonId); ArenaSeasonCloseRewardExcel.AddRewardParcelAmount(builder, RewardParcelAmountOffset); ArenaSeasonCloseRewardExcel.AddRewardParcelUniqueName(builder, RewardParcelUniqueNameOffset); ArenaSeasonCloseRewardExcel.AddRewardParcelUniqueId(builder, RewardParcelUniqueIdOffset); ArenaSeasonCloseRewardExcel.AddRewardParcelType(builder, RewardParcelTypeOffset); return ArenaSeasonCloseRewardExcel.EndArenaSeasonCloseRewardExcel(builder); } public static void StartArenaSeasonCloseRewardExcel(FlatBufferBuilder builder) { builder.StartTable(7); } public static void AddSeasonId(FlatBufferBuilder builder, long seasonId) { builder.AddLong(0, seasonId, 0); } public static void AddRankStart(FlatBufferBuilder builder, long rankStart) { builder.AddLong(1, rankStart, 0); } public static void AddRankEnd(FlatBufferBuilder builder, long rankEnd) { builder.AddLong(2, rankEnd, 0); } public static void AddRewardParcelType(FlatBufferBuilder builder, VectorOffset rewardParcelTypeOffset) { builder.AddOffset(3, rewardParcelTypeOffset.Value, 0); } public static VectorOffset CreateRewardParcelTypeVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] 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 CreateRewardParcelTypeVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParcelTypeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParcelTypeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartRewardParcelTypeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddRewardParcelUniqueId(FlatBufferBuilder builder, VectorOffset rewardParcelUniqueIdOffset) { builder.AddOffset(4, rewardParcelUniqueIdOffset.Value, 0); } public static VectorOffset CreateRewardParcelUniqueIdVector(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 CreateRewardParcelUniqueIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParcelUniqueIdVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParcelUniqueIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartRewardParcelUniqueIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddRewardParcelUniqueName(FlatBufferBuilder builder, VectorOffset rewardParcelUniqueNameOffset) { builder.AddOffset(5, rewardParcelUniqueNameOffset.Value, 0); } public static VectorOffset CreateRewardParcelUniqueNameVector(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 CreateRewardParcelUniqueNameVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParcelUniqueNameVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParcelUniqueNameVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartRewardParcelUniqueNameVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddRewardParcelAmount(FlatBufferBuilder builder, VectorOffset rewardParcelAmountOffset) { builder.AddOffset(6, rewardParcelAmountOffset.Value, 0); } public static VectorOffset CreateRewardParcelAmountVector(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 CreateRewardParcelAmountVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParcelAmountVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParcelAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartRewardParcelAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static Offset EndArenaSeasonCloseRewardExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class ArenaSeasonCloseRewardExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*SeasonId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*RankStart*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*RankEnd*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 10 /*RewardParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false) && verifier.VerifyVectorOfData(tablePos, 12 /*RewardParcelUniqueId*/, 8 /*long*/, false) && verifier.VerifyVectorOfStrings(tablePos, 14 /*RewardParcelUniqueName*/, false) && verifier.VerifyVectorOfData(tablePos, 16 /*RewardParcelAmount*/, 8 /*long*/, false) && verifier.VerifyTableEnd(tablePos); } } }