// // 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 ArenaNPCExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ArenaNPCExcel GetRootAsArenaNPCExcel(ByteBuffer _bb) { return GetRootAsArenaNPCExcel(_bb, new ArenaNPCExcel()); } public static ArenaNPCExcel GetRootAsArenaNPCExcel(ByteBuffer _bb, ArenaNPCExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ArenaNPCExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public long UniqueId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long Rank { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long NPCAccountLevel { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long NPCLevel { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long NPCLevelDeviation { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long NPCStarGrade { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.Rarity ExceptionCharacterRarities(int j) { int o = __p.__offset(16); return o != 0 ? (SCHALE.Common.FlatData.Rarity)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.Rarity)0; } public int ExceptionCharacterRaritiesLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetExceptionCharacterRaritiesBytes() { return __p.__vector_as_span(16, 4); } #else public ArraySegment? GetExceptionCharacterRaritiesBytes() { return __p.__vector_as_arraysegment(16); } #endif public SCHALE.Common.FlatData.Rarity[] GetExceptionCharacterRaritiesArray() { int o = __p.__offset(16); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.Rarity[] a = new SCHALE.Common.FlatData.Rarity[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.Rarity)__p.bb.GetInt(p + i * 4); } return a; } public long ExceptionMainCharacterIds(int j) { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int ExceptionMainCharacterIdsLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetExceptionMainCharacterIdsBytes() { return __p.__vector_as_span(18, 8); } #else public ArraySegment? GetExceptionMainCharacterIdsBytes() { return __p.__vector_as_arraysegment(18); } #endif public long[] GetExceptionMainCharacterIdsArray() { return __p.__vector_as_array(18); } public long ExceptionSupportCharacterIds(int j) { int o = __p.__offset(20); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int ExceptionSupportCharacterIdsLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetExceptionSupportCharacterIdsBytes() { return __p.__vector_as_span(20, 8); } #else public ArraySegment? GetExceptionSupportCharacterIdsBytes() { return __p.__vector_as_arraysegment(20); } #endif public long[] GetExceptionSupportCharacterIdsArray() { return __p.__vector_as_array(20); } public long ExceptionTSSIds(int j) { int o = __p.__offset(22); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int ExceptionTSSIdsLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetExceptionTSSIdsBytes() { return __p.__vector_as_span(22, 8); } #else public ArraySegment? GetExceptionTSSIdsBytes() { return __p.__vector_as_arraysegment(22); } #endif public long[] GetExceptionTSSIdsArray() { return __p.__vector_as_array(22); } public static Offset CreateArenaNPCExcel(FlatBufferBuilder builder, long UniqueId = 0, long Rank = 0, long NPCAccountLevel = 0, long NPCLevel = 0, long NPCLevelDeviation = 0, long NPCStarGrade = 0, VectorOffset ExceptionCharacterRaritiesOffset = default(VectorOffset), VectorOffset ExceptionMainCharacterIdsOffset = default(VectorOffset), VectorOffset ExceptionSupportCharacterIdsOffset = default(VectorOffset), VectorOffset ExceptionTSSIdsOffset = default(VectorOffset)) { builder.StartTable(10); ArenaNPCExcel.AddNPCStarGrade(builder, NPCStarGrade); ArenaNPCExcel.AddNPCLevelDeviation(builder, NPCLevelDeviation); ArenaNPCExcel.AddNPCLevel(builder, NPCLevel); ArenaNPCExcel.AddNPCAccountLevel(builder, NPCAccountLevel); ArenaNPCExcel.AddRank(builder, Rank); ArenaNPCExcel.AddUniqueId(builder, UniqueId); ArenaNPCExcel.AddExceptionTSSIds(builder, ExceptionTSSIdsOffset); ArenaNPCExcel.AddExceptionSupportCharacterIds(builder, ExceptionSupportCharacterIdsOffset); ArenaNPCExcel.AddExceptionMainCharacterIds(builder, ExceptionMainCharacterIdsOffset); ArenaNPCExcel.AddExceptionCharacterRarities(builder, ExceptionCharacterRaritiesOffset); return ArenaNPCExcel.EndArenaNPCExcel(builder); } public static void StartArenaNPCExcel(FlatBufferBuilder builder) { builder.StartTable(10); } public static void AddUniqueId(FlatBufferBuilder builder, long uniqueId) { builder.AddLong(0, uniqueId, 0); } public static void AddRank(FlatBufferBuilder builder, long rank) { builder.AddLong(1, rank, 0); } public static void AddNPCAccountLevel(FlatBufferBuilder builder, long nPCAccountLevel) { builder.AddLong(2, nPCAccountLevel, 0); } public static void AddNPCLevel(FlatBufferBuilder builder, long nPCLevel) { builder.AddLong(3, nPCLevel, 0); } public static void AddNPCLevelDeviation(FlatBufferBuilder builder, long nPCLevelDeviation) { builder.AddLong(4, nPCLevelDeviation, 0); } public static void AddNPCStarGrade(FlatBufferBuilder builder, long nPCStarGrade) { builder.AddLong(5, nPCStarGrade, 0); } public static void AddExceptionCharacterRarities(FlatBufferBuilder builder, VectorOffset exceptionCharacterRaritiesOffset) { builder.AddOffset(6, exceptionCharacterRaritiesOffset.Value, 0); } public static VectorOffset CreateExceptionCharacterRaritiesVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.Rarity[] 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 CreateExceptionCharacterRaritiesVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.Rarity[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateExceptionCharacterRaritiesVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateExceptionCharacterRaritiesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartExceptionCharacterRaritiesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddExceptionMainCharacterIds(FlatBufferBuilder builder, VectorOffset exceptionMainCharacterIdsOffset) { builder.AddOffset(7, exceptionMainCharacterIdsOffset.Value, 0); } public static VectorOffset CreateExceptionMainCharacterIdsVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } public static VectorOffset CreateExceptionMainCharacterIdsVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateExceptionMainCharacterIdsVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateExceptionMainCharacterIdsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartExceptionMainCharacterIdsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddExceptionSupportCharacterIds(FlatBufferBuilder builder, VectorOffset exceptionSupportCharacterIdsOffset) { builder.AddOffset(8, exceptionSupportCharacterIdsOffset.Value, 0); } public static VectorOffset CreateExceptionSupportCharacterIdsVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } public static VectorOffset CreateExceptionSupportCharacterIdsVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateExceptionSupportCharacterIdsVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateExceptionSupportCharacterIdsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartExceptionSupportCharacterIdsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static void AddExceptionTSSIds(FlatBufferBuilder builder, VectorOffset exceptionTSSIdsOffset) { builder.AddOffset(9, exceptionTSSIdsOffset.Value, 0); } public static VectorOffset CreateExceptionTSSIdsVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } public static VectorOffset CreateExceptionTSSIdsVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateExceptionTSSIdsVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateExceptionTSSIdsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartExceptionTSSIdsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static Offset EndArenaNPCExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public ArenaNPCExcelT UnPack() { var _o = new ArenaNPCExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(ArenaNPCExcelT _o) { byte[] key = TableEncryptionService.CreateKey("ArenaNPC"); _o.UniqueId = TableEncryptionService.Convert(this.UniqueId, key); _o.Rank = TableEncryptionService.Convert(this.Rank, key); _o.NPCAccountLevel = TableEncryptionService.Convert(this.NPCAccountLevel, key); _o.NPCLevel = TableEncryptionService.Convert(this.NPCLevel, key); _o.NPCLevelDeviation = TableEncryptionService.Convert(this.NPCLevelDeviation, key); _o.NPCStarGrade = TableEncryptionService.Convert(this.NPCStarGrade, key); _o.ExceptionCharacterRarities = new List(); for (var _j = 0; _j < this.ExceptionCharacterRaritiesLength; ++_j) {_o.ExceptionCharacterRarities.Add(TableEncryptionService.Convert(this.ExceptionCharacterRarities(_j), key));} _o.ExceptionMainCharacterIds = new List(); for (var _j = 0; _j < this.ExceptionMainCharacterIdsLength; ++_j) {_o.ExceptionMainCharacterIds.Add(TableEncryptionService.Convert(this.ExceptionMainCharacterIds(_j), key));} _o.ExceptionSupportCharacterIds = new List(); for (var _j = 0; _j < this.ExceptionSupportCharacterIdsLength; ++_j) {_o.ExceptionSupportCharacterIds.Add(TableEncryptionService.Convert(this.ExceptionSupportCharacterIds(_j), key));} _o.ExceptionTSSIds = new List(); for (var _j = 0; _j < this.ExceptionTSSIdsLength; ++_j) {_o.ExceptionTSSIds.Add(TableEncryptionService.Convert(this.ExceptionTSSIds(_j), key));} } public static Offset Pack(FlatBufferBuilder builder, ArenaNPCExcelT _o) { if (_o == null) return default(Offset); var _ExceptionCharacterRarities = default(VectorOffset); if (_o.ExceptionCharacterRarities != null) { var __ExceptionCharacterRarities = _o.ExceptionCharacterRarities.ToArray(); _ExceptionCharacterRarities = CreateExceptionCharacterRaritiesVector(builder, __ExceptionCharacterRarities); } var _ExceptionMainCharacterIds = default(VectorOffset); if (_o.ExceptionMainCharacterIds != null) { var __ExceptionMainCharacterIds = _o.ExceptionMainCharacterIds.ToArray(); _ExceptionMainCharacterIds = CreateExceptionMainCharacterIdsVector(builder, __ExceptionMainCharacterIds); } var _ExceptionSupportCharacterIds = default(VectorOffset); if (_o.ExceptionSupportCharacterIds != null) { var __ExceptionSupportCharacterIds = _o.ExceptionSupportCharacterIds.ToArray(); _ExceptionSupportCharacterIds = CreateExceptionSupportCharacterIdsVector(builder, __ExceptionSupportCharacterIds); } var _ExceptionTSSIds = default(VectorOffset); if (_o.ExceptionTSSIds != null) { var __ExceptionTSSIds = _o.ExceptionTSSIds.ToArray(); _ExceptionTSSIds = CreateExceptionTSSIdsVector(builder, __ExceptionTSSIds); } return CreateArenaNPCExcel( builder, _o.UniqueId, _o.Rank, _o.NPCAccountLevel, _o.NPCLevel, _o.NPCLevelDeviation, _o.NPCStarGrade, _ExceptionCharacterRarities, _ExceptionMainCharacterIds, _ExceptionSupportCharacterIds, _ExceptionTSSIds); } } public class ArenaNPCExcelT { public long UniqueId { get; set; } public long Rank { get; set; } public long NPCAccountLevel { get; set; } public long NPCLevel { get; set; } public long NPCLevelDeviation { get; set; } public long NPCStarGrade { get; set; } public List ExceptionCharacterRarities { get; set; } public List ExceptionMainCharacterIds { get; set; } public List ExceptionSupportCharacterIds { get; set; } public List ExceptionTSSIds { get; set; } public ArenaNPCExcelT() { this.UniqueId = 0; this.Rank = 0; this.NPCAccountLevel = 0; this.NPCLevel = 0; this.NPCLevelDeviation = 0; this.NPCStarGrade = 0; this.ExceptionCharacterRarities = null; this.ExceptionMainCharacterIds = null; this.ExceptionSupportCharacterIds = null; this.ExceptionTSSIds = null; } } static public class ArenaNPCExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*UniqueId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 6 /*Rank*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*NPCAccountLevel*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 10 /*NPCLevel*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 12 /*NPCLevelDeviation*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 14 /*NPCStarGrade*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 16 /*ExceptionCharacterRarities*/, 4 /*SCHALE.Common.FlatData.Rarity*/, false) && verifier.VerifyVectorOfData(tablePos, 18 /*ExceptionMainCharacterIds*/, 8 /*long*/, false) && verifier.VerifyVectorOfData(tablePos, 20 /*ExceptionSupportCharacterIds*/, 8 /*long*/, false) && verifier.VerifyVectorOfData(tablePos, 22 /*ExceptionTSSIds*/, 8 /*long*/, false) && verifier.VerifyTableEnd(tablePos); } } }