// // 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 MinigameTBGItemExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static MinigameTBGItemExcel GetRootAsMinigameTBGItemExcel(ByteBuffer _bb) { return GetRootAsMinigameTBGItemExcel(_bb, new MinigameTBGItemExcel()); } public static MinigameTBGItemExcel GetRootAsMinigameTBGItemExcel(ByteBuffer _bb, MinigameTBGItemExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public MinigameTBGItemExcel __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 SCHALE.Common.FlatData.TBGItemType ItemType { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.TBGItemType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.TBGItemType.None; } } public SCHALE.Common.FlatData.TBGItemEffectType TBGItemEffectType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.TBGItemEffectType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.TBGItemEffectType.None; } } public int ItemParameter { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public string LocalizeETCId { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetLocalizeETCIdBytes() { return __p.__vector_as_span(12, 1); } #else public ArraySegment? GetLocalizeETCIdBytes() { return __p.__vector_as_arraysegment(12); } #endif public byte[] GetLocalizeETCIdArray() { return __p.__vector_as_array(12); } public string Icon { get { int o = __p.__offset(14); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetIconBytes() { return __p.__vector_as_span(14, 1); } #else public ArraySegment? GetIconBytes() { return __p.__vector_as_arraysegment(14); } #endif public byte[] GetIconArray() { return __p.__vector_as_array(14); } public string BuffIcon { get { int o = __p.__offset(16); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetBuffIconBytes() { return __p.__vector_as_span(16, 1); } #else public ArraySegment? GetBuffIconBytes() { return __p.__vector_as_arraysegment(16); } #endif public byte[] GetBuffIconArray() { return __p.__vector_as_array(16); } public int EncounterCount { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public string DiceEffectAniClip { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetDiceEffectAniClipBytes() { return __p.__vector_as_span(20, 1); } #else public ArraySegment? GetDiceEffectAniClipBytes() { return __p.__vector_as_arraysegment(20); } #endif public byte[] GetDiceEffectAniClipArray() { return __p.__vector_as_array(20); } public bool BuffIconHUDVisible { get { int o = __p.__offset(22); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public static Offset CreateMinigameTBGItemExcel(FlatBufferBuilder builder, long UniqueId = 0, SCHALE.Common.FlatData.TBGItemType ItemType = SCHALE.Common.FlatData.TBGItemType.None, SCHALE.Common.FlatData.TBGItemEffectType TBGItemEffectType = SCHALE.Common.FlatData.TBGItemEffectType.None, int ItemParameter = 0, StringOffset LocalizeETCIdOffset = default(StringOffset), StringOffset IconOffset = default(StringOffset), StringOffset BuffIconOffset = default(StringOffset), int EncounterCount = 0, StringOffset DiceEffectAniClipOffset = default(StringOffset), bool BuffIconHUDVisible = false) { builder.StartTable(10); MinigameTBGItemExcel.AddUniqueId(builder, UniqueId); MinigameTBGItemExcel.AddDiceEffectAniClip(builder, DiceEffectAniClipOffset); MinigameTBGItemExcel.AddEncounterCount(builder, EncounterCount); MinigameTBGItemExcel.AddBuffIcon(builder, BuffIconOffset); MinigameTBGItemExcel.AddIcon(builder, IconOffset); MinigameTBGItemExcel.AddLocalizeETCId(builder, LocalizeETCIdOffset); MinigameTBGItemExcel.AddItemParameter(builder, ItemParameter); MinigameTBGItemExcel.AddTBGItemEffectType(builder, TBGItemEffectType); MinigameTBGItemExcel.AddItemType(builder, ItemType); MinigameTBGItemExcel.AddBuffIconHUDVisible(builder, BuffIconHUDVisible); return MinigameTBGItemExcel.EndMinigameTBGItemExcel(builder); } public static void StartMinigameTBGItemExcel(FlatBufferBuilder builder) { builder.StartTable(10); } public static void AddUniqueId(FlatBufferBuilder builder, long uniqueId) { builder.AddLong(0, uniqueId, 0); } public static void AddItemType(FlatBufferBuilder builder, SCHALE.Common.FlatData.TBGItemType itemType) { builder.AddInt(1, (int)itemType, 0); } public static void AddTBGItemEffectType(FlatBufferBuilder builder, SCHALE.Common.FlatData.TBGItemEffectType tBGItemEffectType) { builder.AddInt(2, (int)tBGItemEffectType, 0); } public static void AddItemParameter(FlatBufferBuilder builder, int itemParameter) { builder.AddInt(3, itemParameter, 0); } public static void AddLocalizeETCId(FlatBufferBuilder builder, StringOffset localizeETCIdOffset) { builder.AddOffset(4, localizeETCIdOffset.Value, 0); } public static void AddIcon(FlatBufferBuilder builder, StringOffset iconOffset) { builder.AddOffset(5, iconOffset.Value, 0); } public static void AddBuffIcon(FlatBufferBuilder builder, StringOffset buffIconOffset) { builder.AddOffset(6, buffIconOffset.Value, 0); } public static void AddEncounterCount(FlatBufferBuilder builder, int encounterCount) { builder.AddInt(7, encounterCount, 0); } public static void AddDiceEffectAniClip(FlatBufferBuilder builder, StringOffset diceEffectAniClipOffset) { builder.AddOffset(8, diceEffectAniClipOffset.Value, 0); } public static void AddBuffIconHUDVisible(FlatBufferBuilder builder, bool buffIconHUDVisible) { builder.AddBool(9, buffIconHUDVisible, false); } public static Offset EndMinigameTBGItemExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public MinigameTBGItemExcelT UnPack() { var _o = new MinigameTBGItemExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(MinigameTBGItemExcelT _o) { byte[] key = TableEncryptionService.CreateKey("MinigameTBGItem"); _o.UniqueId = TableEncryptionService.Convert(this.UniqueId, key); _o.ItemType = TableEncryptionService.Convert(this.ItemType, key); _o.TBGItemEffectType = TableEncryptionService.Convert(this.TBGItemEffectType, key); _o.ItemParameter = TableEncryptionService.Convert(this.ItemParameter, key); _o.LocalizeETCId = TableEncryptionService.Convert(this.LocalizeETCId, key); _o.Icon = TableEncryptionService.Convert(this.Icon, key); _o.BuffIcon = TableEncryptionService.Convert(this.BuffIcon, key); _o.EncounterCount = TableEncryptionService.Convert(this.EncounterCount, key); _o.DiceEffectAniClip = TableEncryptionService.Convert(this.DiceEffectAniClip, key); _o.BuffIconHUDVisible = TableEncryptionService.Convert(this.BuffIconHUDVisible, key); } public static Offset Pack(FlatBufferBuilder builder, MinigameTBGItemExcelT _o) { if (_o == null) return default(Offset); var _LocalizeETCId = _o.LocalizeETCId == null ? default(StringOffset) : builder.CreateString(_o.LocalizeETCId); var _Icon = _o.Icon == null ? default(StringOffset) : builder.CreateString(_o.Icon); var _BuffIcon = _o.BuffIcon == null ? default(StringOffset) : builder.CreateString(_o.BuffIcon); var _DiceEffectAniClip = _o.DiceEffectAniClip == null ? default(StringOffset) : builder.CreateString(_o.DiceEffectAniClip); return CreateMinigameTBGItemExcel( builder, _o.UniqueId, _o.ItemType, _o.TBGItemEffectType, _o.ItemParameter, _LocalizeETCId, _Icon, _BuffIcon, _o.EncounterCount, _DiceEffectAniClip, _o.BuffIconHUDVisible); } } public class MinigameTBGItemExcelT { public long UniqueId { get; set; } public SCHALE.Common.FlatData.TBGItemType ItemType { get; set; } public SCHALE.Common.FlatData.TBGItemEffectType TBGItemEffectType { get; set; } public int ItemParameter { get; set; } public string LocalizeETCId { get; set; } public string Icon { get; set; } public string BuffIcon { get; set; } public int EncounterCount { get; set; } public string DiceEffectAniClip { get; set; } public bool BuffIconHUDVisible { get; set; } public MinigameTBGItemExcelT() { this.UniqueId = 0; this.ItemType = SCHALE.Common.FlatData.TBGItemType.None; this.TBGItemEffectType = SCHALE.Common.FlatData.TBGItemEffectType.None; this.ItemParameter = 0; this.LocalizeETCId = null; this.Icon = null; this.BuffIcon = null; this.EncounterCount = 0; this.DiceEffectAniClip = null; this.BuffIconHUDVisible = false; } } static public class MinigameTBGItemExcelVerify { 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 /*ItemType*/, 4 /*SCHALE.Common.FlatData.TBGItemType*/, 4, false) && verifier.VerifyField(tablePos, 8 /*TBGItemEffectType*/, 4 /*SCHALE.Common.FlatData.TBGItemEffectType*/, 4, false) && verifier.VerifyField(tablePos, 10 /*ItemParameter*/, 4 /*int*/, 4, false) && verifier.VerifyString(tablePos, 12 /*LocalizeETCId*/, false) && verifier.VerifyString(tablePos, 14 /*Icon*/, false) && verifier.VerifyString(tablePos, 16 /*BuffIcon*/, false) && verifier.VerifyField(tablePos, 18 /*EncounterCount*/, 4 /*int*/, 4, false) && verifier.VerifyString(tablePos, 20 /*DiceEffectAniClip*/, false) && verifier.VerifyField(tablePos, 22 /*BuffIconHUDVisible*/, 1 /*bool*/, 1, false) && verifier.VerifyTableEnd(tablePos); } } }