// // 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 MiniGameDreamEndingExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static MiniGameDreamEndingExcel GetRootAsMiniGameDreamEndingExcel(ByteBuffer _bb) { return GetRootAsMiniGameDreamEndingExcel(_bb, new MiniGameDreamEndingExcel()); } public static MiniGameDreamEndingExcel GetRootAsMiniGameDreamEndingExcel(ByteBuffer _bb, MiniGameDreamEndingExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public MiniGameDreamEndingExcel __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 EndingId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.DreamMakerEndingType DreamMakerEndingType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.DreamMakerEndingType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.DreamMakerEndingType.None; } } public int Order { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public long ScenarioGroupId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.DreamMakerEndingCondition EndingCondition(int j) { int o = __p.__offset(14); return o != 0 ? (SCHALE.Common.FlatData.DreamMakerEndingCondition)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.DreamMakerEndingCondition)0; } public int EndingConditionLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetEndingConditionBytes() { return __p.__vector_as_span(14, 4); } #else public ArraySegment? GetEndingConditionBytes() { return __p.__vector_as_arraysegment(14); } #endif public SCHALE.Common.FlatData.DreamMakerEndingCondition[] GetEndingConditionArray() { int o = __p.__offset(14); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.DreamMakerEndingCondition[] a = new SCHALE.Common.FlatData.DreamMakerEndingCondition[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.DreamMakerEndingCondition)__p.bb.GetInt(p + i * 4); } return a; } public long EndingConditionValue(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int EndingConditionValueLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetEndingConditionValueBytes() { return __p.__vector_as_span(16, 8); } #else public ArraySegment? GetEndingConditionValueBytes() { return __p.__vector_as_arraysegment(16); } #endif public long[] GetEndingConditionValueArray() { return __p.__vector_as_array(16); } public static Offset CreateMiniGameDreamEndingExcel(FlatBufferBuilder builder, long EventContentId = 0, long EndingId = 0, SCHALE.Common.FlatData.DreamMakerEndingType DreamMakerEndingType = SCHALE.Common.FlatData.DreamMakerEndingType.None, int Order = 0, long ScenarioGroupId = 0, VectorOffset EndingConditionOffset = default(VectorOffset), VectorOffset EndingConditionValueOffset = default(VectorOffset)) { builder.StartTable(7); MiniGameDreamEndingExcel.AddScenarioGroupId(builder, ScenarioGroupId); MiniGameDreamEndingExcel.AddEndingId(builder, EndingId); MiniGameDreamEndingExcel.AddEventContentId(builder, EventContentId); MiniGameDreamEndingExcel.AddEndingConditionValue(builder, EndingConditionValueOffset); MiniGameDreamEndingExcel.AddEndingCondition(builder, EndingConditionOffset); MiniGameDreamEndingExcel.AddOrder(builder, Order); MiniGameDreamEndingExcel.AddDreamMakerEndingType(builder, DreamMakerEndingType); return MiniGameDreamEndingExcel.EndMiniGameDreamEndingExcel(builder); } public static void StartMiniGameDreamEndingExcel(FlatBufferBuilder builder) { builder.StartTable(7); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); } public static void AddEndingId(FlatBufferBuilder builder, long endingId) { builder.AddLong(1, endingId, 0); } public static void AddDreamMakerEndingType(FlatBufferBuilder builder, SCHALE.Common.FlatData.DreamMakerEndingType dreamMakerEndingType) { builder.AddInt(2, (int)dreamMakerEndingType, 0); } public static void AddOrder(FlatBufferBuilder builder, int order) { builder.AddInt(3, order, 0); } public static void AddScenarioGroupId(FlatBufferBuilder builder, long scenarioGroupId) { builder.AddLong(4, scenarioGroupId, 0); } public static void AddEndingCondition(FlatBufferBuilder builder, VectorOffset endingConditionOffset) { builder.AddOffset(5, endingConditionOffset.Value, 0); } public static VectorOffset CreateEndingConditionVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.DreamMakerEndingCondition[] 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 CreateEndingConditionVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.DreamMakerEndingCondition[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateEndingConditionVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateEndingConditionVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartEndingConditionVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddEndingConditionValue(FlatBufferBuilder builder, VectorOffset endingConditionValueOffset) { builder.AddOffset(6, endingConditionValueOffset.Value, 0); } public static VectorOffset CreateEndingConditionValueVector(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 CreateEndingConditionValueVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateEndingConditionValueVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateEndingConditionValueVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartEndingConditionValueVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static Offset EndMiniGameDreamEndingExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public MiniGameDreamEndingExcelT UnPack() { var _o = new MiniGameDreamEndingExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(MiniGameDreamEndingExcelT _o) { byte[] key = TableEncryptionService.CreateKey("MiniGameDreamEnding"); _o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key); _o.EndingId = TableEncryptionService.Convert(this.EndingId, key); _o.DreamMakerEndingType = TableEncryptionService.Convert(this.DreamMakerEndingType, key); _o.Order = TableEncryptionService.Convert(this.Order, key); _o.ScenarioGroupId = TableEncryptionService.Convert(this.ScenarioGroupId, key); _o.EndingCondition = new List(); for (var _j = 0; _j < this.EndingConditionLength; ++_j) {_o.EndingCondition.Add(TableEncryptionService.Convert(this.EndingCondition(_j), key));} _o.EndingConditionValue = new List(); for (var _j = 0; _j < this.EndingConditionValueLength; ++_j) {_o.EndingConditionValue.Add(TableEncryptionService.Convert(this.EndingConditionValue(_j), key));} } public static Offset Pack(FlatBufferBuilder builder, MiniGameDreamEndingExcelT _o) { if (_o == null) return default(Offset); var _EndingCondition = default(VectorOffset); if (_o.EndingCondition != null) { var __EndingCondition = _o.EndingCondition.ToArray(); _EndingCondition = CreateEndingConditionVector(builder, __EndingCondition); } var _EndingConditionValue = default(VectorOffset); if (_o.EndingConditionValue != null) { var __EndingConditionValue = _o.EndingConditionValue.ToArray(); _EndingConditionValue = CreateEndingConditionValueVector(builder, __EndingConditionValue); } return CreateMiniGameDreamEndingExcel( builder, _o.EventContentId, _o.EndingId, _o.DreamMakerEndingType, _o.Order, _o.ScenarioGroupId, _EndingCondition, _EndingConditionValue); } } public class MiniGameDreamEndingExcelT { public long EventContentId { get; set; } public long EndingId { get; set; } public SCHALE.Common.FlatData.DreamMakerEndingType DreamMakerEndingType { get; set; } public int Order { get; set; } public long ScenarioGroupId { get; set; } public List EndingCondition { get; set; } public List EndingConditionValue { get; set; } public MiniGameDreamEndingExcelT() { this.EventContentId = 0; this.EndingId = 0; this.DreamMakerEndingType = SCHALE.Common.FlatData.DreamMakerEndingType.None; this.Order = 0; this.ScenarioGroupId = 0; this.EndingCondition = null; this.EndingConditionValue = null; } } static public class MiniGameDreamEndingExcelVerify { 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 /*EndingId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*DreamMakerEndingType*/, 4 /*SCHALE.Common.FlatData.DreamMakerEndingType*/, 4, false) && verifier.VerifyField(tablePos, 10 /*Order*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 12 /*ScenarioGroupId*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 14 /*EndingCondition*/, 4 /*SCHALE.Common.FlatData.DreamMakerEndingCondition*/, false) && verifier.VerifyVectorOfData(tablePos, 16 /*EndingConditionValue*/, 8 /*long*/, false) && verifier.VerifyTableEnd(tablePos); } } }