// // 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 MinigameTBGObjectExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static MinigameTBGObjectExcel GetRootAsMinigameTBGObjectExcel(ByteBuffer _bb) { return GetRootAsMinigameTBGObjectExcel(_bb, new MinigameTBGObjectExcel()); } public static MinigameTBGObjectExcel GetRootAsMinigameTBGObjectExcel(ByteBuffer _bb, MinigameTBGObjectExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public MinigameTBGObjectExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long UniqueId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string Key { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetKeyBytes() { return __p.__vector_as_span(6, 1); } #else public ArraySegment? GetKeyBytes() { return __p.__vector_as_arraysegment(6); } #endif public byte[] GetKeyArray() { return __p.__vector_as_array(6); } public string PrefabName { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetPrefabNameBytes() { return __p.__vector_as_span(8, 1); } #else public ArraySegment? GetPrefabNameBytes() { return __p.__vector_as_arraysegment(8); } #endif public byte[] GetPrefabNameArray() { return __p.__vector_as_array(8); } public SCHALE.Common.FlatData.TBGObjectType ObjectType { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.TBGObjectType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.TBGObjectType.None; } } public SCHALE.Common.FlatData.ParcelType ObjectCostType { get { int o = __p.__offset(12); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ParcelType.None; } } public long ObjectCostId { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public int ObjectCostAmount { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public bool Disposable { get { int o = __p.__offset(18); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public bool ReEncounterCost { get { int o = __p.__offset(20); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public static Offset CreateMinigameTBGObjectExcel(FlatBufferBuilder builder, long UniqueId = 0, StringOffset KeyOffset = default(StringOffset), StringOffset PrefabNameOffset = default(StringOffset), SCHALE.Common.FlatData.TBGObjectType ObjectType = SCHALE.Common.FlatData.TBGObjectType.None, SCHALE.Common.FlatData.ParcelType ObjectCostType = SCHALE.Common.FlatData.ParcelType.None, long ObjectCostId = 0, int ObjectCostAmount = 0, bool Disposable = false, bool ReEncounterCost = false) { builder.StartTable(9); MinigameTBGObjectExcel.AddObjectCostId(builder, ObjectCostId); MinigameTBGObjectExcel.AddUniqueId(builder, UniqueId); MinigameTBGObjectExcel.AddObjectCostAmount(builder, ObjectCostAmount); MinigameTBGObjectExcel.AddObjectCostType(builder, ObjectCostType); MinigameTBGObjectExcel.AddObjectType(builder, ObjectType); MinigameTBGObjectExcel.AddPrefabName(builder, PrefabNameOffset); MinigameTBGObjectExcel.AddKey(builder, KeyOffset); MinigameTBGObjectExcel.AddReEncounterCost(builder, ReEncounterCost); MinigameTBGObjectExcel.AddDisposable(builder, Disposable); return MinigameTBGObjectExcel.EndMinigameTBGObjectExcel(builder); } public static void StartMinigameTBGObjectExcel(FlatBufferBuilder builder) { builder.StartTable(9); } public static void AddUniqueId(FlatBufferBuilder builder, long uniqueId) { builder.AddLong(0, uniqueId, 0); } public static void AddKey(FlatBufferBuilder builder, StringOffset keyOffset) { builder.AddOffset(1, keyOffset.Value, 0); } public static void AddPrefabName(FlatBufferBuilder builder, StringOffset prefabNameOffset) { builder.AddOffset(2, prefabNameOffset.Value, 0); } public static void AddObjectType(FlatBufferBuilder builder, SCHALE.Common.FlatData.TBGObjectType objectType) { builder.AddInt(3, (int)objectType, 0); } public static void AddObjectCostType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType objectCostType) { builder.AddInt(4, (int)objectCostType, 0); } public static void AddObjectCostId(FlatBufferBuilder builder, long objectCostId) { builder.AddLong(5, objectCostId, 0); } public static void AddObjectCostAmount(FlatBufferBuilder builder, int objectCostAmount) { builder.AddInt(6, objectCostAmount, 0); } public static void AddDisposable(FlatBufferBuilder builder, bool disposable) { builder.AddBool(7, disposable, false); } public static void AddReEncounterCost(FlatBufferBuilder builder, bool reEncounterCost) { builder.AddBool(8, reEncounterCost, false); } public static Offset EndMinigameTBGObjectExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public MinigameTBGObjectExcelT UnPack() { var _o = new MinigameTBGObjectExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(MinigameTBGObjectExcelT _o) { byte[] key = TableEncryptionService.CreateKey("MinigameTBGObject"); _o.UniqueId = TableEncryptionService.Convert(this.UniqueId, key); _o.Key = TableEncryptionService.Convert(this.Key, key); _o.PrefabName = TableEncryptionService.Convert(this.PrefabName, key); _o.ObjectType = TableEncryptionService.Convert(this.ObjectType, key); _o.ObjectCostType = TableEncryptionService.Convert(this.ObjectCostType, key); _o.ObjectCostId = TableEncryptionService.Convert(this.ObjectCostId, key); _o.ObjectCostAmount = TableEncryptionService.Convert(this.ObjectCostAmount, key); _o.Disposable = TableEncryptionService.Convert(this.Disposable, key); _o.ReEncounterCost = TableEncryptionService.Convert(this.ReEncounterCost, key); } public static Offset Pack(FlatBufferBuilder builder, MinigameTBGObjectExcelT _o) { if (_o == null) return default(Offset); var _Key = _o.Key == null ? default(StringOffset) : builder.CreateString(_o.Key); var _PrefabName = _o.PrefabName == null ? default(StringOffset) : builder.CreateString(_o.PrefabName); return CreateMinigameTBGObjectExcel( builder, _o.UniqueId, _Key, _PrefabName, _o.ObjectType, _o.ObjectCostType, _o.ObjectCostId, _o.ObjectCostAmount, _o.Disposable, _o.ReEncounterCost); } } public class MinigameTBGObjectExcelT { public long UniqueId { get; set; } public string Key { get; set; } public string PrefabName { get; set; } public SCHALE.Common.FlatData.TBGObjectType ObjectType { get; set; } public SCHALE.Common.FlatData.ParcelType ObjectCostType { get; set; } public long ObjectCostId { get; set; } public int ObjectCostAmount { get; set; } public bool Disposable { get; set; } public bool ReEncounterCost { get; set; } public MinigameTBGObjectExcelT() { this.UniqueId = 0; this.Key = null; this.PrefabName = null; this.ObjectType = SCHALE.Common.FlatData.TBGObjectType.None; this.ObjectCostType = SCHALE.Common.FlatData.ParcelType.None; this.ObjectCostId = 0; this.ObjectCostAmount = 0; this.Disposable = false; this.ReEncounterCost = false; } } static public class MinigameTBGObjectExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*UniqueId*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 6 /*Key*/, false) && verifier.VerifyString(tablePos, 8 /*PrefabName*/, false) && verifier.VerifyField(tablePos, 10 /*ObjectType*/, 4 /*SCHALE.Common.FlatData.TBGObjectType*/, 4, false) && verifier.VerifyField(tablePos, 12 /*ObjectCostType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false) && verifier.VerifyField(tablePos, 14 /*ObjectCostId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 16 /*ObjectCostAmount*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 18 /*Disposable*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 20 /*ReEncounterCost*/, 1 /*bool*/, 1, false) && verifier.VerifyTableEnd(tablePos); } } }