//
// 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 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 string ExpirationDateTime { get { int o = __p.__offset(36); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span GetExpirationDateTimeBytes() { return __p.__vector_as_span(36, 1); }
#else
public ArraySegment? GetExpirationDateTimeBytes() { return __p.__vector_as_arraysegment(36); }
#endif
public byte[] GetExpirationDateTimeArray() { return __p.__vector_as_array(36); }
public int ExpirationNotifyDateIn { get { int o = __p.__offset(38); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public SCHALE.Common.FlatData.ParcelType ExpiryChangeParcelType { get { int o = __p.__offset(40); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ParcelType.None; } }
public long ExpiryChangeId { get { int o = __p.__offset(42); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long ExpiryChangeAmount { get { int o = __p.__offset(44); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
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),
StringOffset ExpirationDateTimeOffset = default(StringOffset),
int ExpirationNotifyDateIn = 0,
SCHALE.Common.FlatData.ParcelType ExpiryChangeParcelType = SCHALE.Common.FlatData.ParcelType.None,
long ExpiryChangeId = 0,
long ExpiryChangeAmount = 0) {
builder.StartTable(21);
CurrencyExcel.AddExpiryChangeAmount(builder, ExpiryChangeAmount);
CurrencyExcel.AddExpiryChangeId(builder, ExpiryChangeId);
CurrencyExcel.AddDailyRefillAmount(builder, DailyRefillAmount);
CurrencyExcel.AddOverChargeLimit(builder, OverChargeLimit);
CurrencyExcel.AddChargeLimit(builder, ChargeLimit);
CurrencyExcel.AddID(builder, ID);
CurrencyExcel.AddExpiryChangeParcelType(builder, ExpiryChangeParcelType);
CurrencyExcel.AddExpirationNotifyDateIn(builder, ExpirationNotifyDateIn);
CurrencyExcel.AddExpirationDateTime(builder, ExpirationDateTimeOffset);
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(21); }
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 void AddExpirationDateTime(FlatBufferBuilder builder, StringOffset expirationDateTimeOffset) { builder.AddOffset(16, expirationDateTimeOffset.Value, 0); }
public static void AddExpirationNotifyDateIn(FlatBufferBuilder builder, int expirationNotifyDateIn) { builder.AddInt(17, expirationNotifyDateIn, 0); }
public static void AddExpiryChangeParcelType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType expiryChangeParcelType) { builder.AddInt(18, (int)expiryChangeParcelType, 0); }
public static void AddExpiryChangeId(FlatBufferBuilder builder, long expiryChangeId) { builder.AddLong(19, expiryChangeId, 0); }
public static void AddExpiryChangeAmount(FlatBufferBuilder builder, long expiryChangeAmount) { builder.AddLong(20, expiryChangeAmount, 0); }
public static Offset EndCurrencyExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset(o);
}
public CurrencyExcelT UnPack() {
var _o = new CurrencyExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(CurrencyExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("Currency");
_o.ID = TableEncryptionService.Convert(this.ID, key);
_o.LocalizeEtcId = TableEncryptionService.Convert(this.LocalizeEtcId, key);
_o.CurrencyType = TableEncryptionService.Convert(this.CurrencyType, key);
_o.CurrencyName = TableEncryptionService.Convert(this.CurrencyName, key);
_o.Icon = TableEncryptionService.Convert(this.Icon, key);
_o.Rarity = TableEncryptionService.Convert(this.Rarity, key);
_o.AutoChargeMsc = TableEncryptionService.Convert(this.AutoChargeMsc, key);
_o.AutoChargeAmount = TableEncryptionService.Convert(this.AutoChargeAmount, key);
_o.CurrencyOverChargeType = TableEncryptionService.Convert(this.CurrencyOverChargeType, key);
_o.CurrencyAdditionalChargeType = TableEncryptionService.Convert(this.CurrencyAdditionalChargeType, key);
_o.ChargeLimit = TableEncryptionService.Convert(this.ChargeLimit, key);
_o.OverChargeLimit = TableEncryptionService.Convert(this.OverChargeLimit, key);
_o.SpriteName = TableEncryptionService.Convert(this.SpriteName, key);
_o.DailyRefillType = TableEncryptionService.Convert(this.DailyRefillType, key);
_o.DailyRefillAmount = TableEncryptionService.Convert(this.DailyRefillAmount, key);
_o.DailyRefillTime = new List();
for (var _j = 0; _j < this.DailyRefillTimeLength; ++_j) {_o.DailyRefillTime.Add(TableEncryptionService.Convert(this.DailyRefillTime(_j), key));}
_o.ExpirationDateTime = TableEncryptionService.Convert(this.ExpirationDateTime, key);
_o.ExpirationNotifyDateIn = TableEncryptionService.Convert(this.ExpirationNotifyDateIn, key);
_o.ExpiryChangeParcelType = TableEncryptionService.Convert(this.ExpiryChangeParcelType, key);
_o.ExpiryChangeId = TableEncryptionService.Convert(this.ExpiryChangeId, key);
_o.ExpiryChangeAmount = TableEncryptionService.Convert(this.ExpiryChangeAmount, key);
}
public static Offset Pack(FlatBufferBuilder builder, CurrencyExcelT _o) {
if (_o == null) return default(Offset);
var _CurrencyName = _o.CurrencyName == null ? default(StringOffset) : builder.CreateString(_o.CurrencyName);
var _Icon = _o.Icon == null ? default(StringOffset) : builder.CreateString(_o.Icon);
var _SpriteName = _o.SpriteName == null ? default(StringOffset) : builder.CreateString(_o.SpriteName);
var _DailyRefillTime = default(VectorOffset);
if (_o.DailyRefillTime != null) {
var __DailyRefillTime = _o.DailyRefillTime.ToArray();
_DailyRefillTime = CreateDailyRefillTimeVector(builder, __DailyRefillTime);
}
var _ExpirationDateTime = _o.ExpirationDateTime == null ? default(StringOffset) : builder.CreateString(_o.ExpirationDateTime);
return CreateCurrencyExcel(
builder,
_o.ID,
_o.LocalizeEtcId,
_o.CurrencyType,
_CurrencyName,
_Icon,
_o.Rarity,
_o.AutoChargeMsc,
_o.AutoChargeAmount,
_o.CurrencyOverChargeType,
_o.CurrencyAdditionalChargeType,
_o.ChargeLimit,
_o.OverChargeLimit,
_SpriteName,
_o.DailyRefillType,
_o.DailyRefillAmount,
_DailyRefillTime,
_ExpirationDateTime,
_o.ExpirationNotifyDateIn,
_o.ExpiryChangeParcelType,
_o.ExpiryChangeId,
_o.ExpiryChangeAmount);
}
}
public class CurrencyExcelT
{
public long ID { get; set; }
public uint LocalizeEtcId { get; set; }
public SCHALE.Common.FlatData.CurrencyTypes CurrencyType { get; set; }
public string CurrencyName { get; set; }
public string Icon { get; set; }
public SCHALE.Common.FlatData.Rarity Rarity { get; set; }
public int AutoChargeMsc { get; set; }
public int AutoChargeAmount { get; set; }
public SCHALE.Common.FlatData.CurrencyOverChargeType CurrencyOverChargeType { get; set; }
public SCHALE.Common.FlatData.CurrencyAdditionalChargeType CurrencyAdditionalChargeType { get; set; }
public long ChargeLimit { get; set; }
public long OverChargeLimit { get; set; }
public string SpriteName { get; set; }
public SCHALE.Common.FlatData.DailyRefillType DailyRefillType { get; set; }
public long DailyRefillAmount { get; set; }
public List DailyRefillTime { get; set; }
public string ExpirationDateTime { get; set; }
public int ExpirationNotifyDateIn { get; set; }
public SCHALE.Common.FlatData.ParcelType ExpiryChangeParcelType { get; set; }
public long ExpiryChangeId { get; set; }
public long ExpiryChangeAmount { get; set; }
public CurrencyExcelT() {
this.ID = 0;
this.LocalizeEtcId = 0;
this.CurrencyType = SCHALE.Common.FlatData.CurrencyTypes.Invalid;
this.CurrencyName = null;
this.Icon = null;
this.Rarity = SCHALE.Common.FlatData.Rarity.N;
this.AutoChargeMsc = 0;
this.AutoChargeAmount = 0;
this.CurrencyOverChargeType = SCHALE.Common.FlatData.CurrencyOverChargeType.CanNotCharge;
this.CurrencyAdditionalChargeType = SCHALE.Common.FlatData.CurrencyAdditionalChargeType.EnableAutoChargeOverLimit;
this.ChargeLimit = 0;
this.OverChargeLimit = 0;
this.SpriteName = null;
this.DailyRefillType = SCHALE.Common.FlatData.DailyRefillType.None;
this.DailyRefillAmount = 0;
this.DailyRefillTime = null;
this.ExpirationDateTime = null;
this.ExpirationNotifyDateIn = 0;
this.ExpiryChangeParcelType = SCHALE.Common.FlatData.ParcelType.None;
this.ExpiryChangeId = 0;
this.ExpiryChangeAmount = 0;
}
}
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.VerifyString(tablePos, 36 /*ExpirationDateTime*/, false)
&& verifier.VerifyField(tablePos, 38 /*ExpirationNotifyDateIn*/, 4 /*int*/, 4, false)
&& verifier.VerifyField(tablePos, 40 /*ExpiryChangeParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false)
&& verifier.VerifyField(tablePos, 42 /*ExpiryChangeId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 44 /*ExpiryChangeAmount*/, 8 /*long*/, 8, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}