// // 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 MinigameTBGDiceExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static MinigameTBGDiceExcel GetRootAsMinigameTBGDiceExcel(ByteBuffer _bb) { return GetRootAsMinigameTBGDiceExcel(_bb, new MinigameTBGDiceExcel()); } public static MinigameTBGDiceExcel GetRootAsMinigameTBGDiceExcel(ByteBuffer _bb, MinigameTBGDiceExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public MinigameTBGDiceExcel __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 long UniqueId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public int DiceGroup { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int DiceResult { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)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.TBGProbModifyCondition ProbModifyCondition(int j) { int o = __p.__offset(14); return o != 0 ? (SCHALE.Common.FlatData.TBGProbModifyCondition)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.TBGProbModifyCondition)0; } public int ProbModifyConditionLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetProbModifyConditionBytes() { return __p.__vector_as_span(14, 4); } #else public ArraySegment? GetProbModifyConditionBytes() { return __p.__vector_as_arraysegment(14); } #endif public SCHALE.Common.FlatData.TBGProbModifyCondition[] GetProbModifyConditionArray() { int o = __p.__offset(14); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.TBGProbModifyCondition[] a = new SCHALE.Common.FlatData.TBGProbModifyCondition[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.TBGProbModifyCondition)__p.bb.GetInt(p + i * 4); } return a; } public int ProbModifyValue(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; } public int ProbModifyValueLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetProbModifyValueBytes() { return __p.__vector_as_span(16, 4); } #else public ArraySegment? GetProbModifyValueBytes() { return __p.__vector_as_arraysegment(16); } #endif public int[] GetProbModifyValueArray() { return __p.__vector_as_array(16); } public int ProbModifyLimit(int j) { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; } public int ProbModifyLimitLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetProbModifyLimitBytes() { return __p.__vector_as_span(18, 4); } #else public ArraySegment? GetProbModifyLimitBytes() { return __p.__vector_as_arraysegment(18); } #endif public int[] GetProbModifyLimitArray() { return __p.__vector_as_array(18); } public static Offset CreateMinigameTBGDiceExcel(FlatBufferBuilder builder, long EventContentId = 0, long UniqueId = 0, int DiceGroup = 0, int DiceResult = 0, int Prob = 0, VectorOffset ProbModifyConditionOffset = default(VectorOffset), VectorOffset ProbModifyValueOffset = default(VectorOffset), VectorOffset ProbModifyLimitOffset = default(VectorOffset)) { builder.StartTable(8); MinigameTBGDiceExcel.AddUniqueId(builder, UniqueId); MinigameTBGDiceExcel.AddEventContentId(builder, EventContentId); MinigameTBGDiceExcel.AddProbModifyLimit(builder, ProbModifyLimitOffset); MinigameTBGDiceExcel.AddProbModifyValue(builder, ProbModifyValueOffset); MinigameTBGDiceExcel.AddProbModifyCondition(builder, ProbModifyConditionOffset); MinigameTBGDiceExcel.AddProb(builder, Prob); MinigameTBGDiceExcel.AddDiceResult(builder, DiceResult); MinigameTBGDiceExcel.AddDiceGroup(builder, DiceGroup); return MinigameTBGDiceExcel.EndMinigameTBGDiceExcel(builder); } public static void StartMinigameTBGDiceExcel(FlatBufferBuilder builder) { builder.StartTable(8); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); } public static void AddUniqueId(FlatBufferBuilder builder, long uniqueId) { builder.AddLong(1, uniqueId, 0); } public static void AddDiceGroup(FlatBufferBuilder builder, int diceGroup) { builder.AddInt(2, diceGroup, 0); } public static void AddDiceResult(FlatBufferBuilder builder, int diceResult) { builder.AddInt(3, diceResult, 0); } public static void AddProb(FlatBufferBuilder builder, int prob) { builder.AddInt(4, prob, 0); } public static void AddProbModifyCondition(FlatBufferBuilder builder, VectorOffset probModifyConditionOffset) { builder.AddOffset(5, probModifyConditionOffset.Value, 0); } public static VectorOffset CreateProbModifyConditionVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.TBGProbModifyCondition[] 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 CreateProbModifyConditionVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.TBGProbModifyCondition[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateProbModifyConditionVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateProbModifyConditionVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartProbModifyConditionVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddProbModifyValue(FlatBufferBuilder builder, VectorOffset probModifyValueOffset) { builder.AddOffset(6, probModifyValueOffset.Value, 0); } public static VectorOffset CreateProbModifyValueVector(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 CreateProbModifyValueVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateProbModifyValueVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateProbModifyValueVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartProbModifyValueVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddProbModifyLimit(FlatBufferBuilder builder, VectorOffset probModifyLimitOffset) { builder.AddOffset(7, probModifyLimitOffset.Value, 0); } public static VectorOffset CreateProbModifyLimitVector(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 CreateProbModifyLimitVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateProbModifyLimitVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateProbModifyLimitVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartProbModifyLimitVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static Offset EndMinigameTBGDiceExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public MinigameTBGDiceExcelT UnPack() { var _o = new MinigameTBGDiceExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(MinigameTBGDiceExcelT _o) { byte[] key = TableEncryptionService.CreateKey("MinigameTBGDice"); _o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key); _o.UniqueId = TableEncryptionService.Convert(this.UniqueId, key); _o.DiceGroup = TableEncryptionService.Convert(this.DiceGroup, key); _o.DiceResult = TableEncryptionService.Convert(this.DiceResult, key); _o.Prob = TableEncryptionService.Convert(this.Prob, key); _o.ProbModifyCondition = new List(); for (var _j = 0; _j < this.ProbModifyConditionLength; ++_j) {_o.ProbModifyCondition.Add(TableEncryptionService.Convert(this.ProbModifyCondition(_j), key));} _o.ProbModifyValue = new List(); for (var _j = 0; _j < this.ProbModifyValueLength; ++_j) {_o.ProbModifyValue.Add(TableEncryptionService.Convert(this.ProbModifyValue(_j), key));} _o.ProbModifyLimit = new List(); for (var _j = 0; _j < this.ProbModifyLimitLength; ++_j) {_o.ProbModifyLimit.Add(TableEncryptionService.Convert(this.ProbModifyLimit(_j), key));} } public static Offset Pack(FlatBufferBuilder builder, MinigameTBGDiceExcelT _o) { if (_o == null) return default(Offset); var _ProbModifyCondition = default(VectorOffset); if (_o.ProbModifyCondition != null) { var __ProbModifyCondition = _o.ProbModifyCondition.ToArray(); _ProbModifyCondition = CreateProbModifyConditionVector(builder, __ProbModifyCondition); } var _ProbModifyValue = default(VectorOffset); if (_o.ProbModifyValue != null) { var __ProbModifyValue = _o.ProbModifyValue.ToArray(); _ProbModifyValue = CreateProbModifyValueVector(builder, __ProbModifyValue); } var _ProbModifyLimit = default(VectorOffset); if (_o.ProbModifyLimit != null) { var __ProbModifyLimit = _o.ProbModifyLimit.ToArray(); _ProbModifyLimit = CreateProbModifyLimitVector(builder, __ProbModifyLimit); } return CreateMinigameTBGDiceExcel( builder, _o.EventContentId, _o.UniqueId, _o.DiceGroup, _o.DiceResult, _o.Prob, _ProbModifyCondition, _ProbModifyValue, _ProbModifyLimit); } } public class MinigameTBGDiceExcelT { public long EventContentId { get; set; } public long UniqueId { get; set; } public int DiceGroup { get; set; } public int DiceResult { get; set; } public int Prob { get; set; } public List ProbModifyCondition { get; set; } public List ProbModifyValue { get; set; } public List ProbModifyLimit { get; set; } public MinigameTBGDiceExcelT() { this.EventContentId = 0; this.UniqueId = 0; this.DiceGroup = 0; this.DiceResult = 0; this.Prob = 0; this.ProbModifyCondition = null; this.ProbModifyValue = null; this.ProbModifyLimit = null; } } static public class MinigameTBGDiceExcelVerify { 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 /*UniqueId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*DiceGroup*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 10 /*DiceResult*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 12 /*Prob*/, 4 /*int*/, 4, false) && verifier.VerifyVectorOfData(tablePos, 14 /*ProbModifyCondition*/, 4 /*SCHALE.Common.FlatData.TBGProbModifyCondition*/, false) && verifier.VerifyVectorOfData(tablePos, 16 /*ProbModifyValue*/, 4 /*int*/, false) && verifier.VerifyVectorOfData(tablePos, 18 /*ProbModifyLimit*/, 4 /*int*/, false) && verifier.VerifyTableEnd(tablePos); } } }