// // 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 BattleLevelFactorExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static BattleLevelFactorExcel GetRootAsBattleLevelFactorExcel(ByteBuffer _bb) { return GetRootAsBattleLevelFactorExcel(_bb, new BattleLevelFactorExcel()); } public static BattleLevelFactorExcel GetRootAsBattleLevelFactorExcel(ByteBuffer _bb, BattleLevelFactorExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public BattleLevelFactorExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public int LevelDiff { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public long DamageRate { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public static Offset CreateBattleLevelFactorExcel(FlatBufferBuilder builder, int LevelDiff = 0, long DamageRate = 0) { builder.StartTable(2); BattleLevelFactorExcel.AddDamageRate(builder, DamageRate); BattleLevelFactorExcel.AddLevelDiff(builder, LevelDiff); return BattleLevelFactorExcel.EndBattleLevelFactorExcel(builder); } public static void StartBattleLevelFactorExcel(FlatBufferBuilder builder) { builder.StartTable(2); } public static void AddLevelDiff(FlatBufferBuilder builder, int levelDiff) { builder.AddInt(0, levelDiff, 0); } public static void AddDamageRate(FlatBufferBuilder builder, long damageRate) { builder.AddLong(1, damageRate, 0); } public static Offset EndBattleLevelFactorExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public BattleLevelFactorExcelT UnPack() { var _o = new BattleLevelFactorExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(BattleLevelFactorExcelT _o) { byte[] key = TableEncryptionService.CreateKey("BattleLevelFactor"); _o.LevelDiff = TableEncryptionService.Convert(this.LevelDiff, key); _o.DamageRate = TableEncryptionService.Convert(this.DamageRate, key); } public static Offset Pack(FlatBufferBuilder builder, BattleLevelFactorExcelT _o) { if (_o == null) return default(Offset); return CreateBattleLevelFactorExcel( builder, _o.LevelDiff, _o.DamageRate); } } public class BattleLevelFactorExcelT { public int LevelDiff { get; set; } public long DamageRate { get; set; } public BattleLevelFactorExcelT() { this.LevelDiff = 0; this.DamageRate = 0; } } static public class BattleLevelFactorExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*LevelDiff*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 6 /*DamageRate*/, 8 /*long*/, 8, false) && verifier.VerifyTableEnd(tablePos); } } }