// // 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 IdCardBackgroundExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static IdCardBackgroundExcel GetRootAsIdCardBackgroundExcel(ByteBuffer _bb) { return GetRootAsIdCardBackgroundExcel(_bb, new IdCardBackgroundExcel()); } public static IdCardBackgroundExcel GetRootAsIdCardBackgroundExcel(ByteBuffer _bb, IdCardBackgroundExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public IdCardBackgroundExcel __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 SCHALE.Common.FlatData.Rarity Rarity_ { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.Rarity)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.Rarity.N; } } public long DisplayOrder { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public bool CollectionVisible { get { int o = __p.__offset(10); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public bool IsDefault { get { int o = __p.__offset(12); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } public string BgPath { get { int o = __p.__offset(14); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetBgPathBytes() { return __p.__vector_as_span(14, 1); } #else public ArraySegment? GetBgPathBytes() { return __p.__vector_as_arraysegment(14); } #endif public byte[] GetBgPathArray() { return __p.__vector_as_array(14); } public uint LocalizeEtcId { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public string Icon { get { int o = __p.__offset(18); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetIconBytes() { return __p.__vector_as_span(18, 1); } #else public ArraySegment? GetIconBytes() { return __p.__vector_as_arraysegment(18); } #endif public byte[] GetIconArray() { return __p.__vector_as_array(18); } public static Offset CreateIdCardBackgroundExcel(FlatBufferBuilder builder, long Id = 0, SCHALE.Common.FlatData.Rarity Rarity_ = SCHALE.Common.FlatData.Rarity.N, long DisplayOrder = 0, bool CollectionVisible = false, bool IsDefault = false, StringOffset BgPathOffset = default(StringOffset), uint LocalizeEtcId = 0, StringOffset IconOffset = default(StringOffset)) { builder.StartTable(8); IdCardBackgroundExcel.AddDisplayOrder(builder, DisplayOrder); IdCardBackgroundExcel.AddId(builder, Id); IdCardBackgroundExcel.AddIcon(builder, IconOffset); IdCardBackgroundExcel.AddLocalizeEtcId(builder, LocalizeEtcId); IdCardBackgroundExcel.AddBgPath(builder, BgPathOffset); IdCardBackgroundExcel.AddRarity_(builder, Rarity_); IdCardBackgroundExcel.AddIsDefault(builder, IsDefault); IdCardBackgroundExcel.AddCollectionVisible(builder, CollectionVisible); return IdCardBackgroundExcel.EndIdCardBackgroundExcel(builder); } public static void StartIdCardBackgroundExcel(FlatBufferBuilder builder) { builder.StartTable(8); } public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } public static void AddRarity_(FlatBufferBuilder builder, SCHALE.Common.FlatData.Rarity rarity_) { builder.AddInt(1, (int)rarity_, 0); } public static void AddDisplayOrder(FlatBufferBuilder builder, long displayOrder) { builder.AddLong(2, displayOrder, 0); } public static void AddCollectionVisible(FlatBufferBuilder builder, bool collectionVisible) { builder.AddBool(3, collectionVisible, false); } public static void AddIsDefault(FlatBufferBuilder builder, bool isDefault) { builder.AddBool(4, isDefault, false); } public static void AddBgPath(FlatBufferBuilder builder, StringOffset bgPathOffset) { builder.AddOffset(5, bgPathOffset.Value, 0); } public static void AddLocalizeEtcId(FlatBufferBuilder builder, uint localizeEtcId) { builder.AddUint(6, localizeEtcId, 0); } public static void AddIcon(FlatBufferBuilder builder, StringOffset iconOffset) { builder.AddOffset(7, iconOffset.Value, 0); } public static Offset EndIdCardBackgroundExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public IdCardBackgroundExcelT UnPack() { var _o = new IdCardBackgroundExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(IdCardBackgroundExcelT _o) { byte[] key = TableEncryptionService.CreateKey("IdCardBackground"); _o.Id = TableEncryptionService.Convert(this.Id, key); _o.Rarity_ = TableEncryptionService.Convert(this.Rarity_, key); _o.DisplayOrder = TableEncryptionService.Convert(this.DisplayOrder, key); _o.CollectionVisible = TableEncryptionService.Convert(this.CollectionVisible, key); _o.IsDefault = TableEncryptionService.Convert(this.IsDefault, key); _o.BgPath = TableEncryptionService.Convert(this.BgPath, key); _o.LocalizeEtcId = TableEncryptionService.Convert(this.LocalizeEtcId, key); _o.Icon = TableEncryptionService.Convert(this.Icon, key); } public static Offset Pack(FlatBufferBuilder builder, IdCardBackgroundExcelT _o) { if (_o == null) return default(Offset); var _BgPath = _o.BgPath == null ? default(StringOffset) : builder.CreateString(_o.BgPath); var _Icon = _o.Icon == null ? default(StringOffset) : builder.CreateString(_o.Icon); return CreateIdCardBackgroundExcel( builder, _o.Id, _o.Rarity_, _o.DisplayOrder, _o.CollectionVisible, _o.IsDefault, _BgPath, _o.LocalizeEtcId, _Icon); } } public class IdCardBackgroundExcelT { public long Id { get; set; } public SCHALE.Common.FlatData.Rarity Rarity_ { get; set; } public long DisplayOrder { get; set; } public bool CollectionVisible { get; set; } public bool IsDefault { get; set; } public string BgPath { get; set; } public uint LocalizeEtcId { get; set; } public string Icon { get; set; } public IdCardBackgroundExcelT() { this.Id = 0; this.Rarity_ = SCHALE.Common.FlatData.Rarity.N; this.DisplayOrder = 0; this.CollectionVisible = false; this.IsDefault = false; this.BgPath = null; this.LocalizeEtcId = 0; this.Icon = null; } } static public class IdCardBackgroundExcelVerify { 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 /*Rarity_*/, 4 /*SCHALE.Common.FlatData.Rarity*/, 4, false) && verifier.VerifyField(tablePos, 8 /*DisplayOrder*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 10 /*CollectionVisible*/, 1 /*bool*/, 1, false) && verifier.VerifyField(tablePos, 12 /*IsDefault*/, 1 /*bool*/, 1, false) && verifier.VerifyString(tablePos, 14 /*BgPath*/, false) && verifier.VerifyField(tablePos, 16 /*LocalizeEtcId*/, 4 /*uint*/, 4, false) && verifier.VerifyString(tablePos, 18 /*Icon*/, false) && verifier.VerifyTableEnd(tablePos); } } }