// // 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 ShiftingCraftRecipeExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ShiftingCraftRecipeExcel GetRootAsShiftingCraftRecipeExcel(ByteBuffer _bb) { return GetRootAsShiftingCraftRecipeExcel(_bb, new ShiftingCraftRecipeExcel()); } public static ShiftingCraftRecipeExcel GetRootAsShiftingCraftRecipeExcel(ByteBuffer _bb, ShiftingCraftRecipeExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ShiftingCraftRecipeExcel __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 DisplayOrder { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public int NotificationId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public SCHALE.Common.FlatData.ParcelType ResultParcel { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ParcelType.None; } } public long ResultId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long ResultAmount { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long RequireItemId { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long RequireItemAmount { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long RequireGold { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.Tag IngredientTag(int j) { int o = __p.__offset(22); return o != 0 ? (SCHALE.Common.FlatData.Tag)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.Tag)0; } public int IngredientTagLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetIngredientTagBytes() { return __p.__vector_as_span(22, 4); } #else public ArraySegment? GetIngredientTagBytes() { return __p.__vector_as_arraysegment(22); } #endif public SCHALE.Common.FlatData.Tag[] GetIngredientTagArray() { int o = __p.__offset(22); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.Tag[] a = new SCHALE.Common.FlatData.Tag[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.Tag)__p.bb.GetInt(p + i * 4); } return a; } public long IngredientExp { get { int o = __p.__offset(24); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public static Offset CreateShiftingCraftRecipeExcel(FlatBufferBuilder builder, long Id = 0, long DisplayOrder = 0, int NotificationId = 0, SCHALE.Common.FlatData.ParcelType ResultParcel = SCHALE.Common.FlatData.ParcelType.None, long ResultId = 0, long ResultAmount = 0, long RequireItemId = 0, long RequireItemAmount = 0, long RequireGold = 0, VectorOffset IngredientTagOffset = default(VectorOffset), long IngredientExp = 0) { builder.StartTable(11); ShiftingCraftRecipeExcel.AddIngredientExp(builder, IngredientExp); ShiftingCraftRecipeExcel.AddRequireGold(builder, RequireGold); ShiftingCraftRecipeExcel.AddRequireItemAmount(builder, RequireItemAmount); ShiftingCraftRecipeExcel.AddRequireItemId(builder, RequireItemId); ShiftingCraftRecipeExcel.AddResultAmount(builder, ResultAmount); ShiftingCraftRecipeExcel.AddResultId(builder, ResultId); ShiftingCraftRecipeExcel.AddDisplayOrder(builder, DisplayOrder); ShiftingCraftRecipeExcel.AddId(builder, Id); ShiftingCraftRecipeExcel.AddIngredientTag(builder, IngredientTagOffset); ShiftingCraftRecipeExcel.AddResultParcel(builder, ResultParcel); ShiftingCraftRecipeExcel.AddNotificationId(builder, NotificationId); return ShiftingCraftRecipeExcel.EndShiftingCraftRecipeExcel(builder); } public static void StartShiftingCraftRecipeExcel(FlatBufferBuilder builder) { builder.StartTable(11); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddDisplayOrder(FlatBufferBuilder builder, long displayOrder) { builder.AddLong(1, displayOrder, 0); } public static void AddNotificationId(FlatBufferBuilder builder, int notificationId) { builder.AddInt(2, notificationId, 0); } public static void AddResultParcel(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType resultParcel) { builder.AddInt(3, (int)resultParcel, 0); } public static void AddResultId(FlatBufferBuilder builder, long resultId) { builder.AddLong(4, resultId, 0); } public static void AddResultAmount(FlatBufferBuilder builder, long resultAmount) { builder.AddLong(5, resultAmount, 0); } public static void AddRequireItemId(FlatBufferBuilder builder, long requireItemId) { builder.AddLong(6, requireItemId, 0); } public static void AddRequireItemAmount(FlatBufferBuilder builder, long requireItemAmount) { builder.AddLong(7, requireItemAmount, 0); } public static void AddRequireGold(FlatBufferBuilder builder, long requireGold) { builder.AddLong(8, requireGold, 0); } public static void AddIngredientTag(FlatBufferBuilder builder, VectorOffset ingredientTagOffset) { builder.AddOffset(9, ingredientTagOffset.Value, 0); } public static VectorOffset CreateIngredientTagVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.Tag[] 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 CreateIngredientTagVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.Tag[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateIngredientTagVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateIngredientTagVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartIngredientTagVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddIngredientExp(FlatBufferBuilder builder, long ingredientExp) { builder.AddLong(10, ingredientExp, 0); } public static Offset EndShiftingCraftRecipeExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public ShiftingCraftRecipeExcelT UnPack() { var _o = new ShiftingCraftRecipeExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(ShiftingCraftRecipeExcelT _o) { byte[] key = TableEncryptionService.CreateKey("ShiftingCraftRecipe"); _o.Id = TableEncryptionService.Convert(this.Id, key); _o.DisplayOrder = TableEncryptionService.Convert(this.DisplayOrder, key); _o.NotificationId = TableEncryptionService.Convert(this.NotificationId, key); _o.ResultParcel = TableEncryptionService.Convert(this.ResultParcel, key); _o.ResultId = TableEncryptionService.Convert(this.ResultId, key); _o.ResultAmount = TableEncryptionService.Convert(this.ResultAmount, key); _o.RequireItemId = TableEncryptionService.Convert(this.RequireItemId, key); _o.RequireItemAmount = TableEncryptionService.Convert(this.RequireItemAmount, key); _o.RequireGold = TableEncryptionService.Convert(this.RequireGold, key); _o.IngredientTag = new List(); for (var _j = 0; _j < this.IngredientTagLength; ++_j) {_o.IngredientTag.Add(TableEncryptionService.Convert(this.IngredientTag(_j), key));} _o.IngredientExp = TableEncryptionService.Convert(this.IngredientExp, key); } public static Offset Pack(FlatBufferBuilder builder, ShiftingCraftRecipeExcelT _o) { if (_o == null) return default(Offset); var _IngredientTag = default(VectorOffset); if (_o.IngredientTag != null) { var __IngredientTag = _o.IngredientTag.ToArray(); _IngredientTag = CreateIngredientTagVector(builder, __IngredientTag); } return CreateShiftingCraftRecipeExcel( builder, _o.Id, _o.DisplayOrder, _o.NotificationId, _o.ResultParcel, _o.ResultId, _o.ResultAmount, _o.RequireItemId, _o.RequireItemAmount, _o.RequireGold, _IngredientTag, _o.IngredientExp); } } public class ShiftingCraftRecipeExcelT { public long Id { get; set; } public long DisplayOrder { get; set; } public int NotificationId { get; set; } public SCHALE.Common.FlatData.ParcelType ResultParcel { get; set; } public long ResultId { get; set; } public long ResultAmount { get; set; } public long RequireItemId { get; set; } public long RequireItemAmount { get; set; } public long RequireGold { get; set; } public List IngredientTag { get; set; } public long IngredientExp { get; set; } public ShiftingCraftRecipeExcelT() { this.Id = 0; this.DisplayOrder = 0; this.NotificationId = 0; this.ResultParcel = SCHALE.Common.FlatData.ParcelType.None; this.ResultId = 0; this.ResultAmount = 0; this.RequireItemId = 0; this.RequireItemAmount = 0; this.RequireGold = 0; this.IngredientTag = null; this.IngredientExp = 0; } } static public class ShiftingCraftRecipeExcelVerify { 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 /*DisplayOrder*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*NotificationId*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 10 /*ResultParcel*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false) && verifier.VerifyField(tablePos, 12 /*ResultId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 14 /*ResultAmount*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 16 /*RequireItemId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 18 /*RequireItemAmount*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 20 /*RequireGold*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 22 /*IngredientTag*/, 4 /*SCHALE.Common.FlatData.Tag*/, false) && verifier.VerifyField(tablePos, 24 /*IngredientExp*/, 8 /*long*/, 8, false) && verifier.VerifyTableEnd(tablePos); } } }