// // 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 SchoolDungeonRewardExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static SchoolDungeonRewardExcel GetRootAsSchoolDungeonRewardExcel(ByteBuffer _bb) { return GetRootAsSchoolDungeonRewardExcel(_bb, new SchoolDungeonRewardExcel()); } public static SchoolDungeonRewardExcel GetRootAsSchoolDungeonRewardExcel(ByteBuffer _bb, SchoolDungeonRewardExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public SchoolDungeonRewardExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long GroupId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.SchoolDungeonType DungeonType { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.SchoolDungeonType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.SchoolDungeonType.SchoolA; } } public SCHALE.Common.FlatData.RewardTag RewardTag { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.RewardTag)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.RewardTag.Default; } } public SCHALE.Common.FlatData.ParcelType RewardParcelType { 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 RewardParcelId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long RewardParcelAmount { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long RewardParcelProbability { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public bool IsDisplayed { get { int o = __p.__offset(18); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public static Offset CreateSchoolDungeonRewardExcel(FlatBufferBuilder builder, long GroupId = 0, SCHALE.Common.FlatData.SchoolDungeonType DungeonType = SCHALE.Common.FlatData.SchoolDungeonType.SchoolA, SCHALE.Common.FlatData.RewardTag RewardTag = SCHALE.Common.FlatData.RewardTag.Default, SCHALE.Common.FlatData.ParcelType RewardParcelType = SCHALE.Common.FlatData.ParcelType.None, long RewardParcelId = 0, long RewardParcelAmount = 0, long RewardParcelProbability = 0, bool IsDisplayed = false) { builder.StartTable(8); SchoolDungeonRewardExcel.AddRewardParcelProbability(builder, RewardParcelProbability); SchoolDungeonRewardExcel.AddRewardParcelAmount(builder, RewardParcelAmount); SchoolDungeonRewardExcel.AddRewardParcelId(builder, RewardParcelId); SchoolDungeonRewardExcel.AddGroupId(builder, GroupId); SchoolDungeonRewardExcel.AddRewardParcelType(builder, RewardParcelType); SchoolDungeonRewardExcel.AddRewardTag(builder, RewardTag); SchoolDungeonRewardExcel.AddDungeonType(builder, DungeonType); SchoolDungeonRewardExcel.AddIsDisplayed(builder, IsDisplayed); return SchoolDungeonRewardExcel.EndSchoolDungeonRewardExcel(builder); } public static void StartSchoolDungeonRewardExcel(FlatBufferBuilder builder) { builder.StartTable(8); } public static void AddGroupId(FlatBufferBuilder builder, long groupId) { builder.AddLong(0, groupId, 0); } public static void AddDungeonType(FlatBufferBuilder builder, SCHALE.Common.FlatData.SchoolDungeonType dungeonType) { builder.AddInt(1, (int)dungeonType, 0); } public static void AddRewardTag(FlatBufferBuilder builder, SCHALE.Common.FlatData.RewardTag rewardTag) { builder.AddInt(2, (int)rewardTag, 0); } public static void AddRewardParcelType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType rewardParcelType) { builder.AddInt(3, (int)rewardParcelType, 0); } public static void AddRewardParcelId(FlatBufferBuilder builder, long rewardParcelId) { builder.AddLong(4, rewardParcelId, 0); } public static void AddRewardParcelAmount(FlatBufferBuilder builder, long rewardParcelAmount) { builder.AddLong(5, rewardParcelAmount, 0); } public static void AddRewardParcelProbability(FlatBufferBuilder builder, long rewardParcelProbability) { builder.AddLong(6, rewardParcelProbability, 0); } public static void AddIsDisplayed(FlatBufferBuilder builder, bool isDisplayed) { builder.AddBool(7, isDisplayed, false); } public static Offset EndSchoolDungeonRewardExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public SchoolDungeonRewardExcelT UnPack() { var _o = new SchoolDungeonRewardExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(SchoolDungeonRewardExcelT _o) { byte[] key = TableEncryptionService.CreateKey("SchoolDungeonReward"); _o.GroupId = TableEncryptionService.Convert(this.GroupId, key); _o.DungeonType = TableEncryptionService.Convert(this.DungeonType, key); _o.RewardTag = TableEncryptionService.Convert(this.RewardTag, key); _o.RewardParcelType = TableEncryptionService.Convert(this.RewardParcelType, key); _o.RewardParcelId = TableEncryptionService.Convert(this.RewardParcelId, key); _o.RewardParcelAmount = TableEncryptionService.Convert(this.RewardParcelAmount, key); _o.RewardParcelProbability = TableEncryptionService.Convert(this.RewardParcelProbability, key); _o.IsDisplayed = TableEncryptionService.Convert(this.IsDisplayed, key); } public static Offset Pack(FlatBufferBuilder builder, SchoolDungeonRewardExcelT _o) { if (_o == null) return default(Offset); return CreateSchoolDungeonRewardExcel( builder, _o.GroupId, _o.DungeonType, _o.RewardTag, _o.RewardParcelType, _o.RewardParcelId, _o.RewardParcelAmount, _o.RewardParcelProbability, _o.IsDisplayed); } } public class SchoolDungeonRewardExcelT { public long GroupId { get; set; } public SCHALE.Common.FlatData.SchoolDungeonType DungeonType { get; set; } public SCHALE.Common.FlatData.RewardTag RewardTag { get; set; } public SCHALE.Common.FlatData.ParcelType RewardParcelType { get; set; } public long RewardParcelId { get; set; } public long RewardParcelAmount { get; set; } public long RewardParcelProbability { get; set; } public bool IsDisplayed { get; set; } public SchoolDungeonRewardExcelT() { this.GroupId = 0; this.DungeonType = SCHALE.Common.FlatData.SchoolDungeonType.SchoolA; this.RewardTag = SCHALE.Common.FlatData.RewardTag.Default; this.RewardParcelType = SCHALE.Common.FlatData.ParcelType.None; this.RewardParcelId = 0; this.RewardParcelAmount = 0; this.RewardParcelProbability = 0; this.IsDisplayed = false; } } static public class SchoolDungeonRewardExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*GroupId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*DungeonType*/, 4 /*SCHALE.Common.FlatData.SchoolDungeonType*/, 4, false) && verifier.VerifyField(tablePos, 8 /*RewardTag*/, 4 /*SCHALE.Common.FlatData.RewardTag*/, 4, false) && verifier.VerifyField(tablePos, 10 /*RewardParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false) && verifier.VerifyField(tablePos, 12 /*RewardParcelId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 14 /*RewardParcelAmount*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 16 /*RewardParcelProbability*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 18 /*IsDisplayed*/, 1 /*bool*/, 1, false) && verifier.VerifyTableEnd(tablePos); } } }