// // 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 GachaElementExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static GachaElementExcel GetRootAsGachaElementExcel(ByteBuffer _bb) { return GetRootAsGachaElementExcel(_bb, new GachaElementExcel()); } public static GachaElementExcel GetRootAsGachaElementExcel(ByteBuffer _bb, GachaElementExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public GachaElementExcel __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 GachaGroupID { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.ParcelType ParcelType_ { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ParcelType.None; } } public long ParcelID { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.Rarity Rarity_ { get { int o = __p.__offset(12); return o != 0 ? (SCHALE.Common.FlatData.Rarity)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.Rarity.N; } } public int ParcelAmountMin { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int ParcelAmountMax { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int Prob { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int State { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public static Offset CreateGachaElementExcel(FlatBufferBuilder builder, long ID = 0, long GachaGroupID = 0, SCHALE.Common.FlatData.ParcelType ParcelType_ = SCHALE.Common.FlatData.ParcelType.None, long ParcelID = 0, SCHALE.Common.FlatData.Rarity Rarity_ = SCHALE.Common.FlatData.Rarity.N, int ParcelAmountMin = 0, int ParcelAmountMax = 0, int Prob = 0, int State = 0) { builder.StartTable(9); GachaElementExcel.AddParcelID(builder, ParcelID); GachaElementExcel.AddGachaGroupID(builder, GachaGroupID); GachaElementExcel.AddID(builder, ID); GachaElementExcel.AddState(builder, State); GachaElementExcel.AddProb(builder, Prob); GachaElementExcel.AddParcelAmountMax(builder, ParcelAmountMax); GachaElementExcel.AddParcelAmountMin(builder, ParcelAmountMin); GachaElementExcel.AddRarity_(builder, Rarity_); GachaElementExcel.AddParcelType_(builder, ParcelType_); return GachaElementExcel.EndGachaElementExcel(builder); } public static void StartGachaElementExcel(FlatBufferBuilder builder) { builder.StartTable(9); } public static void AddID(FlatBufferBuilder builder, long iD) { builder.AddLong(0, iD, 0); } public static void AddGachaGroupID(FlatBufferBuilder builder, long gachaGroupID) { builder.AddLong(1, gachaGroupID, 0); } public static void AddParcelType_(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType parcelType_) { builder.AddInt(2, (int)parcelType_, 0); } public static void AddParcelID(FlatBufferBuilder builder, long parcelID) { builder.AddLong(3, parcelID, 0); } public static void AddRarity_(FlatBufferBuilder builder, SCHALE.Common.FlatData.Rarity rarity_) { builder.AddInt(4, (int)rarity_, 0); } public static void AddParcelAmountMin(FlatBufferBuilder builder, int parcelAmountMin) { builder.AddInt(5, parcelAmountMin, 0); } public static void AddParcelAmountMax(FlatBufferBuilder builder, int parcelAmountMax) { builder.AddInt(6, parcelAmountMax, 0); } public static void AddProb(FlatBufferBuilder builder, int prob) { builder.AddInt(7, prob, 0); } public static void AddState(FlatBufferBuilder builder, int state) { builder.AddInt(8, state, 0); } public static Offset EndGachaElementExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public GachaElementExcelT UnPack() { var _o = new GachaElementExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(GachaElementExcelT _o) { byte[] key = TableEncryptionService.CreateKey("GachaElement"); _o.ID = TableEncryptionService.Convert(this.ID, key); _o.GachaGroupID = TableEncryptionService.Convert(this.GachaGroupID, key); _o.ParcelType_ = TableEncryptionService.Convert(this.ParcelType_, key); _o.ParcelID = TableEncryptionService.Convert(this.ParcelID, key); _o.Rarity_ = TableEncryptionService.Convert(this.Rarity_, key); _o.ParcelAmountMin = TableEncryptionService.Convert(this.ParcelAmountMin, key); _o.ParcelAmountMax = TableEncryptionService.Convert(this.ParcelAmountMax, key); _o.Prob = TableEncryptionService.Convert(this.Prob, key); _o.State = TableEncryptionService.Convert(this.State, key); } public static Offset Pack(FlatBufferBuilder builder, GachaElementExcelT _o) { if (_o == null) return default(Offset); return CreateGachaElementExcel( builder, _o.ID, _o.GachaGroupID, _o.ParcelType_, _o.ParcelID, _o.Rarity_, _o.ParcelAmountMin, _o.ParcelAmountMax, _o.Prob, _o.State); } } public class GachaElementExcelT { public long ID { get; set; } public long GachaGroupID { get; set; } public SCHALE.Common.FlatData.ParcelType ParcelType_ { get; set; } public long ParcelID { get; set; } public SCHALE.Common.FlatData.Rarity Rarity_ { get; set; } public int ParcelAmountMin { get; set; } public int ParcelAmountMax { get; set; } public int Prob { get; set; } public int State { get; set; } public GachaElementExcelT() { this.ID = 0; this.GachaGroupID = 0; this.ParcelType_ = SCHALE.Common.FlatData.ParcelType.None; this.ParcelID = 0; this.Rarity_ = SCHALE.Common.FlatData.Rarity.N; this.ParcelAmountMin = 0; this.ParcelAmountMax = 0; this.Prob = 0; this.State = 0; } } static public class GachaElementExcelVerify { 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 /*GachaGroupID*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*ParcelType_*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false) && verifier.VerifyField(tablePos, 10 /*ParcelID*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 12 /*Rarity_*/, 4 /*SCHALE.Common.FlatData.Rarity*/, 4, false) && verifier.VerifyField(tablePos, 14 /*ParcelAmountMin*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 16 /*ParcelAmountMax*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 18 /*Prob*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 20 /*State*/, 4 /*int*/, 4, false) && verifier.VerifyTableEnd(tablePos); } } }