// // 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 MiniGameDreamScheduleResultExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static MiniGameDreamScheduleResultExcel GetRootAsMiniGameDreamScheduleResultExcel(ByteBuffer _bb) { return GetRootAsMiniGameDreamScheduleResultExcel(_bb, new MiniGameDreamScheduleResultExcel()); } public static MiniGameDreamScheduleResultExcel GetRootAsMiniGameDreamScheduleResultExcel(ByteBuffer _bb, MiniGameDreamScheduleResultExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public MiniGameDreamScheduleResultExcel __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 EventContentId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.DreamMakerResult DreamMakerResult_ { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.DreamMakerResult)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.DreamMakerResult.None_; } } public long DreamMakerScheduleGroup { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public int Prob { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public SCHALE.Common.FlatData.DreamMakerParameterType RewardParameter(int j) { int o = __p.__offset(14); return o != 0 ? (SCHALE.Common.FlatData.DreamMakerParameterType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.DreamMakerParameterType)0; } public int RewardParameterLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetRewardParameterBytes() { return __p.__vector_as_span(14, 4); } #else public ArraySegment? GetRewardParameterBytes() { return __p.__vector_as_arraysegment(14); } #endif public SCHALE.Common.FlatData.DreamMakerParameterType[] GetRewardParameterArray() { int o = __p.__offset(14); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.DreamMakerParameterType[] a = new SCHALE.Common.FlatData.DreamMakerParameterType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.DreamMakerParameterType)__p.bb.GetInt(p + i * 4); } return a; } public SCHALE.Common.FlatData.DreamMakerParamOperationType RewardParameterOperationType(int j) { int o = __p.__offset(16); return o != 0 ? (SCHALE.Common.FlatData.DreamMakerParamOperationType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.DreamMakerParamOperationType)0; } public int RewardParameterOperationTypeLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetRewardParameterOperationTypeBytes() { return __p.__vector_as_span(16, 4); } #else public ArraySegment? GetRewardParameterOperationTypeBytes() { return __p.__vector_as_arraysegment(16); } #endif public SCHALE.Common.FlatData.DreamMakerParamOperationType[] GetRewardParameterOperationTypeArray() { int o = __p.__offset(16); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.DreamMakerParamOperationType[] a = new SCHALE.Common.FlatData.DreamMakerParamOperationType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.DreamMakerParamOperationType)__p.bb.GetInt(p + i * 4); } return a; } public long RewardParameterAmount(int j) { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int RewardParameterAmountLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetRewardParameterAmountBytes() { return __p.__vector_as_span(18, 8); } #else public ArraySegment? GetRewardParameterAmountBytes() { return __p.__vector_as_arraysegment(18); } #endif public long[] GetRewardParameterAmountArray() { return __p.__vector_as_array(18); } public SCHALE.Common.FlatData.ParcelType RewardParcelType { get { int o = __p.__offset(20); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ParcelType.None_; } } public long RewardParcelId { get { int o = __p.__offset(22); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long RewardParcelAmount { get { int o = __p.__offset(24); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public static Offset CreateMiniGameDreamScheduleResultExcel(FlatBufferBuilder builder, long Id = 0, long EventContentId = 0, SCHALE.Common.FlatData.DreamMakerResult DreamMakerResult_ = SCHALE.Common.FlatData.DreamMakerResult.None_, long DreamMakerScheduleGroup = 0, int Prob = 0, VectorOffset RewardParameterOffset = default(VectorOffset), VectorOffset RewardParameterOperationTypeOffset = default(VectorOffset), VectorOffset RewardParameterAmountOffset = default(VectorOffset), SCHALE.Common.FlatData.ParcelType RewardParcelType = SCHALE.Common.FlatData.ParcelType.None_, long RewardParcelId = 0, long RewardParcelAmount = 0) { builder.StartTable(11); MiniGameDreamScheduleResultExcel.AddRewardParcelAmount(builder, RewardParcelAmount); MiniGameDreamScheduleResultExcel.AddRewardParcelId(builder, RewardParcelId); MiniGameDreamScheduleResultExcel.AddDreamMakerScheduleGroup(builder, DreamMakerScheduleGroup); MiniGameDreamScheduleResultExcel.AddEventContentId(builder, EventContentId); MiniGameDreamScheduleResultExcel.AddId(builder, Id); MiniGameDreamScheduleResultExcel.AddRewardParcelType(builder, RewardParcelType); MiniGameDreamScheduleResultExcel.AddRewardParameterAmount(builder, RewardParameterAmountOffset); MiniGameDreamScheduleResultExcel.AddRewardParameterOperationType(builder, RewardParameterOperationTypeOffset); MiniGameDreamScheduleResultExcel.AddRewardParameter(builder, RewardParameterOffset); MiniGameDreamScheduleResultExcel.AddProb(builder, Prob); MiniGameDreamScheduleResultExcel.AddDreamMakerResult_(builder, DreamMakerResult_); return MiniGameDreamScheduleResultExcel.EndMiniGameDreamScheduleResultExcel(builder); } public static void StartMiniGameDreamScheduleResultExcel(FlatBufferBuilder builder) { builder.StartTable(11); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(1, eventContentId, 0); } public static void AddDreamMakerResult_(FlatBufferBuilder builder, SCHALE.Common.FlatData.DreamMakerResult dreamMakerResult_) { builder.AddInt(2, (int)dreamMakerResult_, 0); } public static void AddDreamMakerScheduleGroup(FlatBufferBuilder builder, long dreamMakerScheduleGroup) { builder.AddLong(3, dreamMakerScheduleGroup, 0); } public static void AddProb(FlatBufferBuilder builder, int prob) { builder.AddInt(4, prob, 0); } public static void AddRewardParameter(FlatBufferBuilder builder, VectorOffset rewardParameterOffset) { builder.AddOffset(5, rewardParameterOffset.Value, 0); } public static VectorOffset CreateRewardParameterVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.DreamMakerParameterType[] 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 CreateRewardParameterVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.DreamMakerParameterType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParameterVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParameterVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartRewardParameterVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddRewardParameterOperationType(FlatBufferBuilder builder, VectorOffset rewardParameterOperationTypeOffset) { builder.AddOffset(6, rewardParameterOperationTypeOffset.Value, 0); } public static VectorOffset CreateRewardParameterOperationTypeVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.DreamMakerParamOperationType[] 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 CreateRewardParameterOperationTypeVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.DreamMakerParamOperationType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParameterOperationTypeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParameterOperationTypeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartRewardParameterOperationTypeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddRewardParameterAmount(FlatBufferBuilder builder, VectorOffset rewardParameterAmountOffset) { builder.AddOffset(7, rewardParameterAmountOffset.Value, 0); } public static VectorOffset CreateRewardParameterAmountVector(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 CreateRewardParameterAmountVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParameterAmountVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateRewardParameterAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartRewardParameterAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddRewardParcelType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType rewardParcelType) { builder.AddInt(8, (int)rewardParcelType, 0); } public static void AddRewardParcelId(FlatBufferBuilder builder, long rewardParcelId) { builder.AddLong(9, rewardParcelId, 0); } public static void AddRewardParcelAmount(FlatBufferBuilder builder, long rewardParcelAmount) { builder.AddLong(10, rewardParcelAmount, 0); } public static Offset EndMiniGameDreamScheduleResultExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public MiniGameDreamScheduleResultExcelT UnPack() { var _o = new MiniGameDreamScheduleResultExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(MiniGameDreamScheduleResultExcelT _o) { byte[] key = TableEncryptionService.CreateKey("MiniGameDreamScheduleResult"); _o.Id = TableEncryptionService.Convert(this.Id, key); _o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key); _o.DreamMakerResult_ = TableEncryptionService.Convert(this.DreamMakerResult_, key); _o.DreamMakerScheduleGroup = TableEncryptionService.Convert(this.DreamMakerScheduleGroup, key); _o.Prob = TableEncryptionService.Convert(this.Prob, key); _o.RewardParameter = new List(); for (var _j = 0; _j < this.RewardParameterLength; ++_j) {_o.RewardParameter.Add(TableEncryptionService.Convert(this.RewardParameter(_j), key));} _o.RewardParameterOperationType = new List(); for (var _j = 0; _j < this.RewardParameterOperationTypeLength; ++_j) {_o.RewardParameterOperationType.Add(TableEncryptionService.Convert(this.RewardParameterOperationType(_j), key));} _o.RewardParameterAmount = new List(); for (var _j = 0; _j < this.RewardParameterAmountLength; ++_j) {_o.RewardParameterAmount.Add(TableEncryptionService.Convert(this.RewardParameterAmount(_j), key));} _o.RewardParcelType = TableEncryptionService.Convert(this.RewardParcelType, key); _o.RewardParcelId = TableEncryptionService.Convert(this.RewardParcelId, key); _o.RewardParcelAmount = TableEncryptionService.Convert(this.RewardParcelAmount, key); } public static Offset Pack(FlatBufferBuilder builder, MiniGameDreamScheduleResultExcelT _o) { if (_o == null) return default(Offset); var _RewardParameter = default(VectorOffset); if (_o.RewardParameter != null) { var __RewardParameter = _o.RewardParameter.ToArray(); _RewardParameter = CreateRewardParameterVector(builder, __RewardParameter); } var _RewardParameterOperationType = default(VectorOffset); if (_o.RewardParameterOperationType != null) { var __RewardParameterOperationType = _o.RewardParameterOperationType.ToArray(); _RewardParameterOperationType = CreateRewardParameterOperationTypeVector(builder, __RewardParameterOperationType); } var _RewardParameterAmount = default(VectorOffset); if (_o.RewardParameterAmount != null) { var __RewardParameterAmount = _o.RewardParameterAmount.ToArray(); _RewardParameterAmount = CreateRewardParameterAmountVector(builder, __RewardParameterAmount); } return CreateMiniGameDreamScheduleResultExcel( builder, _o.Id, _o.EventContentId, _o.DreamMakerResult_, _o.DreamMakerScheduleGroup, _o.Prob, _RewardParameter, _RewardParameterOperationType, _RewardParameterAmount, _o.RewardParcelType, _o.RewardParcelId, _o.RewardParcelAmount); } } public class MiniGameDreamScheduleResultExcelT { public long Id { get; set; } public long EventContentId { get; set; } public SCHALE.Common.FlatData.DreamMakerResult DreamMakerResult_ { get; set; } public long DreamMakerScheduleGroup { get; set; } public int Prob { get; set; } public List RewardParameter { get; set; } public List RewardParameterOperationType { get; set; } public List RewardParameterAmount { get; set; } public SCHALE.Common.FlatData.ParcelType RewardParcelType { get; set; } public long RewardParcelId { get; set; } public long RewardParcelAmount { get; set; } public MiniGameDreamScheduleResultExcelT() { this.Id = 0; this.EventContentId = 0; this.DreamMakerResult_ = SCHALE.Common.FlatData.DreamMakerResult.None_; this.DreamMakerScheduleGroup = 0; this.Prob = 0; this.RewardParameter = null; this.RewardParameterOperationType = null; this.RewardParameterAmount = null; this.RewardParcelType = SCHALE.Common.FlatData.ParcelType.None_; this.RewardParcelId = 0; this.RewardParcelAmount = 0; } } static public class MiniGameDreamScheduleResultExcelVerify { 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 /*EventContentId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*DreamMakerResult_*/, 4 /*SCHALE.Common.FlatData.DreamMakerResult*/, 4, false) && verifier.VerifyField(tablePos, 10 /*DreamMakerScheduleGroup*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 12 /*Prob*/, 4 /*int*/, 4, false) && verifier.VerifyVectorOfData(tablePos, 14 /*RewardParameter*/, 4 /*SCHALE.Common.FlatData.DreamMakerParameterType*/, false) && verifier.VerifyVectorOfData(tablePos, 16 /*RewardParameterOperationType*/, 4 /*SCHALE.Common.FlatData.DreamMakerParamOperationType*/, false) && verifier.VerifyVectorOfData(tablePos, 18 /*RewardParameterAmount*/, 8 /*long*/, false) && verifier.VerifyField(tablePos, 20 /*RewardParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false) && verifier.VerifyField(tablePos, 22 /*RewardParcelId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 24 /*RewardParcelAmount*/, 8 /*long*/, 8, false) && verifier.VerifyTableEnd(tablePos); } } }