// // 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 BossPhaseExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static BossPhaseExcel GetRootAsBossPhaseExcel(ByteBuffer _bb) { return GetRootAsBossPhaseExcel(_bb, new BossPhaseExcel()); } public static BossPhaseExcel GetRootAsBossPhaseExcel(ByteBuffer _bb, BossPhaseExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public BossPhaseExcel __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 AIPhase { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string NormalAttackSkillUniqueName { get { int o = __p.__offset(8); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetNormalAttackSkillUniqueNameBytes() { return __p.__vector_as_span(8, 1); } #else public ArraySegment? GetNormalAttackSkillUniqueNameBytes() { return __p.__vector_as_arraysegment(8); } #endif public byte[] GetNormalAttackSkillUniqueNameArray() { return __p.__vector_as_array(8); } public bool UseExSkill(int j) { int o = __p.__offset(10); return o != 0 ? 0!=__p.bb.Get(__p.__vector(o) + j * 1) : false; } public int UseExSkillLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetUseExSkillBytes() { return __p.__vector_as_span(10, 1); } #else public ArraySegment? GetUseExSkillBytes() { return __p.__vector_as_arraysegment(10); } #endif public bool[] GetUseExSkillArray() { return __p.__vector_as_array(10); } public static Offset CreateBossPhaseExcel(FlatBufferBuilder builder, long Id = 0, long AIPhase = 0, StringOffset NormalAttackSkillUniqueNameOffset = default(StringOffset), VectorOffset UseExSkillOffset = default(VectorOffset)) { builder.StartTable(4); BossPhaseExcel.AddAIPhase(builder, AIPhase); BossPhaseExcel.AddId(builder, Id); BossPhaseExcel.AddUseExSkill(builder, UseExSkillOffset); BossPhaseExcel.AddNormalAttackSkillUniqueName(builder, NormalAttackSkillUniqueNameOffset); return BossPhaseExcel.EndBossPhaseExcel(builder); } public static void StartBossPhaseExcel(FlatBufferBuilder builder) { builder.StartTable(4); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddAIPhase(FlatBufferBuilder builder, long aIPhase) { builder.AddLong(1, aIPhase, 0); } public static void AddNormalAttackSkillUniqueName(FlatBufferBuilder builder, StringOffset normalAttackSkillUniqueNameOffset) { builder.AddOffset(2, normalAttackSkillUniqueNameOffset.Value, 0); } public static void AddUseExSkill(FlatBufferBuilder builder, VectorOffset useExSkillOffset) { builder.AddOffset(3, useExSkillOffset.Value, 0); } public static VectorOffset CreateUseExSkillVector(FlatBufferBuilder builder, bool[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddBool(data[i]); return builder.EndVector(); } public static VectorOffset CreateUseExSkillVectorBlock(FlatBufferBuilder builder, bool[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateUseExSkillVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(1, data.Count, 1); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateUseExSkillVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartUseExSkillVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); } public static Offset EndBossPhaseExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public BossPhaseExcelT UnPack() { var _o = new BossPhaseExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(BossPhaseExcelT _o) { byte[] key = TableEncryptionService.CreateKey("BossPhase"); _o.Id = TableEncryptionService.Convert(this.Id, key); _o.AIPhase = TableEncryptionService.Convert(this.AIPhase, key); _o.NormalAttackSkillUniqueName = TableEncryptionService.Convert(this.NormalAttackSkillUniqueName, key); _o.UseExSkill = new List(); for (var _j = 0; _j < this.UseExSkillLength; ++_j) {_o.UseExSkill.Add(TableEncryptionService.Convert(this.UseExSkill(_j), key));} } public static Offset Pack(FlatBufferBuilder builder, BossPhaseExcelT _o) { if (_o == null) return default(Offset); var _NormalAttackSkillUniqueName = _o.NormalAttackSkillUniqueName == null ? default(StringOffset) : builder.CreateString(_o.NormalAttackSkillUniqueName); var _UseExSkill = default(VectorOffset); if (_o.UseExSkill != null) { var __UseExSkill = _o.UseExSkill.ToArray(); _UseExSkill = CreateUseExSkillVector(builder, __UseExSkill); } return CreateBossPhaseExcel( builder, _o.Id, _o.AIPhase, _NormalAttackSkillUniqueName, _UseExSkill); } } public class BossPhaseExcelT { public long Id { get; set; } public long AIPhase { get; set; } public string NormalAttackSkillUniqueName { get; set; } public List UseExSkill { get; set; } public BossPhaseExcelT() { this.Id = 0; this.AIPhase = 0; this.NormalAttackSkillUniqueName = null; this.UseExSkill = null; } } static public class BossPhaseExcelVerify { 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 /*AIPhase*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 8 /*NormalAttackSkillUniqueName*/, false) && verifier.VerifyVectorOfData(tablePos, 10 /*UseExSkill*/, 1 /*bool*/, false) && verifier.VerifyTableEnd(tablePos); } } }