SCHALE.GameServer/SCHALE.Common/FlatData/MiniGameDreamCollectionScen...

157 lines
11 KiB
C#
Raw Normal View History

2024-04-29 15:52:45 +00:00
// <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 MiniGameDreamCollectionScenarioExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static MiniGameDreamCollectionScenarioExcel GetRootAsMiniGameDreamCollectionScenarioExcel(ByteBuffer _bb) { return GetRootAsMiniGameDreamCollectionScenarioExcel(_bb, new MiniGameDreamCollectionScenarioExcel()); }
public static MiniGameDreamCollectionScenarioExcel GetRootAsMiniGameDreamCollectionScenarioExcel(ByteBuffer _bb, MiniGameDreamCollectionScenarioExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public MiniGameDreamCollectionScenarioExcel __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 bool IsSkip { get { int o = __p.__offset(6); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public long EventContentId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public SCHALE.Common.FlatData.DreamMakerParameterType Parameter(int j) { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.DreamMakerParameterType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.DreamMakerParameterType)0; }
public int ParameterLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<SCHALE.Common.FlatData.DreamMakerParameterType> GetParameterBytes() { return __p.__vector_as_span<SCHALE.Common.FlatData.DreamMakerParameterType>(10, 4); }
#else
public ArraySegment<byte>? GetParameterBytes() { return __p.__vector_as_arraysegment(10); }
#endif
public SCHALE.Common.FlatData.DreamMakerParameterType[] GetParameterArray() { int o = __p.__offset(10); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.DreamMakerParameterType[] a = new SCHALE.Common.FlatData.DreamMakerParameterType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.DreamMakerParameterType)__p.bb.GetInt(p + i * 4); } return a; }
public long ParameterAmount(int j) { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int ParameterAmountLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<long> GetParameterAmountBytes() { return __p.__vector_as_span<long>(12, 8); }
#else
public ArraySegment<byte>? GetParameterAmountBytes() { return __p.__vector_as_arraysegment(12); }
#endif
public long[] GetParameterAmountArray() { return __p.__vector_as_array<long>(12); }
public long ScenarioGroupId { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public static Offset<SCHALE.Common.FlatData.MiniGameDreamCollectionScenarioExcel> CreateMiniGameDreamCollectionScenarioExcel(FlatBufferBuilder builder,
long Id = 0,
bool IsSkip = false,
long EventContentId = 0,
VectorOffset ParameterOffset = default(VectorOffset),
VectorOffset ParameterAmountOffset = default(VectorOffset),
long ScenarioGroupId = 0) {
builder.StartTable(6);
MiniGameDreamCollectionScenarioExcel.AddScenarioGroupId(builder, ScenarioGroupId);
MiniGameDreamCollectionScenarioExcel.AddEventContentId(builder, EventContentId);
MiniGameDreamCollectionScenarioExcel.AddId(builder, Id);
MiniGameDreamCollectionScenarioExcel.AddParameterAmount(builder, ParameterAmountOffset);
MiniGameDreamCollectionScenarioExcel.AddParameter(builder, ParameterOffset);
MiniGameDreamCollectionScenarioExcel.AddIsSkip(builder, IsSkip);
return MiniGameDreamCollectionScenarioExcel.EndMiniGameDreamCollectionScenarioExcel(builder);
}
public static void StartMiniGameDreamCollectionScenarioExcel(FlatBufferBuilder builder) { builder.StartTable(6); }
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); }
public static void AddIsSkip(FlatBufferBuilder builder, bool isSkip) { builder.AddBool(1, isSkip, false); }
public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(2, eventContentId, 0); }
public static void AddParameter(FlatBufferBuilder builder, VectorOffset parameterOffset) { builder.AddOffset(3, parameterOffset.Value, 0); }
public static VectorOffset CreateParameterVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.DreamMakerParameterType[] 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 CreateParameterVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.DreamMakerParameterType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateParameterVectorBlock(FlatBufferBuilder builder, ArraySegment<SCHALE.Common.FlatData.DreamMakerParameterType> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateParameterVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<SCHALE.Common.FlatData.DreamMakerParameterType>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartParameterVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddParameterAmount(FlatBufferBuilder builder, VectorOffset parameterAmountOffset) { builder.AddOffset(4, parameterAmountOffset.Value, 0); }
public static VectorOffset CreateParameterAmountVector(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 CreateParameterAmountVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateParameterAmountVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateParameterAmountVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartParameterAmountVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddScenarioGroupId(FlatBufferBuilder builder, long scenarioGroupId) { builder.AddLong(5, scenarioGroupId, 0); }
public static Offset<SCHALE.Common.FlatData.MiniGameDreamCollectionScenarioExcel> EndMiniGameDreamCollectionScenarioExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.MiniGameDreamCollectionScenarioExcel>(o);
}
public MiniGameDreamCollectionScenarioExcelT UnPack() {
var _o = new MiniGameDreamCollectionScenarioExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(MiniGameDreamCollectionScenarioExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("MiniGameDreamCollectionScenario");
_o.Id = TableEncryptionService.Convert(this.Id, key);
_o.IsSkip = TableEncryptionService.Convert(this.IsSkip, key);
_o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key);
_o.Parameter = new List<SCHALE.Common.FlatData.DreamMakerParameterType>();
for (var _j = 0; _j < this.ParameterLength; ++_j) {_o.Parameter.Add(TableEncryptionService.Convert(this.Parameter(_j), key));}
_o.ParameterAmount = new List<long>();
for (var _j = 0; _j < this.ParameterAmountLength; ++_j) {_o.ParameterAmount.Add(TableEncryptionService.Convert(this.ParameterAmount(_j), key));}
_o.ScenarioGroupId = TableEncryptionService.Convert(this.ScenarioGroupId, key);
}
public static Offset<SCHALE.Common.FlatData.MiniGameDreamCollectionScenarioExcel> Pack(FlatBufferBuilder builder, MiniGameDreamCollectionScenarioExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.MiniGameDreamCollectionScenarioExcel>);
var _Parameter = default(VectorOffset);
if (_o.Parameter != null) {
var __Parameter = _o.Parameter.ToArray();
_Parameter = CreateParameterVector(builder, __Parameter);
}
var _ParameterAmount = default(VectorOffset);
if (_o.ParameterAmount != null) {
var __ParameterAmount = _o.ParameterAmount.ToArray();
_ParameterAmount = CreateParameterAmountVector(builder, __ParameterAmount);
}
return CreateMiniGameDreamCollectionScenarioExcel(
builder,
_o.Id,
_o.IsSkip,
_o.EventContentId,
_Parameter,
_ParameterAmount,
_o.ScenarioGroupId);
}
}
public class MiniGameDreamCollectionScenarioExcelT
{
public long Id { get; set; }
public bool IsSkip { get; set; }
public long EventContentId { get; set; }
public List<SCHALE.Common.FlatData.DreamMakerParameterType> Parameter { get; set; }
public List<long> ParameterAmount { get; set; }
public long ScenarioGroupId { get; set; }
public MiniGameDreamCollectionScenarioExcelT() {
this.Id = 0;
this.IsSkip = false;
this.EventContentId = 0;
this.Parameter = null;
this.ParameterAmount = null;
this.ScenarioGroupId = 0;
}
}
static public class MiniGameDreamCollectionScenarioExcelVerify
{
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 /*IsSkip*/, 1 /*bool*/, 1, false)
&& verifier.VerifyField(tablePos, 8 /*EventContentId*/, 8 /*long*/, 8, false)
&& verifier.VerifyVectorOfData(tablePos, 10 /*Parameter*/, 4 /*SCHALE.Common.FlatData.DreamMakerParameterType*/, false)
&& verifier.VerifyVectorOfData(tablePos, 12 /*ParameterAmount*/, 8 /*long*/, false)
&& verifier.VerifyField(tablePos, 14 /*ScenarioGroupId*/, 8 /*long*/, 8, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}