// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::Google.FlatBuffers; public struct CurrencyExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static CurrencyExcel GetRootAsCurrencyExcel(ByteBuffer _bb) { return GetRootAsCurrencyExcel(_bb, new CurrencyExcel()); } public static CurrencyExcel GetRootAsCurrencyExcel(ByteBuffer _bb, CurrencyExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public CurrencyExcel __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 uint LocalizeEtcId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } public SCHALE.Common.FlatData.CurrencyTypes CurrencyType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.CurrencyTypes)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.CurrencyTypes.Invalid; } } public string CurrencyName { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetCurrencyNameBytes() { return __p.__vector_as_span(10, 1); } #else public ArraySegment? GetCurrencyNameBytes() { return __p.__vector_as_arraysegment(10); } #endif public byte[] GetCurrencyNameArray() { return __p.__vector_as_array(10); } public string Icon { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetIconBytes() { return __p.__vector_as_span(12, 1); } #else public ArraySegment? GetIconBytes() { return __p.__vector_as_arraysegment(12); } #endif public byte[] GetIconArray() { return __p.__vector_as_array(12); } public SCHALE.Common.FlatData.Rarity Rarity { get { int o = __p.__offset(14); return o != 0 ? (SCHALE.Common.FlatData.Rarity)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.Rarity.N; } } public int AutoChargeMsc { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int AutoChargeAmount { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public SCHALE.Common.FlatData.CurrencyOverChargeType CurrencyOverChargeType { get { int o = __p.__offset(20); return o != 0 ? (SCHALE.Common.FlatData.CurrencyOverChargeType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.CurrencyOverChargeType.CanNotCharge; } } public SCHALE.Common.FlatData.CurrencyAdditionalChargeType CurrencyAdditionalChargeType { get { int o = __p.__offset(22); return o != 0 ? (SCHALE.Common.FlatData.CurrencyAdditionalChargeType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.CurrencyAdditionalChargeType.EnableAutoChargeOverLimit; } } public long ChargeLimit { get { int o = __p.__offset(24); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long OverChargeLimit { get { int o = __p.__offset(26); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public string SpriteName { get { int o = __p.__offset(28); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } #if ENABLE_SPAN_T public Span GetSpriteNameBytes() { return __p.__vector_as_span(28, 1); } #else public ArraySegment? GetSpriteNameBytes() { return __p.__vector_as_arraysegment(28); } #endif public byte[] GetSpriteNameArray() { return __p.__vector_as_array(28); } public SCHALE.Common.FlatData.DailyRefillType DailyRefillType { get { int o = __p.__offset(30); return o != 0 ? (SCHALE.Common.FlatData.DailyRefillType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.DailyRefillType.None; } } public long DailyRefillAmount { get { int o = __p.__offset(32); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } public long DailyRefillTime(int j) { int o = __p.__offset(34); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } public int DailyRefillTimeLength { get { int o = __p.__offset(34); return o != 0 ? __p.__vector_len(o) : 0; } } #if ENABLE_SPAN_T public Span GetDailyRefillTimeBytes() { return __p.__vector_as_span(34, 8); } #else public ArraySegment? GetDailyRefillTimeBytes() { return __p.__vector_as_arraysegment(34); } #endif public long[] GetDailyRefillTimeArray() { return __p.__vector_as_array(34); } public static Offset CreateCurrencyExcel(FlatBufferBuilder builder, long ID = 0, uint LocalizeEtcId = 0, SCHALE.Common.FlatData.CurrencyTypes CurrencyType = SCHALE.Common.FlatData.CurrencyTypes.Invalid, StringOffset CurrencyNameOffset = default(StringOffset), StringOffset IconOffset = default(StringOffset), SCHALE.Common.FlatData.Rarity Rarity = SCHALE.Common.FlatData.Rarity.N, int AutoChargeMsc = 0, int AutoChargeAmount = 0, SCHALE.Common.FlatData.CurrencyOverChargeType CurrencyOverChargeType = SCHALE.Common.FlatData.CurrencyOverChargeType.CanNotCharge, SCHALE.Common.FlatData.CurrencyAdditionalChargeType CurrencyAdditionalChargeType = SCHALE.Common.FlatData.CurrencyAdditionalChargeType.EnableAutoChargeOverLimit, long ChargeLimit = 0, long OverChargeLimit = 0, StringOffset SpriteNameOffset = default(StringOffset), SCHALE.Common.FlatData.DailyRefillType DailyRefillType = SCHALE.Common.FlatData.DailyRefillType.None, long DailyRefillAmount = 0, VectorOffset DailyRefillTimeOffset = default(VectorOffset)) { builder.StartTable(16); CurrencyExcel.AddDailyRefillAmount(builder, DailyRefillAmount); CurrencyExcel.AddOverChargeLimit(builder, OverChargeLimit); CurrencyExcel.AddChargeLimit(builder, ChargeLimit); CurrencyExcel.AddID(builder, ID); CurrencyExcel.AddDailyRefillTime(builder, DailyRefillTimeOffset); CurrencyExcel.AddDailyRefillType(builder, DailyRefillType); CurrencyExcel.AddSpriteName(builder, SpriteNameOffset); CurrencyExcel.AddCurrencyAdditionalChargeType(builder, CurrencyAdditionalChargeType); CurrencyExcel.AddCurrencyOverChargeType(builder, CurrencyOverChargeType); CurrencyExcel.AddAutoChargeAmount(builder, AutoChargeAmount); CurrencyExcel.AddAutoChargeMsc(builder, AutoChargeMsc); CurrencyExcel.AddRarity(builder, Rarity); CurrencyExcel.AddIcon(builder, IconOffset); CurrencyExcel.AddCurrencyName(builder, CurrencyNameOffset); CurrencyExcel.AddCurrencyType(builder, CurrencyType); CurrencyExcel.AddLocalizeEtcId(builder, LocalizeEtcId); return CurrencyExcel.EndCurrencyExcel(builder); } public static void StartCurrencyExcel(FlatBufferBuilder builder) { builder.StartTable(16); } public static void AddID(FlatBufferBuilder builder, long iD) { builder.AddLong(0, iD, 0); } public static void AddLocalizeEtcId(FlatBufferBuilder builder, uint localizeEtcId) { builder.AddUint(1, localizeEtcId, 0); } public static void AddCurrencyType(FlatBufferBuilder builder, SCHALE.Common.FlatData.CurrencyTypes currencyType) { builder.AddInt(2, (int)currencyType, 0); } public static void AddCurrencyName(FlatBufferBuilder builder, StringOffset currencyNameOffset) { builder.AddOffset(3, currencyNameOffset.Value, 0); } public static void AddIcon(FlatBufferBuilder builder, StringOffset iconOffset) { builder.AddOffset(4, iconOffset.Value, 0); } public static void AddRarity(FlatBufferBuilder builder, SCHALE.Common.FlatData.Rarity rarity) { builder.AddInt(5, (int)rarity, 0); } public static void AddAutoChargeMsc(FlatBufferBuilder builder, int autoChargeMsc) { builder.AddInt(6, autoChargeMsc, 0); } public static void AddAutoChargeAmount(FlatBufferBuilder builder, int autoChargeAmount) { builder.AddInt(7, autoChargeAmount, 0); } public static void AddCurrencyOverChargeType(FlatBufferBuilder builder, SCHALE.Common.FlatData.CurrencyOverChargeType currencyOverChargeType) { builder.AddInt(8, (int)currencyOverChargeType, 0); } public static void AddCurrencyAdditionalChargeType(FlatBufferBuilder builder, SCHALE.Common.FlatData.CurrencyAdditionalChargeType currencyAdditionalChargeType) { builder.AddInt(9, (int)currencyAdditionalChargeType, 0); } public static void AddChargeLimit(FlatBufferBuilder builder, long chargeLimit) { builder.AddLong(10, chargeLimit, 0); } public static void AddOverChargeLimit(FlatBufferBuilder builder, long overChargeLimit) { builder.AddLong(11, overChargeLimit, 0); } public static void AddSpriteName(FlatBufferBuilder builder, StringOffset spriteNameOffset) { builder.AddOffset(12, spriteNameOffset.Value, 0); } public static void AddDailyRefillType(FlatBufferBuilder builder, SCHALE.Common.FlatData.DailyRefillType dailyRefillType) { builder.AddInt(13, (int)dailyRefillType, 0); } public static void AddDailyRefillAmount(FlatBufferBuilder builder, long dailyRefillAmount) { builder.AddLong(14, dailyRefillAmount, 0); } public static void AddDailyRefillTime(FlatBufferBuilder builder, VectorOffset dailyRefillTimeOffset) { builder.AddOffset(15, dailyRefillTimeOffset.Value, 0); } public static VectorOffset CreateDailyRefillTimeVector(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 CreateDailyRefillTimeVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateDailyRefillTimeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); } public static VectorOffset CreateDailyRefillTimeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); } public static void StartDailyRefillTimeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } public static Offset EndCurrencyExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } } static public class CurrencyExcelVerify { 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 /*LocalizeEtcId*/, 4 /*uint*/, 4, false) && verifier.VerifyField(tablePos, 8 /*CurrencyType*/, 4 /*SCHALE.Common.FlatData.CurrencyTypes*/, 4, false) && verifier.VerifyString(tablePos, 10 /*CurrencyName*/, false) && verifier.VerifyString(tablePos, 12 /*Icon*/, false) && verifier.VerifyField(tablePos, 14 /*Rarity*/, 4 /*SCHALE.Common.FlatData.Rarity*/, 4, false) && verifier.VerifyField(tablePos, 16 /*AutoChargeMsc*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 18 /*AutoChargeAmount*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 20 /*CurrencyOverChargeType*/, 4 /*SCHALE.Common.FlatData.CurrencyOverChargeType*/, 4, false) && verifier.VerifyField(tablePos, 22 /*CurrencyAdditionalChargeType*/, 4 /*SCHALE.Common.FlatData.CurrencyAdditionalChargeType*/, 4, false) && verifier.VerifyField(tablePos, 24 /*ChargeLimit*/, 8 /*long*/, 8, false) && verifier.VerifyField(tablePos, 26 /*OverChargeLimit*/, 8 /*long*/, 8, false) && verifier.VerifyString(tablePos, 28 /*SpriteName*/, false) && verifier.VerifyField(tablePos, 30 /*DailyRefillType*/, 4 /*SCHALE.Common.FlatData.DailyRefillType*/, 4, false) && verifier.VerifyField(tablePos, 32 /*DailyRefillAmount*/, 8 /*long*/, 8, false) && verifier.VerifyVectorOfData(tablePos, 34 /*DailyRefillTime*/, 8 /*long*/, false) && verifier.VerifyTableEnd(tablePos); } } }