SCHALE.GameServer/SCHALE.Common/FlatData/CharacterPotentialRewardExc...

100 lines
8.6 KiB
C#

// <auto-generated>
// automatically generated by the FlatBuffers compiler, do not modify
// </auto-generated>
namespace SCHALE.Common.FlatData
{
using global::System;
using global::System.Collections.Generic;
using global::Google.FlatBuffers;
public struct CharacterPotentialRewardExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static CharacterPotentialRewardExcel GetRootAsCharacterPotentialRewardExcel(ByteBuffer _bb) { return GetRootAsCharacterPotentialRewardExcel(_bb, new CharacterPotentialRewardExcel()); }
public static CharacterPotentialRewardExcel GetRootAsCharacterPotentialRewardExcel(ByteBuffer _bb, CharacterPotentialRewardExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public CharacterPotentialRewardExcel __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.PotentialStatBonusRateType RequirePotentialStatType(int j) { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.PotentialStatBonusRateType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.PotentialStatBonusRateType)0; }
public int RequirePotentialStatTypeLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<SCHALE.Common.FlatData.PotentialStatBonusRateType> GetRequirePotentialStatTypeBytes() { return __p.__vector_as_span<SCHALE.Common.FlatData.PotentialStatBonusRateType>(6, 4); }
#else
public ArraySegment<byte>? GetRequirePotentialStatTypeBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public SCHALE.Common.FlatData.PotentialStatBonusRateType[] GetRequirePotentialStatTypeArray() { int o = __p.__offset(6); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.PotentialStatBonusRateType[] a = new SCHALE.Common.FlatData.PotentialStatBonusRateType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.PotentialStatBonusRateType)__p.bb.GetInt(p + i * 4); } return a; }
public long RequirePotentialStatLevel(int j) { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int RequirePotentialStatLevelLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<long> GetRequirePotentialStatLevelBytes() { return __p.__vector_as_span<long>(8, 8); }
#else
public ArraySegment<byte>? GetRequirePotentialStatLevelBytes() { return __p.__vector_as_arraysegment(8); }
#endif
public long[] GetRequirePotentialStatLevelArray() { return __p.__vector_as_array<long>(8); }
public SCHALE.Common.FlatData.ParcelType RewardParcelType { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ParcelType.None; } }
public long RewardId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public int RewardAmount { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public static Offset<SCHALE.Common.FlatData.CharacterPotentialRewardExcel> CreateCharacterPotentialRewardExcel(FlatBufferBuilder builder,
long Id = 0,
VectorOffset RequirePotentialStatTypeOffset = default(VectorOffset),
VectorOffset RequirePotentialStatLevelOffset = default(VectorOffset),
SCHALE.Common.FlatData.ParcelType RewardParcelType = SCHALE.Common.FlatData.ParcelType.None,
long RewardId = 0,
int RewardAmount = 0) {
builder.StartTable(6);
CharacterPotentialRewardExcel.AddRewardId(builder, RewardId);
CharacterPotentialRewardExcel.AddId(builder, Id);
CharacterPotentialRewardExcel.AddRewardAmount(builder, RewardAmount);
CharacterPotentialRewardExcel.AddRewardParcelType(builder, RewardParcelType);
CharacterPotentialRewardExcel.AddRequirePotentialStatLevel(builder, RequirePotentialStatLevelOffset);
CharacterPotentialRewardExcel.AddRequirePotentialStatType(builder, RequirePotentialStatTypeOffset);
return CharacterPotentialRewardExcel.EndCharacterPotentialRewardExcel(builder);
}
public static void StartCharacterPotentialRewardExcel(FlatBufferBuilder builder) { builder.StartTable(6); }
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); }
public static void AddRequirePotentialStatType(FlatBufferBuilder builder, VectorOffset requirePotentialStatTypeOffset) { builder.AddOffset(1, requirePotentialStatTypeOffset.Value, 0); }
public static VectorOffset CreateRequirePotentialStatTypeVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.PotentialStatBonusRateType[] 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 CreateRequirePotentialStatTypeVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.PotentialStatBonusRateType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRequirePotentialStatTypeVectorBlock(FlatBufferBuilder builder, ArraySegment<SCHALE.Common.FlatData.PotentialStatBonusRateType> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRequirePotentialStatTypeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<SCHALE.Common.FlatData.PotentialStatBonusRateType>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRequirePotentialStatTypeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddRequirePotentialStatLevel(FlatBufferBuilder builder, VectorOffset requirePotentialStatLevelOffset) { builder.AddOffset(2, requirePotentialStatLevelOffset.Value, 0); }
public static VectorOffset CreateRequirePotentialStatLevelVector(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 CreateRequirePotentialStatLevelVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRequirePotentialStatLevelVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRequirePotentialStatLevelVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRequirePotentialStatLevelVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddRewardParcelType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType rewardParcelType) { builder.AddInt(3, (int)rewardParcelType, 0); }
public static void AddRewardId(FlatBufferBuilder builder, long rewardId) { builder.AddLong(4, rewardId, 0); }
public static void AddRewardAmount(FlatBufferBuilder builder, int rewardAmount) { builder.AddInt(5, rewardAmount, 0); }
public static Offset<SCHALE.Common.FlatData.CharacterPotentialRewardExcel> EndCharacterPotentialRewardExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.CharacterPotentialRewardExcel>(o);
}
}
static public class CharacterPotentialRewardExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false)
&& verifier.VerifyVectorOfData(tablePos, 6 /*RequirePotentialStatType*/, 4 /*SCHALE.Common.FlatData.PotentialStatBonusRateType*/, false)
&& verifier.VerifyVectorOfData(tablePos, 8 /*RequirePotentialStatLevel*/, 8 /*long*/, false)
&& verifier.VerifyField(tablePos, 10 /*RewardParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false)
&& verifier.VerifyField(tablePos, 12 /*RewardId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 14 /*RewardAmount*/, 4 /*int*/, 4, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}