// // 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 MiniGameTBGThemaRewardExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static MiniGameTBGThemaRewardExcel GetRootAsMiniGameTBGThemaRewardExcel(ByteBuffer _bb) { return GetRootAsMiniGameTBGThemaRewardExcel(_bb, new MiniGameTBGThemaRewardExcel()); } public static MiniGameTBGThemaRewardExcel GetRootAsMiniGameTBGThemaRewardExcel(ByteBuffer _bb, MiniGameTBGThemaRewardExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public MiniGameTBGThemaRewardExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long EventContentId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public int ThemaRound { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int ThemaUniqueId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public bool IsLoop { get { int o = __p.__offset(10); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public SCHALE.Common.FlatData.MiniGameTBGThemaRewardType MiniGameTBGThemaRewardType_ { get { int o = __p.__offset(12); return o != 0 ? (SCHALE.Common.FlatData.MiniGameTBGThemaRewardType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.MiniGameTBGThemaRewardType.TreasureReward; } } public SCHALE.Common.FlatData.ParcelType RewardParcelType(int j) { int o = __p.__offset(14); 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(14); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetRewardParcelTypeBytes() { return __p.__vector_as_span(14, 4); } #else public ArraySegment? GetRewardParcelTypeBytes() { return __p.__vector_as_arraysegment(14); } #endif public SCHALE.Common.FlatData.ParcelType[] GetRewardParcelTypeArray() { int o = __p.__offset(14); 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 RewardParcelId(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int RewardParcelIdLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetRewardParcelIdBytes() { return __p.__vector_as_span(16, 8); } #else public ArraySegment? GetRewardParcelIdBytes() { return __p.__vector_as_arraysegment(16); } #endif public long[] GetRewardParcelIdArray() { return __p.__vector_as_array(16); } public int RewardParcelAmount(int j) { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; } public int RewardParcelAmountLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetRewardParcelAmountBytes() { return __p.__vector_as_span(18, 4); } #else public ArraySegment? GetRewardParcelAmountBytes() { return __p.__vector_as_arraysegment(18); } #endif public int[] GetRewardParcelAmountArray() { return __p.__vector_as_array(18); } public static Offset CreateMiniGameTBGThemaRewardExcel(FlatBufferBuilder builder, long EventContentId = 0, int ThemaRound = 0, int ThemaUniqueId = 0, bool IsLoop = false, SCHALE.Common.FlatData.MiniGameTBGThemaRewardType MiniGameTBGThemaRewardType_ = SCHALE.Common.FlatData.MiniGameTBGThemaRewardType.TreasureReward, VectorOffset RewardParcelTypeOffset = default(VectorOffset), VectorOffset RewardParcelIdOffset = default(VectorOffset), VectorOffset RewardParcelAmountOffset = default(VectorOffset)) { builder.StartTable(8); MiniGameTBGThemaRewardExcel.AddEventContentId(builder, EventContentId); MiniGameTBGThemaRewardExcel.AddRewardParcelAmount(builder, RewardParcelAmountOffset); MiniGameTBGThemaRewardExcel.AddRewardParcelId(builder, RewardParcelIdOffset); MiniGameTBGThemaRewardExcel.AddRewardParcelType(builder, RewardParcelTypeOffset); MiniGameTBGThemaRewardExcel.AddMiniGameTBGThemaRewardType_(builder, MiniGameTBGThemaRewardType_); MiniGameTBGThemaRewardExcel.AddThemaUniqueId(builder, ThemaUniqueId); MiniGameTBGThemaRewardExcel.AddThemaRound(builder, ThemaRound); MiniGameTBGThemaRewardExcel.AddIsLoop(builder, IsLoop); return MiniGameTBGThemaRewardExcel.EndMiniGameTBGThemaRewardExcel(builder); } public static void StartMiniGameTBGThemaRewardExcel(FlatBufferBuilder builder) { builder.StartTable(8); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); } public static void AddThemaRound(FlatBufferBuilder builder, int themaRound) { builder.AddInt(1, themaRound, 0); } public static void AddThemaUniqueId(FlatBufferBuilder builder, int themaUniqueId) { builder.AddInt(2, themaUniqueId, 0); } public static void AddIsLoop(FlatBufferBuilder builder, bool isLoop) { builder.AddBool(3, isLoop, false); } public static void AddMiniGameTBGThemaRewardType_(FlatBufferBuilder builder, SCHALE.Common.FlatData.MiniGameTBGThemaRewardType miniGameTBGThemaRewardType_) { builder.AddInt(4, (int)miniGameTBGThemaRewardType_, 0); } public static void AddRewardParcelType(FlatBufferBuilder builder, VectorOffset rewardParcelTypeOffset) { builder.AddOffset(5, 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 AddRewardParcelId(FlatBufferBuilder builder, VectorOffset rewardParcelIdOffset) { builder.AddOffset(6, rewardParcelIdOffset.Value, 0); } public static VectorOffset CreateRewardParcelIdVector(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 CreateRewardParcelIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParcelIdVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParcelIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartRewardParcelIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddRewardParcelAmount(FlatBufferBuilder builder, VectorOffset rewardParcelAmountOffset) { builder.AddOffset(7, rewardParcelAmountOffset.Value, 0); } public static VectorOffset CreateRewardParcelAmountVector(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt(data[i]); return builder.EndVector(); } public static VectorOffset CreateRewardParcelAmountVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParcelAmountVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); 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(4, numElems, 4); } public static Offset EndMiniGameTBGThemaRewardExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public MiniGameTBGThemaRewardExcelT UnPack() { var _o = new MiniGameTBGThemaRewardExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(MiniGameTBGThemaRewardExcelT _o) { byte[] key = TableEncryptionService.CreateKey("MiniGameTBGThemaReward"); _o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key); _o.ThemaRound = TableEncryptionService.Convert(this.ThemaRound, key); _o.ThemaUniqueId = TableEncryptionService.Convert(this.ThemaUniqueId, key); _o.IsLoop = TableEncryptionService.Convert(this.IsLoop, key); _o.MiniGameTBGThemaRewardType_ = TableEncryptionService.Convert(this.MiniGameTBGThemaRewardType_, key); _o.RewardParcelType = new List(); for (var _j = 0; _j < this.RewardParcelTypeLength; ++_j) {_o.RewardParcelType.Add(TableEncryptionService.Convert(this.RewardParcelType(_j), key));} _o.RewardParcelId = new List(); for (var _j = 0; _j < this.RewardParcelIdLength; ++_j) {_o.RewardParcelId.Add(TableEncryptionService.Convert(this.RewardParcelId(_j), key));} _o.RewardParcelAmount = new List(); for (var _j = 0; _j < this.RewardParcelAmountLength; ++_j) {_o.RewardParcelAmount.Add(TableEncryptionService.Convert(this.RewardParcelAmount(_j), key));} } public static Offset Pack(FlatBufferBuilder builder, MiniGameTBGThemaRewardExcelT _o) { if (_o == null) return default(Offset); var _RewardParcelType = default(VectorOffset); if (_o.RewardParcelType != null) { var __RewardParcelType = _o.RewardParcelType.ToArray(); _RewardParcelType = CreateRewardParcelTypeVector(builder, __RewardParcelType); } var _RewardParcelId = default(VectorOffset); if (_o.RewardParcelId != null) { var __RewardParcelId = _o.RewardParcelId.ToArray(); _RewardParcelId = CreateRewardParcelIdVector(builder, __RewardParcelId); } var _RewardParcelAmount = default(VectorOffset); if (_o.RewardParcelAmount != null) { var __RewardParcelAmount = _o.RewardParcelAmount.ToArray(); _RewardParcelAmount = CreateRewardParcelAmountVector(builder, __RewardParcelAmount); } return CreateMiniGameTBGThemaRewardExcel( builder, _o.EventContentId, _o.ThemaRound, _o.ThemaUniqueId, _o.IsLoop, _o.MiniGameTBGThemaRewardType_, _RewardParcelType, _RewardParcelId, _RewardParcelAmount); } } public class MiniGameTBGThemaRewardExcelT { public long EventContentId { get; set; } public int ThemaRound { get; set; } public int ThemaUniqueId { get; set; } public bool IsLoop { get; set; } public SCHALE.Common.FlatData.MiniGameTBGThemaRewardType MiniGameTBGThemaRewardType_ { get; set; } public List RewardParcelType { get; set; } public List RewardParcelId { get; set; } public List RewardParcelAmount { get; set; } public MiniGameTBGThemaRewardExcelT() { this.EventContentId = 0; this.ThemaRound = 0; this.ThemaUniqueId = 0; this.IsLoop = false; this.MiniGameTBGThemaRewardType_ = SCHALE.Common.FlatData.MiniGameTBGThemaRewardType.TreasureReward; this.RewardParcelType = null; this.RewardParcelId = null; this.RewardParcelAmount = null; } } static public class MiniGameTBGThemaRewardExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*EventContentId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*ThemaRound*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 8 /*ThemaUniqueId*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 10 /*IsLoop*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 12 /*MiniGameTBGThemaRewardType_*/, 4 /*SCHALE.Common.FlatData.MiniGameTBGThemaRewardType*/, 4, false) && verifier.VerifyVectorOfData(tablePos, 14 /*RewardParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false) && verifier.VerifyVectorOfData(tablePos, 16 /*RewardParcelId*/, 8 /*long*/, false) && verifier.VerifyVectorOfData(tablePos, 18 /*RewardParcelAmount*/, 4 /*int*/, false) && verifier.VerifyTableEnd(tablePos); } } }