//
// 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 FavorLevelRewardExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static FavorLevelRewardExcel GetRootAsFavorLevelRewardExcel(ByteBuffer _bb) { return GetRootAsFavorLevelRewardExcel(_bb, new FavorLevelRewardExcel()); }
public static FavorLevelRewardExcel GetRootAsFavorLevelRewardExcel(ByteBuffer _bb, FavorLevelRewardExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public FavorLevelRewardExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public long CharacterId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long FavorLevel { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public SCHALE.Common.FlatData.EquipmentOptionType StatType(int j) { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.EquipmentOptionType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.EquipmentOptionType)0; }
public int StatTypeLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span GetStatTypeBytes() { return __p.__vector_as_span(8, 4); }
#else
public ArraySegment? GetStatTypeBytes() { return __p.__vector_as_arraysegment(8); }
#endif
public SCHALE.Common.FlatData.EquipmentOptionType[] GetStatTypeArray() { int o = __p.__offset(8); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.EquipmentOptionType[] a = new SCHALE.Common.FlatData.EquipmentOptionType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.EquipmentOptionType)__p.bb.GetInt(p + i * 4); } return a; }
public long StatValue(int j) { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int StatValueLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span GetStatValueBytes() { return __p.__vector_as_span(10, 8); }
#else
public ArraySegment? GetStatValueBytes() { return __p.__vector_as_arraysegment(10); }
#endif
public long[] GetStatValueArray() { return __p.__vector_as_array(10); }
public SCHALE.Common.FlatData.ParcelType RewardParcelType(int j) { int o = __p.__offset(12); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.ParcelType)0; }
public int RewardParcelTypeLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span GetRewardParcelTypeBytes() { return __p.__vector_as_span(12, 4); }
#else
public ArraySegment? GetRewardParcelTypeBytes() { return __p.__vector_as_arraysegment(12); }
#endif
public SCHALE.Common.FlatData.ParcelType[] GetRewardParcelTypeArray() { int o = __p.__offset(12); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.ParcelType[] a = new SCHALE.Common.FlatData.ParcelType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(p + i * 4); } return a; }
public long RewardParcelId(int j) { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int RewardParcelIdLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span GetRewardParcelIdBytes() { return __p.__vector_as_span(14, 8); }
#else
public ArraySegment? GetRewardParcelIdBytes() { return __p.__vector_as_arraysegment(14); }
#endif
public long[] GetRewardParcelIdArray() { return __p.__vector_as_array(14); }
public long RewardAmount(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int RewardAmountLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span GetRewardAmountBytes() { return __p.__vector_as_span(16, 8); }
#else
public ArraySegment? GetRewardAmountBytes() { return __p.__vector_as_arraysegment(16); }
#endif
public long[] GetRewardAmountArray() { return __p.__vector_as_array(16); }
public static Offset CreateFavorLevelRewardExcel(FlatBufferBuilder builder,
long CharacterId = 0,
long FavorLevel = 0,
VectorOffset StatTypeOffset = default(VectorOffset),
VectorOffset StatValueOffset = default(VectorOffset),
VectorOffset RewardParcelTypeOffset = default(VectorOffset),
VectorOffset RewardParcelIdOffset = default(VectorOffset),
VectorOffset RewardAmountOffset = default(VectorOffset)) {
builder.StartTable(7);
FavorLevelRewardExcel.AddFavorLevel(builder, FavorLevel);
FavorLevelRewardExcel.AddCharacterId(builder, CharacterId);
FavorLevelRewardExcel.AddRewardAmount(builder, RewardAmountOffset);
FavorLevelRewardExcel.AddRewardParcelId(builder, RewardParcelIdOffset);
FavorLevelRewardExcel.AddRewardParcelType(builder, RewardParcelTypeOffset);
FavorLevelRewardExcel.AddStatValue(builder, StatValueOffset);
FavorLevelRewardExcel.AddStatType(builder, StatTypeOffset);
return FavorLevelRewardExcel.EndFavorLevelRewardExcel(builder);
}
public static void StartFavorLevelRewardExcel(FlatBufferBuilder builder) { builder.StartTable(7); }
public static void AddCharacterId(FlatBufferBuilder builder, long characterId) { builder.AddLong(0, characterId, 0); }
public static void AddFavorLevel(FlatBufferBuilder builder, long favorLevel) { builder.AddLong(1, favorLevel, 0); }
public static void AddStatType(FlatBufferBuilder builder, VectorOffset statTypeOffset) { builder.AddOffset(2, statTypeOffset.Value, 0); }
public static VectorOffset CreateStatTypeVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.EquipmentOptionType[] 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 CreateStatTypeVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.EquipmentOptionType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateStatTypeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateStatTypeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartStatTypeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddStatValue(FlatBufferBuilder builder, VectorOffset statValueOffset) { builder.AddOffset(3, statValueOffset.Value, 0); }
public static VectorOffset CreateStatValueVector(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 CreateStatValueVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateStatValueVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateStatValueVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartStatValueVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddRewardParcelType(FlatBufferBuilder builder, VectorOffset rewardParcelTypeOffset) { builder.AddOffset(4, rewardParcelTypeOffset.Value, 0); }
public static VectorOffset CreateRewardParcelTypeVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] 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 CreateRewardParcelTypeVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelTypeVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelTypeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRewardParcelTypeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddRewardParcelId(FlatBufferBuilder builder, VectorOffset rewardParcelIdOffset) { builder.AddOffset(5, rewardParcelIdOffset.Value, 0); }
public static VectorOffset CreateRewardParcelIdVector(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 CreateRewardParcelIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelIdVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardParcelIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRewardParcelIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddRewardAmount(FlatBufferBuilder builder, VectorOffset rewardAmountOffset) { builder.AddOffset(6, rewardAmountOffset.Value, 0); }
public static VectorOffset CreateRewardAmountVector(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 CreateRewardAmountVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardAmountVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRewardAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static Offset EndFavorLevelRewardExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset(o);
}
}
static public class FavorLevelRewardExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*CharacterId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 6 /*FavorLevel*/, 8 /*long*/, 8, false)
&& verifier.VerifyVectorOfData(tablePos, 8 /*StatType*/, 4 /*SCHALE.Common.FlatData.EquipmentOptionType*/, false)
&& verifier.VerifyVectorOfData(tablePos, 10 /*StatValue*/, 8 /*long*/, false)
&& verifier.VerifyVectorOfData(tablePos, 12 /*RewardParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false)
&& verifier.VerifyVectorOfData(tablePos, 14 /*RewardParcelId*/, 8 /*long*/, false)
&& verifier.VerifyVectorOfData(tablePos, 16 /*RewardAmount*/, 8 /*long*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}