// // 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 FieldContentStageExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static FieldContentStageExcel GetRootAsFieldContentStageExcel(ByteBuffer _bb) { return GetRootAsFieldContentStageExcel(_bb, new FieldContentStageExcel()); } public static FieldContentStageExcel GetRootAsFieldContentStageExcel(ByteBuffer _bb, FieldContentStageExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public FieldContentStageExcel __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 SeasonId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long AreaId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long GroupId { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.StageDifficulty StageDifficulty { get { int o = __p.__offset(12); return o != 0 ? (SCHALE.Common.FlatData.StageDifficulty)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.StageDifficulty.None; } } public long PrevStageId { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string Name { get { int o = __p.__offset(16); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetNameBytes() { return __p.__vector_as_span(16, 1); } #else public ArraySegment? GetNameBytes() { return __p.__vector_as_arraysegment(16); } #endif public byte[] GetNameArray() { return __p.__vector_as_array(16); } public long BattleDuration { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public SCHALE.Common.FlatData.ParcelType StageEnterCostType { get { int o = __p.__offset(20); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ParcelType.None; } } public long StageEnterCostId { get { int o = __p.__offset(22); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public int StageEnterCostAmount { get { int o = __p.__offset(24); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public SCHALE.Common.FlatData.StageTopography StageTopography { get { int o = __p.__offset(26); return o != 0 ? (SCHALE.Common.FlatData.StageTopography)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.StageTopography.Street; } } public int RecommandLevel { get { int o = __p.__offset(28); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public long GroundID { get { int o = __p.__offset(30); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long BGMId { get { int o = __p.__offset(32); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public bool InstantClear { get { int o = __p.__offset(34); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public long FixedEchelonId { get { int o = __p.__offset(36); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public bool SkipFormationSettings { get { int o = __p.__offset(38); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public bool DailyLastPlay { get { int o = __p.__offset(40); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public SCHALE.Common.FlatData.StarGoalType StarGoal(int j) { int o = __p.__offset(42); return o != 0 ? (SCHALE.Common.FlatData.StarGoalType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.StarGoalType)0; } public int StarGoalLength { get { int o = __p.__offset(42); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetStarGoalBytes() { return __p.__vector_as_span(42, 4); } #else public ArraySegment? GetStarGoalBytes() { return __p.__vector_as_arraysegment(42); } #endif public SCHALE.Common.FlatData.StarGoalType[] GetStarGoalArray() { int o = __p.__offset(42); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.StarGoalType[] a = new SCHALE.Common.FlatData.StarGoalType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.StarGoalType)__p.bb.GetInt(p + i * 4); } return a; } public int StarGoalAmount(int j) { int o = __p.__offset(44); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; } public int StarGoalAmountLength { get { int o = __p.__offset(44); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetStarGoalAmountBytes() { return __p.__vector_as_span(44, 4); } #else public ArraySegment? GetStarGoalAmountBytes() { return __p.__vector_as_arraysegment(44); } #endif public int[] GetStarGoalAmountArray() { return __p.__vector_as_array(44); } public static Offset CreateFieldContentStageExcel(FlatBufferBuilder builder, long Id = 0, long SeasonId = 0, long AreaId = 0, long GroupId = 0, SCHALE.Common.FlatData.StageDifficulty StageDifficulty = SCHALE.Common.FlatData.StageDifficulty.None, long PrevStageId = 0, StringOffset NameOffset = default(StringOffset), long BattleDuration = 0, SCHALE.Common.FlatData.ParcelType StageEnterCostType = SCHALE.Common.FlatData.ParcelType.None, long StageEnterCostId = 0, int StageEnterCostAmount = 0, SCHALE.Common.FlatData.StageTopography StageTopography = SCHALE.Common.FlatData.StageTopography.Street, int RecommandLevel = 0, long GroundID = 0, long BGMId = 0, bool InstantClear = false, long FixedEchelonId = 0, bool SkipFormationSettings = false, bool DailyLastPlay = false, VectorOffset StarGoalOffset = default(VectorOffset), VectorOffset StarGoalAmountOffset = default(VectorOffset)) { builder.StartTable(21); FieldContentStageExcel.AddFixedEchelonId(builder, FixedEchelonId); FieldContentStageExcel.AddBGMId(builder, BGMId); FieldContentStageExcel.AddGroundID(builder, GroundID); FieldContentStageExcel.AddStageEnterCostId(builder, StageEnterCostId); FieldContentStageExcel.AddBattleDuration(builder, BattleDuration); FieldContentStageExcel.AddPrevStageId(builder, PrevStageId); FieldContentStageExcel.AddGroupId(builder, GroupId); FieldContentStageExcel.AddAreaId(builder, AreaId); FieldContentStageExcel.AddSeasonId(builder, SeasonId); FieldContentStageExcel.AddId(builder, Id); FieldContentStageExcel.AddStarGoalAmount(builder, StarGoalAmountOffset); FieldContentStageExcel.AddStarGoal(builder, StarGoalOffset); FieldContentStageExcel.AddRecommandLevel(builder, RecommandLevel); FieldContentStageExcel.AddStageTopography(builder, StageTopography); FieldContentStageExcel.AddStageEnterCostAmount(builder, StageEnterCostAmount); FieldContentStageExcel.AddStageEnterCostType(builder, StageEnterCostType); FieldContentStageExcel.AddName(builder, NameOffset); FieldContentStageExcel.AddStageDifficulty(builder, StageDifficulty); FieldContentStageExcel.AddDailyLastPlay(builder, DailyLastPlay); FieldContentStageExcel.AddSkipFormationSettings(builder, SkipFormationSettings); FieldContentStageExcel.AddInstantClear(builder, InstantClear); return FieldContentStageExcel.EndFieldContentStageExcel(builder); } public static void StartFieldContentStageExcel(FlatBufferBuilder builder) { builder.StartTable(21); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddSeasonId(FlatBufferBuilder builder, long seasonId) { builder.AddLong(1, seasonId, 0); } public static void AddAreaId(FlatBufferBuilder builder, long areaId) { builder.AddLong(2, areaId, 0); } public static void AddGroupId(FlatBufferBuilder builder, long groupId) { builder.AddLong(3, groupId, 0); } public static void AddStageDifficulty(FlatBufferBuilder builder, SCHALE.Common.FlatData.StageDifficulty stageDifficulty) { builder.AddInt(4, (int)stageDifficulty, 0); } public static void AddPrevStageId(FlatBufferBuilder builder, long prevStageId) { builder.AddLong(5, prevStageId, 0); } public static void AddName(FlatBufferBuilder builder, StringOffset nameOffset) { builder.AddOffset(6, nameOffset.Value, 0); } public static void AddBattleDuration(FlatBufferBuilder builder, long battleDuration) { builder.AddLong(7, battleDuration, 0); } public static void AddStageEnterCostType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType stageEnterCostType) { builder.AddInt(8, (int)stageEnterCostType, 0); } public static void AddStageEnterCostId(FlatBufferBuilder builder, long stageEnterCostId) { builder.AddLong(9, stageEnterCostId, 0); } public static void AddStageEnterCostAmount(FlatBufferBuilder builder, int stageEnterCostAmount) { builder.AddInt(10, stageEnterCostAmount, 0); } public static void AddStageTopography(FlatBufferBuilder builder, SCHALE.Common.FlatData.StageTopography stageTopography) { builder.AddInt(11, (int)stageTopography, 0); } public static void AddRecommandLevel(FlatBufferBuilder builder, int recommandLevel) { builder.AddInt(12, recommandLevel, 0); } public static void AddGroundID(FlatBufferBuilder builder, long groundID) { builder.AddLong(13, groundID, 0); } public static void AddBGMId(FlatBufferBuilder builder, long bGMId) { builder.AddLong(14, bGMId, 0); } public static void AddInstantClear(FlatBufferBuilder builder, bool instantClear) { builder.AddBool(15, instantClear, false); } public static void AddFixedEchelonId(FlatBufferBuilder builder, long fixedEchelonId) { builder.AddLong(16, fixedEchelonId, 0); } public static void AddSkipFormationSettings(FlatBufferBuilder builder, bool skipFormationSettings) { builder.AddBool(17, skipFormationSettings, false); } public static void AddDailyLastPlay(FlatBufferBuilder builder, bool dailyLastPlay) { builder.AddBool(18, dailyLastPlay, false); } public static void AddStarGoal(FlatBufferBuilder builder, VectorOffset starGoalOffset) { builder.AddOffset(19, starGoalOffset.Value, 0); } public static VectorOffset CreateStarGoalVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.StarGoalType[] 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 CreateStarGoalVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.StarGoalType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateStarGoalVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateStarGoalVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartStarGoalVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static void AddStarGoalAmount(FlatBufferBuilder builder, VectorOffset starGoalAmountOffset) { builder.AddOffset(20, starGoalAmountOffset.Value, 0); } public static VectorOffset CreateStarGoalAmountVector(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt(data[i]); return builder.EndVector(); } public static VectorOffset CreateStarGoalAmountVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateStarGoalAmountVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateStarGoalAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartStarGoalAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } public static Offset EndFieldContentStageExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public FieldContentStageExcelT UnPack() { var _o = new FieldContentStageExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(FieldContentStageExcelT _o) { byte[] key = TableEncryptionService.CreateKey("FieldContentStage"); _o.Id = TableEncryptionService.Convert(this.Id, key); _o.SeasonId = TableEncryptionService.Convert(this.SeasonId, key); _o.AreaId = TableEncryptionService.Convert(this.AreaId, key); _o.GroupId = TableEncryptionService.Convert(this.GroupId, key); _o.StageDifficulty = TableEncryptionService.Convert(this.StageDifficulty, key); _o.PrevStageId = TableEncryptionService.Convert(this.PrevStageId, key); _o.Name = TableEncryptionService.Convert(this.Name, key); _o.BattleDuration = TableEncryptionService.Convert(this.BattleDuration, key); _o.StageEnterCostType = TableEncryptionService.Convert(this.StageEnterCostType, key); _o.StageEnterCostId = TableEncryptionService.Convert(this.StageEnterCostId, key); _o.StageEnterCostAmount = TableEncryptionService.Convert(this.StageEnterCostAmount, key); _o.StageTopography = TableEncryptionService.Convert(this.StageTopography, key); _o.RecommandLevel = TableEncryptionService.Convert(this.RecommandLevel, key); _o.GroundID = TableEncryptionService.Convert(this.GroundID, key); _o.BGMId = TableEncryptionService.Convert(this.BGMId, key); _o.InstantClear = TableEncryptionService.Convert(this.InstantClear, key); _o.FixedEchelonId = TableEncryptionService.Convert(this.FixedEchelonId, key); _o.SkipFormationSettings = TableEncryptionService.Convert(this.SkipFormationSettings, key); _o.DailyLastPlay = TableEncryptionService.Convert(this.DailyLastPlay, key); _o.StarGoal = new List(); for (var _j = 0; _j < this.StarGoalLength; ++_j) {_o.StarGoal.Add(TableEncryptionService.Convert(this.StarGoal(_j), key));} _o.StarGoalAmount = new List(); for (var _j = 0; _j < this.StarGoalAmountLength; ++_j) {_o.StarGoalAmount.Add(TableEncryptionService.Convert(this.StarGoalAmount(_j), key));} } public static Offset Pack(FlatBufferBuilder builder, FieldContentStageExcelT _o) { if (_o == null) return default(Offset); var _Name = _o.Name == null ? default(StringOffset) : builder.CreateString(_o.Name); var _StarGoal = default(VectorOffset); if (_o.StarGoal != null) { var __StarGoal = _o.StarGoal.ToArray(); _StarGoal = CreateStarGoalVector(builder, __StarGoal); } var _StarGoalAmount = default(VectorOffset); if (_o.StarGoalAmount != null) { var __StarGoalAmount = _o.StarGoalAmount.ToArray(); _StarGoalAmount = CreateStarGoalAmountVector(builder, __StarGoalAmount); } return CreateFieldContentStageExcel( builder, _o.Id, _o.SeasonId, _o.AreaId, _o.GroupId, _o.StageDifficulty, _o.PrevStageId, _Name, _o.BattleDuration, _o.StageEnterCostType, _o.StageEnterCostId, _o.StageEnterCostAmount, _o.StageTopography, _o.RecommandLevel, _o.GroundID, _o.BGMId, _o.InstantClear, _o.FixedEchelonId, _o.SkipFormationSettings, _o.DailyLastPlay, _StarGoal, _StarGoalAmount); } } public class FieldContentStageExcelT { public long Id { get; set; } public long SeasonId { get; set; } public long AreaId { get; set; } public long GroupId { get; set; } public SCHALE.Common.FlatData.StageDifficulty StageDifficulty { get; set; } public long PrevStageId { get; set; } public string Name { get; set; } public long BattleDuration { get; set; } public SCHALE.Common.FlatData.ParcelType StageEnterCostType { get; set; } public long StageEnterCostId { get; set; } public int StageEnterCostAmount { get; set; } public SCHALE.Common.FlatData.StageTopography StageTopography { get; set; } public int RecommandLevel { get; set; } public long GroundID { get; set; } public long BGMId { get; set; } public bool InstantClear { get; set; } public long FixedEchelonId { get; set; } public bool SkipFormationSettings { get; set; } public bool DailyLastPlay { get; set; } public List StarGoal { get; set; } public List StarGoalAmount { get; set; } public FieldContentStageExcelT() { this.Id = 0; this.SeasonId = 0; this.AreaId = 0; this.GroupId = 0; this.StageDifficulty = SCHALE.Common.FlatData.StageDifficulty.None; this.PrevStageId = 0; this.Name = null; this.BattleDuration = 0; this.StageEnterCostType = SCHALE.Common.FlatData.ParcelType.None; this.StageEnterCostId = 0; this.StageEnterCostAmount = 0; this.StageTopography = SCHALE.Common.FlatData.StageTopography.Street; this.RecommandLevel = 0; this.GroundID = 0; this.BGMId = 0; this.InstantClear = false; this.FixedEchelonId = 0; this.SkipFormationSettings = false; this.DailyLastPlay = false; this.StarGoal = null; this.StarGoalAmount = null; } } static public class FieldContentStageExcelVerify { 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 /*SeasonId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 8 /*AreaId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 10 /*GroupId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 12 /*StageDifficulty*/, 4 /*SCHALE.Common.FlatData.StageDifficulty*/, 4, false) && verifier.VerifyField(tablePos, 14 /*PrevStageId*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 16 /*Name*/, false) && verifier.VerifyField(tablePos, 18 /*BattleDuration*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 20 /*StageEnterCostType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false) && verifier.VerifyField(tablePos, 22 /*StageEnterCostId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 24 /*StageEnterCostAmount*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 26 /*StageTopography*/, 4 /*SCHALE.Common.FlatData.StageTopography*/, 4, false) && verifier.VerifyField(tablePos, 28 /*RecommandLevel*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 30 /*GroundID*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 32 /*BGMId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 34 /*InstantClear*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 36 /*FixedEchelonId*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 38 /*SkipFormationSettings*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 40 /*DailyLastPlay*/, 1 /*bool*/, 1, false) && verifier.VerifyVectorOfData(tablePos, 42 /*StarGoal*/, 4 /*SCHALE.Common.FlatData.StarGoalType*/, false) && verifier.VerifyVectorOfData(tablePos, 44 /*StarGoalAmount*/, 4 /*int*/, false) && verifier.VerifyTableEnd(tablePos); } } }