SCHALE.GameServer/SCHALE.Common/FlatData/EventContentTreasureRoundEx...

209 lines
14 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 EventContentTreasureRoundExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static EventContentTreasureRoundExcel GetRootAsEventContentTreasureRoundExcel(ByteBuffer _bb) { return GetRootAsEventContentTreasureRoundExcel(_bb, new EventContentTreasureRoundExcel()); }
public static EventContentTreasureRoundExcel GetRootAsEventContentTreasureRoundExcel(ByteBuffer _bb, EventContentTreasureRoundExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public EventContentTreasureRoundExcel __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 int TreasureRound { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public int TreasureRoundSize(int j) { int o = __p.__offset(8); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; }
public int TreasureRoundSizeLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<int> GetTreasureRoundSizeBytes() { return __p.__vector_as_span<int>(8, 4); }
#else
public ArraySegment<byte>? GetTreasureRoundSizeBytes() { return __p.__vector_as_arraysegment(8); }
#endif
public int[] GetTreasureRoundSizeArray() { return __p.__vector_as_array<int>(8); }
public bool CellVisualSortUnstructed { get { int o = __p.__offset(10); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public long CellCheckGoodsId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long CellRewardId { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long RewardID(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int RewardIDLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<long> GetRewardIDBytes() { return __p.__vector_as_span<long>(16, 8); }
#else
public ArraySegment<byte>? GetRewardIDBytes() { return __p.__vector_as_arraysegment(16); }
#endif
public long[] GetRewardIDArray() { return __p.__vector_as_array<long>(16); }
public int RewardAmount(int j) { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; }
public int RewardAmountLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<int> GetRewardAmountBytes() { return __p.__vector_as_span<int>(18, 4); }
#else
public ArraySegment<byte>? GetRewardAmountBytes() { return __p.__vector_as_arraysegment(18); }
#endif
public int[] GetRewardAmountArray() { return __p.__vector_as_array<int>(18); }
public string TreasureCellImagePath { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetTreasureCellImagePathBytes() { return __p.__vector_as_span<byte>(20, 1); }
#else
public ArraySegment<byte>? GetTreasureCellImagePathBytes() { return __p.__vector_as_arraysegment(20); }
#endif
public byte[] GetTreasureCellImagePathArray() { return __p.__vector_as_array<byte>(20); }
public static Offset<SCHALE.Common.FlatData.EventContentTreasureRoundExcel> CreateEventContentTreasureRoundExcel(FlatBufferBuilder builder,
long EventContentId = 0,
int TreasureRound = 0,
VectorOffset TreasureRoundSizeOffset = default(VectorOffset),
bool CellVisualSortUnstructed = false,
long CellCheckGoodsId = 0,
long CellRewardId = 0,
VectorOffset RewardIDOffset = default(VectorOffset),
VectorOffset RewardAmountOffset = default(VectorOffset),
StringOffset TreasureCellImagePathOffset = default(StringOffset)) {
builder.StartTable(9);
EventContentTreasureRoundExcel.AddCellRewardId(builder, CellRewardId);
EventContentTreasureRoundExcel.AddCellCheckGoodsId(builder, CellCheckGoodsId);
EventContentTreasureRoundExcel.AddEventContentId(builder, EventContentId);
EventContentTreasureRoundExcel.AddTreasureCellImagePath(builder, TreasureCellImagePathOffset);
EventContentTreasureRoundExcel.AddRewardAmount(builder, RewardAmountOffset);
EventContentTreasureRoundExcel.AddRewardID(builder, RewardIDOffset);
EventContentTreasureRoundExcel.AddTreasureRoundSize(builder, TreasureRoundSizeOffset);
EventContentTreasureRoundExcel.AddTreasureRound(builder, TreasureRound);
EventContentTreasureRoundExcel.AddCellVisualSortUnstructed(builder, CellVisualSortUnstructed);
return EventContentTreasureRoundExcel.EndEventContentTreasureRoundExcel(builder);
}
public static void StartEventContentTreasureRoundExcel(FlatBufferBuilder builder) { builder.StartTable(9); }
public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); }
public static void AddTreasureRound(FlatBufferBuilder builder, int treasureRound) { builder.AddInt(1, treasureRound, 0); }
public static void AddTreasureRoundSize(FlatBufferBuilder builder, VectorOffset treasureRoundSizeOffset) { builder.AddOffset(2, treasureRoundSizeOffset.Value, 0); }
public static VectorOffset CreateTreasureRoundSizeVector(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt(data[i]); return builder.EndVector(); }
public static VectorOffset CreateTreasureRoundSizeVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateTreasureRoundSizeVectorBlock(FlatBufferBuilder builder, ArraySegment<int> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateTreasureRoundSizeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<int>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartTreasureRoundSizeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddCellVisualSortUnstructed(FlatBufferBuilder builder, bool cellVisualSortUnstructed) { builder.AddBool(3, cellVisualSortUnstructed, false); }
public static void AddCellCheckGoodsId(FlatBufferBuilder builder, long cellCheckGoodsId) { builder.AddLong(4, cellCheckGoodsId, 0); }
public static void AddCellRewardId(FlatBufferBuilder builder, long cellRewardId) { builder.AddLong(5, cellRewardId, 0); }
public static void AddRewardID(FlatBufferBuilder builder, VectorOffset rewardIDOffset) { builder.AddOffset(6, rewardIDOffset.Value, 0); }
public static VectorOffset CreateRewardIDVector(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 CreateRewardIDVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardIDVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardIDVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRewardIDVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddRewardAmount(FlatBufferBuilder builder, VectorOffset rewardAmountOffset) { builder.AddOffset(7, rewardAmountOffset.Value, 0); }
public static VectorOffset CreateRewardAmountVector(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt(data[i]); return builder.EndVector(); }
public static VectorOffset CreateRewardAmountVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardAmountVectorBlock(FlatBufferBuilder builder, ArraySegment<int> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRewardAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<int>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRewardAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddTreasureCellImagePath(FlatBufferBuilder builder, StringOffset treasureCellImagePathOffset) { builder.AddOffset(8, treasureCellImagePathOffset.Value, 0); }
public static Offset<SCHALE.Common.FlatData.EventContentTreasureRoundExcel> EndEventContentTreasureRoundExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.EventContentTreasureRoundExcel>(o);
}
public EventContentTreasureRoundExcelT UnPack() {
var _o = new EventContentTreasureRoundExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(EventContentTreasureRoundExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("EventContentTreasureRound");
_o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key);
_o.TreasureRound = TableEncryptionService.Convert(this.TreasureRound, key);
_o.TreasureRoundSize = new List<int>();
for (var _j = 0; _j < this.TreasureRoundSizeLength; ++_j) {_o.TreasureRoundSize.Add(TableEncryptionService.Convert(this.TreasureRoundSize(_j), key));}
_o.CellVisualSortUnstructed = TableEncryptionService.Convert(this.CellVisualSortUnstructed, key);
_o.CellCheckGoodsId = TableEncryptionService.Convert(this.CellCheckGoodsId, key);
_o.CellRewardId = TableEncryptionService.Convert(this.CellRewardId, key);
_o.RewardID = new List<long>();
for (var _j = 0; _j < this.RewardIDLength; ++_j) {_o.RewardID.Add(TableEncryptionService.Convert(this.RewardID(_j), key));}
_o.RewardAmount = new List<int>();
for (var _j = 0; _j < this.RewardAmountLength; ++_j) {_o.RewardAmount.Add(TableEncryptionService.Convert(this.RewardAmount(_j), key));}
_o.TreasureCellImagePath = TableEncryptionService.Convert(this.TreasureCellImagePath, key);
}
public static Offset<SCHALE.Common.FlatData.EventContentTreasureRoundExcel> Pack(FlatBufferBuilder builder, EventContentTreasureRoundExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.EventContentTreasureRoundExcel>);
var _TreasureRoundSize = default(VectorOffset);
if (_o.TreasureRoundSize != null) {
var __TreasureRoundSize = _o.TreasureRoundSize.ToArray();
_TreasureRoundSize = CreateTreasureRoundSizeVector(builder, __TreasureRoundSize);
}
var _RewardID = default(VectorOffset);
if (_o.RewardID != null) {
var __RewardID = _o.RewardID.ToArray();
_RewardID = CreateRewardIDVector(builder, __RewardID);
}
var _RewardAmount = default(VectorOffset);
if (_o.RewardAmount != null) {
var __RewardAmount = _o.RewardAmount.ToArray();
_RewardAmount = CreateRewardAmountVector(builder, __RewardAmount);
}
var _TreasureCellImagePath = _o.TreasureCellImagePath == null ? default(StringOffset) : builder.CreateString(_o.TreasureCellImagePath);
return CreateEventContentTreasureRoundExcel(
builder,
_o.EventContentId,
_o.TreasureRound,
_TreasureRoundSize,
_o.CellVisualSortUnstructed,
_o.CellCheckGoodsId,
_o.CellRewardId,
_RewardID,
_RewardAmount,
_TreasureCellImagePath);
}
}
public class EventContentTreasureRoundExcelT
{
public long EventContentId { get; set; }
public int TreasureRound { get; set; }
public List<int> TreasureRoundSize { get; set; }
public bool CellVisualSortUnstructed { get; set; }
public long CellCheckGoodsId { get; set; }
public long CellRewardId { get; set; }
public List<long> RewardID { get; set; }
public List<int> RewardAmount { get; set; }
public string TreasureCellImagePath { get; set; }
public EventContentTreasureRoundExcelT() {
this.EventContentId = 0;
this.TreasureRound = 0;
this.TreasureRoundSize = null;
this.CellVisualSortUnstructed = false;
this.CellCheckGoodsId = 0;
this.CellRewardId = 0;
this.RewardID = null;
this.RewardAmount = null;
this.TreasureCellImagePath = null;
}
}
static public class EventContentTreasureRoundExcelVerify
{
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 /*TreasureRound*/, 4 /*int*/, 4, false)
&& verifier.VerifyVectorOfData(tablePos, 8 /*TreasureRoundSize*/, 4 /*int*/, false)
&& verifier.VerifyField(tablePos, 10 /*CellVisualSortUnstructed*/, 1 /*bool*/, 1, false)
&& verifier.VerifyField(tablePos, 12 /*CellCheckGoodsId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 14 /*CellRewardId*/, 8 /*long*/, 8, false)
&& verifier.VerifyVectorOfData(tablePos, 16 /*RewardID*/, 8 /*long*/, false)
&& verifier.VerifyVectorOfData(tablePos, 18 /*RewardAmount*/, 4 /*int*/, false)
&& verifier.VerifyString(tablePos, 20 /*TreasureCellImagePath*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}