// // 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 ConquestUnexpectedEventExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ConquestUnexpectedEventExcel GetRootAsConquestUnexpectedEventExcel(ByteBuffer _bb) { return GetRootAsConquestUnexpectedEventExcel(_bb, new ConquestUnexpectedEventExcel()); } public static ConquestUnexpectedEventExcel GetRootAsConquestUnexpectedEventExcel(ByteBuffer _bb, ConquestUnexpectedEventExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ConquestUnexpectedEventExcel __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 SCHALE.Common.FlatData.ParcelType UnexpectedEventConditionType { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ParcelType.None; } } public long UnexpectedEventConditionUniqueId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long UnexpectedEventConditionAmount { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public int UnexpectedEventOccurDailyLimitCount { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int UnitCountPerStep { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public string UnexpectedEventPrefab(int j) { int o = __p.__offset(16); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } public int UnexpectedEventPrefabLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } public long UnexpectedEventUnitId(int j) { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int UnexpectedEventUnitIdLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetUnexpectedEventUnitIdBytes() { return __p.__vector_as_span(18, 8); } #else public ArraySegment? GetUnexpectedEventUnitIdBytes() { return __p.__vector_as_arraysegment(18); } #endif public long[] GetUnexpectedEventUnitIdArray() { return __p.__vector_as_array(18); } public static Offset CreateConquestUnexpectedEventExcel(FlatBufferBuilder builder, long EventContentId = 0, SCHALE.Common.FlatData.ParcelType UnexpectedEventConditionType = SCHALE.Common.FlatData.ParcelType.None, long UnexpectedEventConditionUniqueId = 0, long UnexpectedEventConditionAmount = 0, int UnexpectedEventOccurDailyLimitCount = 0, int UnitCountPerStep = 0, VectorOffset UnexpectedEventPrefabOffset = default(VectorOffset), VectorOffset UnexpectedEventUnitIdOffset = default(VectorOffset)) { builder.StartTable(8); ConquestUnexpectedEventExcel.AddUnexpectedEventConditionAmount(builder, UnexpectedEventConditionAmount); ConquestUnexpectedEventExcel.AddUnexpectedEventConditionUniqueId(builder, UnexpectedEventConditionUniqueId); ConquestUnexpectedEventExcel.AddEventContentId(builder, EventContentId); ConquestUnexpectedEventExcel.AddUnexpectedEventUnitId(builder, UnexpectedEventUnitIdOffset); ConquestUnexpectedEventExcel.AddUnexpectedEventPrefab(builder, UnexpectedEventPrefabOffset); ConquestUnexpectedEventExcel.AddUnitCountPerStep(builder, UnitCountPerStep); ConquestUnexpectedEventExcel.AddUnexpectedEventOccurDailyLimitCount(builder, UnexpectedEventOccurDailyLimitCount); ConquestUnexpectedEventExcel.AddUnexpectedEventConditionType(builder, UnexpectedEventConditionType); return ConquestUnexpectedEventExcel.EndConquestUnexpectedEventExcel(builder); } public static void StartConquestUnexpectedEventExcel(FlatBufferBuilder builder) { builder.StartTable(8); } public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); } public static void AddUnexpectedEventConditionType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType unexpectedEventConditionType) { builder.AddInt(1, (int)unexpectedEventConditionType, 0); } public static void AddUnexpectedEventConditionUniqueId(FlatBufferBuilder builder, long unexpectedEventConditionUniqueId) { builder.AddLong(2, unexpectedEventConditionUniqueId, 0); } public static void AddUnexpectedEventConditionAmount(FlatBufferBuilder builder, long unexpectedEventConditionAmount) { builder.AddLong(3, unexpectedEventConditionAmount, 0); } public static void AddUnexpectedEventOccurDailyLimitCount(FlatBufferBuilder builder, int unexpectedEventOccurDailyLimitCount) { builder.AddInt(4, unexpectedEventOccurDailyLimitCount, 0); } public static void AddUnitCountPerStep(FlatBufferBuilder builder, int unitCountPerStep) { builder.AddInt(5, unitCountPerStep, 0); } public static void AddUnexpectedEventPrefab(FlatBufferBuilder builder, VectorOffset unexpectedEventPrefabOffset) { builder.AddOffset(6, unexpectedEventPrefabOffset.Value, 0); } public static VectorOffset CreateUnexpectedEventPrefabVector(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 CreateUnexpectedEventPrefabVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateUnexpectedEventPrefabVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateUnexpectedEventPrefabVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartUnexpectedEventPrefabVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddUnexpectedEventUnitId(FlatBufferBuilder builder, VectorOffset unexpectedEventUnitIdOffset) { builder.AddOffset(7, unexpectedEventUnitIdOffset.Value, 0); } public static VectorOffset CreateUnexpectedEventUnitIdVector(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 CreateUnexpectedEventUnitIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateUnexpectedEventUnitIdVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateUnexpectedEventUnitIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartUnexpectedEventUnitIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static Offset EndConquestUnexpectedEventExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class ConquestUnexpectedEventExcelVerify { 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 /*UnexpectedEventConditionType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false) && verifier.VerifyField(tablePos, 8 /*UnexpectedEventConditionUniqueId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 10 /*UnexpectedEventConditionAmount*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 12 /*UnexpectedEventOccurDailyLimitCount*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 14 /*UnitCountPerStep*/, 4 /*int*/, 4, false) && verifier.VerifyVectorOfStrings(tablePos, 16 /*UnexpectedEventPrefab*/, false) && verifier.VerifyVectorOfData(tablePos, 18 /*UnexpectedEventUnitId*/, 8 /*long*/, false) && verifier.VerifyTableEnd(tablePos); } } }