// // 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 CharacterPotentialStatExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static CharacterPotentialStatExcel GetRootAsCharacterPotentialStatExcel(ByteBuffer _bb) { return GetRootAsCharacterPotentialStatExcel(_bb, new CharacterPotentialStatExcel()); } public static CharacterPotentialStatExcel GetRootAsCharacterPotentialStatExcel(ByteBuffer _bb, CharacterPotentialStatExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public CharacterPotentialStatExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long PotentialStatGroupId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public int PotentialLevel { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public long RecipeId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long StatBonusRate { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public static Offset CreateCharacterPotentialStatExcel(FlatBufferBuilder builder, long PotentialStatGroupId = 0, int PotentialLevel = 0, long RecipeId = 0, long StatBonusRate = 0) { builder.StartTable(4); CharacterPotentialStatExcel.AddStatBonusRate(builder, StatBonusRate); CharacterPotentialStatExcel.AddRecipeId(builder, RecipeId); CharacterPotentialStatExcel.AddPotentialStatGroupId(builder, PotentialStatGroupId); CharacterPotentialStatExcel.AddPotentialLevel(builder, PotentialLevel); return CharacterPotentialStatExcel.EndCharacterPotentialStatExcel(builder); } public static void StartCharacterPotentialStatExcel(FlatBufferBuilder builder) { builder.StartTable(4); } public static void AddPotentialStatGroupId(FlatBufferBuilder builder, long potentialStatGroupId) { builder.AddLong(0, potentialStatGroupId, 0); } public static void AddPotentialLevel(FlatBufferBuilder builder, int potentialLevel) { builder.AddInt(1, potentialLevel, 0); } public static void AddRecipeId(FlatBufferBuilder builder, long recipeId) { builder.AddLong(2, recipeId, 0); } public static void AddStatBonusRate(FlatBufferBuilder builder, long statBonusRate) { builder.AddLong(3, statBonusRate, 0); } public static Offset EndCharacterPotentialStatExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public CharacterPotentialStatExcelT UnPack() { var _o = new CharacterPotentialStatExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(CharacterPotentialStatExcelT _o) { byte[] key = TableEncryptionService.CreateKey("CharacterPotentialStat"); _o.PotentialStatGroupId = TableEncryptionService.Convert(this.PotentialStatGroupId, key); _o.PotentialLevel = TableEncryptionService.Convert(this.PotentialLevel, key); _o.RecipeId = TableEncryptionService.Convert(this.RecipeId, key); _o.StatBonusRate = TableEncryptionService.Convert(this.StatBonusRate, key); } public static Offset Pack(FlatBufferBuilder builder, CharacterPotentialStatExcelT _o) { if (_o == null) return default(Offset); return CreateCharacterPotentialStatExcel( builder, _o.PotentialStatGroupId, _o.PotentialLevel, _o.RecipeId, _o.StatBonusRate); } } public class CharacterPotentialStatExcelT { public long PotentialStatGroupId { get; set; } public int PotentialLevel { get; set; } public long RecipeId { get; set; } public long StatBonusRate { get; set; } public CharacterPotentialStatExcelT() { this.PotentialStatGroupId = 0; this.PotentialLevel = 0; this.RecipeId = 0; this.StatBonusRate = 0; } } static public class CharacterPotentialStatExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*PotentialStatGroupId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*PotentialLevel*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 8 /*RecipeId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 10 /*StatBonusRate*/, 8 /*long*/, 8, false) && verifier.VerifyTableEnd(tablePos); } } }