forked from Raphael/SCHALE.GameServer
229 lines
16 KiB
C#
229 lines
16 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::SCHALE.Common.Crypto;
|
|
using global::Google.FlatBuffers;
|
|
|
|
public struct EventContentCardShopExcel : IFlatbufferObject
|
|
{
|
|
private Table __p;
|
|
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
|
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
|
|
public static EventContentCardShopExcel GetRootAsEventContentCardShopExcel(ByteBuffer _bb) { return GetRootAsEventContentCardShopExcel(_bb, new EventContentCardShopExcel()); }
|
|
public static EventContentCardShopExcel GetRootAsEventContentCardShopExcel(ByteBuffer _bb, EventContentCardShopExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
|
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
|
|
public EventContentCardShopExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
|
|
|
public long EventContentId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
public long Id { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
public SCHALE.Common.FlatData.Rarity Rarity_ { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.Rarity)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.Rarity.N; } }
|
|
public long CostGoodsId { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
public int CardGroupId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
|
public bool IsLegacy { get { int o = __p.__offset(14); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
|
|
public int RefreshGroup { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
|
public int Prob { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
|
public int ProbWeight1 { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
|
public SCHALE.Common.FlatData.ParcelType RewardParcelType(int j) { int o = __p.__offset(22); 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(22); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<SCHALE.Common.FlatData.ParcelType> GetRewardParcelTypeBytes() { return __p.__vector_as_span<SCHALE.Common.FlatData.ParcelType>(22, 4); }
|
|
#else
|
|
public ArraySegment<byte>? GetRewardParcelTypeBytes() { return __p.__vector_as_arraysegment(22); }
|
|
#endif
|
|
public SCHALE.Common.FlatData.ParcelType[] GetRewardParcelTypeArray() { int o = __p.__offset(22); 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(24); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
|
|
public int RewardParcelIdLength { get { int o = __p.__offset(24); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<long> GetRewardParcelIdBytes() { return __p.__vector_as_span<long>(24, 8); }
|
|
#else
|
|
public ArraySegment<byte>? GetRewardParcelIdBytes() { return __p.__vector_as_arraysegment(24); }
|
|
#endif
|
|
public long[] GetRewardParcelIdArray() { return __p.__vector_as_array<long>(24); }
|
|
public long RewardParcelAmount(int j) { int o = __p.__offset(26); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
|
|
public int RewardParcelAmountLength { get { int o = __p.__offset(26); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<long> GetRewardParcelAmountBytes() { return __p.__vector_as_span<long>(26, 8); }
|
|
#else
|
|
public ArraySegment<byte>? GetRewardParcelAmountBytes() { return __p.__vector_as_arraysegment(26); }
|
|
#endif
|
|
public long[] GetRewardParcelAmountArray() { return __p.__vector_as_array<long>(26); }
|
|
|
|
public static Offset<SCHALE.Common.FlatData.EventContentCardShopExcel> CreateEventContentCardShopExcel(FlatBufferBuilder builder,
|
|
long EventContentId = 0,
|
|
long Id = 0,
|
|
SCHALE.Common.FlatData.Rarity Rarity_ = SCHALE.Common.FlatData.Rarity.N,
|
|
long CostGoodsId = 0,
|
|
int CardGroupId = 0,
|
|
bool IsLegacy = false,
|
|
int RefreshGroup = 0,
|
|
int Prob = 0,
|
|
int ProbWeight1 = 0,
|
|
VectorOffset RewardParcelTypeOffset = default(VectorOffset),
|
|
VectorOffset RewardParcelIdOffset = default(VectorOffset),
|
|
VectorOffset RewardParcelAmountOffset = default(VectorOffset)) {
|
|
builder.StartTable(12);
|
|
EventContentCardShopExcel.AddCostGoodsId(builder, CostGoodsId);
|
|
EventContentCardShopExcel.AddId(builder, Id);
|
|
EventContentCardShopExcel.AddEventContentId(builder, EventContentId);
|
|
EventContentCardShopExcel.AddRewardParcelAmount(builder, RewardParcelAmountOffset);
|
|
EventContentCardShopExcel.AddRewardParcelId(builder, RewardParcelIdOffset);
|
|
EventContentCardShopExcel.AddRewardParcelType(builder, RewardParcelTypeOffset);
|
|
EventContentCardShopExcel.AddProbWeight1(builder, ProbWeight1);
|
|
EventContentCardShopExcel.AddProb(builder, Prob);
|
|
EventContentCardShopExcel.AddRefreshGroup(builder, RefreshGroup);
|
|
EventContentCardShopExcel.AddCardGroupId(builder, CardGroupId);
|
|
EventContentCardShopExcel.AddRarity_(builder, Rarity_);
|
|
EventContentCardShopExcel.AddIsLegacy(builder, IsLegacy);
|
|
return EventContentCardShopExcel.EndEventContentCardShopExcel(builder);
|
|
}
|
|
|
|
public static void StartEventContentCardShopExcel(FlatBufferBuilder builder) { builder.StartTable(12); }
|
|
public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); }
|
|
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(1, id, 0); }
|
|
public static void AddRarity_(FlatBufferBuilder builder, SCHALE.Common.FlatData.Rarity rarity_) { builder.AddInt(2, (int)rarity_, 0); }
|
|
public static void AddCostGoodsId(FlatBufferBuilder builder, long costGoodsId) { builder.AddLong(3, costGoodsId, 0); }
|
|
public static void AddCardGroupId(FlatBufferBuilder builder, int cardGroupId) { builder.AddInt(4, cardGroupId, 0); }
|
|
public static void AddIsLegacy(FlatBufferBuilder builder, bool isLegacy) { builder.AddBool(5, isLegacy, false); }
|
|
public static void AddRefreshGroup(FlatBufferBuilder builder, int refreshGroup) { builder.AddInt(6, refreshGroup, 0); }
|
|
public static void AddProb(FlatBufferBuilder builder, int prob) { builder.AddInt(7, prob, 0); }
|
|
public static void AddProbWeight1(FlatBufferBuilder builder, int probWeight1) { builder.AddInt(8, probWeight1, 0); }
|
|
public static void AddRewardParcelType(FlatBufferBuilder builder, VectorOffset rewardParcelTypeOffset) { builder.AddOffset(9, 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<SCHALE.Common.FlatData.ParcelType> 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<SCHALE.Common.FlatData.ParcelType>(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(10, 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<long> 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<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
public static void StartRewardParcelIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
|
|
public static void AddRewardParcelAmount(FlatBufferBuilder builder, VectorOffset rewardParcelAmountOffset) { builder.AddOffset(11, rewardParcelAmountOffset.Value, 0); }
|
|
public static VectorOffset CreateRewardParcelAmountVector(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 CreateRewardParcelAmountVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateRewardParcelAmountVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateRewardParcelAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
public static void StartRewardParcelAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
|
|
public static Offset<SCHALE.Common.FlatData.EventContentCardShopExcel> EndEventContentCardShopExcel(FlatBufferBuilder builder) {
|
|
int o = builder.EndTable();
|
|
return new Offset<SCHALE.Common.FlatData.EventContentCardShopExcel>(o);
|
|
}
|
|
public EventContentCardShopExcelT UnPack() {
|
|
var _o = new EventContentCardShopExcelT();
|
|
this.UnPackTo(_o);
|
|
return _o;
|
|
}
|
|
public void UnPackTo(EventContentCardShopExcelT _o) {
|
|
byte[] key = TableEncryptionService.CreateKey("EventContentCardShop");
|
|
_o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key);
|
|
_o.Id = TableEncryptionService.Convert(this.Id, key);
|
|
_o.Rarity_ = TableEncryptionService.Convert(this.Rarity_, key);
|
|
_o.CostGoodsId = TableEncryptionService.Convert(this.CostGoodsId, key);
|
|
_o.CardGroupId = TableEncryptionService.Convert(this.CardGroupId, key);
|
|
_o.IsLegacy = TableEncryptionService.Convert(this.IsLegacy, key);
|
|
_o.RefreshGroup = TableEncryptionService.Convert(this.RefreshGroup, key);
|
|
_o.Prob = TableEncryptionService.Convert(this.Prob, key);
|
|
_o.ProbWeight1 = TableEncryptionService.Convert(this.ProbWeight1, key);
|
|
_o.RewardParcelType = new List<SCHALE.Common.FlatData.ParcelType>();
|
|
for (var _j = 0; _j < this.RewardParcelTypeLength; ++_j) {_o.RewardParcelType.Add(TableEncryptionService.Convert(this.RewardParcelType(_j), key));}
|
|
_o.RewardParcelId = new List<long>();
|
|
for (var _j = 0; _j < this.RewardParcelIdLength; ++_j) {_o.RewardParcelId.Add(TableEncryptionService.Convert(this.RewardParcelId(_j), key));}
|
|
_o.RewardParcelAmount = new List<long>();
|
|
for (var _j = 0; _j < this.RewardParcelAmountLength; ++_j) {_o.RewardParcelAmount.Add(TableEncryptionService.Convert(this.RewardParcelAmount(_j), key));}
|
|
}
|
|
public static Offset<SCHALE.Common.FlatData.EventContentCardShopExcel> Pack(FlatBufferBuilder builder, EventContentCardShopExcelT _o) {
|
|
if (_o == null) return default(Offset<SCHALE.Common.FlatData.EventContentCardShopExcel>);
|
|
var _RewardParcelType = default(VectorOffset);
|
|
if (_o.RewardParcelType != null) {
|
|
var __RewardParcelType = _o.RewardParcelType.ToArray();
|
|
_RewardParcelType = CreateRewardParcelTypeVector(builder, __RewardParcelType);
|
|
}
|
|
var _RewardParcelId = default(VectorOffset);
|
|
if (_o.RewardParcelId != null) {
|
|
var __RewardParcelId = _o.RewardParcelId.ToArray();
|
|
_RewardParcelId = CreateRewardParcelIdVector(builder, __RewardParcelId);
|
|
}
|
|
var _RewardParcelAmount = default(VectorOffset);
|
|
if (_o.RewardParcelAmount != null) {
|
|
var __RewardParcelAmount = _o.RewardParcelAmount.ToArray();
|
|
_RewardParcelAmount = CreateRewardParcelAmountVector(builder, __RewardParcelAmount);
|
|
}
|
|
return CreateEventContentCardShopExcel(
|
|
builder,
|
|
_o.EventContentId,
|
|
_o.Id,
|
|
_o.Rarity_,
|
|
_o.CostGoodsId,
|
|
_o.CardGroupId,
|
|
_o.IsLegacy,
|
|
_o.RefreshGroup,
|
|
_o.Prob,
|
|
_o.ProbWeight1,
|
|
_RewardParcelType,
|
|
_RewardParcelId,
|
|
_RewardParcelAmount);
|
|
}
|
|
}
|
|
|
|
public class EventContentCardShopExcelT
|
|
{
|
|
public long EventContentId { get; set; }
|
|
public long Id { get; set; }
|
|
public SCHALE.Common.FlatData.Rarity Rarity_ { get; set; }
|
|
public long CostGoodsId { get; set; }
|
|
public int CardGroupId { get; set; }
|
|
public bool IsLegacy { get; set; }
|
|
public int RefreshGroup { get; set; }
|
|
public int Prob { get; set; }
|
|
public int ProbWeight1 { get; set; }
|
|
public List<SCHALE.Common.FlatData.ParcelType> RewardParcelType { get; set; }
|
|
public List<long> RewardParcelId { get; set; }
|
|
public List<long> RewardParcelAmount { get; set; }
|
|
|
|
public EventContentCardShopExcelT() {
|
|
this.EventContentId = 0;
|
|
this.Id = 0;
|
|
this.Rarity_ = SCHALE.Common.FlatData.Rarity.N;
|
|
this.CostGoodsId = 0;
|
|
this.CardGroupId = 0;
|
|
this.IsLegacy = false;
|
|
this.RefreshGroup = 0;
|
|
this.Prob = 0;
|
|
this.ProbWeight1 = 0;
|
|
this.RewardParcelType = null;
|
|
this.RewardParcelId = null;
|
|
this.RewardParcelAmount = null;
|
|
}
|
|
}
|
|
|
|
|
|
static public class EventContentCardShopExcelVerify
|
|
{
|
|
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
|
|
{
|
|
return verifier.VerifyTableStart(tablePos)
|
|
&& verifier.VerifyField(tablePos, 4 /*EventContentId*/, 8 /*long*/, 8, false)
|
|
&& verifier.VerifyField(tablePos, 6 /*Id*/, 8 /*long*/, 8, false)
|
|
&& verifier.VerifyField(tablePos, 8 /*Rarity_*/, 4 /*SCHALE.Common.FlatData.Rarity*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 10 /*CostGoodsId*/, 8 /*long*/, 8, false)
|
|
&& verifier.VerifyField(tablePos, 12 /*CardGroupId*/, 4 /*int*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 14 /*IsLegacy*/, 1 /*bool*/, 1, false)
|
|
&& verifier.VerifyField(tablePos, 16 /*RefreshGroup*/, 4 /*int*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 18 /*Prob*/, 4 /*int*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 20 /*ProbWeight1*/, 4 /*int*/, 4, false)
|
|
&& verifier.VerifyVectorOfData(tablePos, 22 /*RewardParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, false)
|
|
&& verifier.VerifyVectorOfData(tablePos, 24 /*RewardParcelId*/, 8 /*long*/, false)
|
|
&& verifier.VerifyVectorOfData(tablePos, 26 /*RewardParcelAmount*/, 8 /*long*/, false)
|
|
&& verifier.VerifyTableEnd(tablePos);
|
|
}
|
|
}
|
|
|
|
}
|