SCHALE.GameServer/SCHALE.Common/FlatData/EventContentDiceRaceExcel.cs

141 lines
8.5 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 EventContentDiceRaceExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static EventContentDiceRaceExcel GetRootAsEventContentDiceRaceExcel(ByteBuffer _bb) { return GetRootAsEventContentDiceRaceExcel(_bb, new EventContentDiceRaceExcel()); }
public static EventContentDiceRaceExcel GetRootAsEventContentDiceRaceExcel(ByteBuffer _bb, EventContentDiceRaceExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public EventContentDiceRaceExcel __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 DiceCostGoodsId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public int SkipableLap { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public string DiceRacePawnPrefab { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetDiceRacePawnPrefabBytes() { return __p.__vector_as_span<byte>(10, 1); }
#else
public ArraySegment<byte>? GetDiceRacePawnPrefabBytes() { return __p.__vector_as_arraysegment(10); }
#endif
public byte[] GetDiceRacePawnPrefabArray() { return __p.__vector_as_array<byte>(10); }
public bool IsUsingFixedDice { get { int o = __p.__offset(12); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public string DiceRaceEventType(int j) { int o = __p.__offset(14); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
public int DiceRaceEventTypeLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
public static Offset<SCHALE.Common.FlatData.EventContentDiceRaceExcel> CreateEventContentDiceRaceExcel(FlatBufferBuilder builder,
long EventContentId = 0,
long DiceCostGoodsId = 0,
int SkipableLap = 0,
StringOffset DiceRacePawnPrefabOffset = default(StringOffset),
bool IsUsingFixedDice = false,
VectorOffset DiceRaceEventTypeOffset = default(VectorOffset)) {
builder.StartTable(6);
EventContentDiceRaceExcel.AddDiceCostGoodsId(builder, DiceCostGoodsId);
EventContentDiceRaceExcel.AddEventContentId(builder, EventContentId);
EventContentDiceRaceExcel.AddDiceRaceEventType(builder, DiceRaceEventTypeOffset);
EventContentDiceRaceExcel.AddDiceRacePawnPrefab(builder, DiceRacePawnPrefabOffset);
EventContentDiceRaceExcel.AddSkipableLap(builder, SkipableLap);
EventContentDiceRaceExcel.AddIsUsingFixedDice(builder, IsUsingFixedDice);
return EventContentDiceRaceExcel.EndEventContentDiceRaceExcel(builder);
}
public static void StartEventContentDiceRaceExcel(FlatBufferBuilder builder) { builder.StartTable(6); }
public static void AddEventContentId(FlatBufferBuilder builder, long eventContentId) { builder.AddLong(0, eventContentId, 0); }
public static void AddDiceCostGoodsId(FlatBufferBuilder builder, long diceCostGoodsId) { builder.AddLong(1, diceCostGoodsId, 0); }
public static void AddSkipableLap(FlatBufferBuilder builder, int skipableLap) { builder.AddInt(2, skipableLap, 0); }
public static void AddDiceRacePawnPrefab(FlatBufferBuilder builder, StringOffset diceRacePawnPrefabOffset) { builder.AddOffset(3, diceRacePawnPrefabOffset.Value, 0); }
public static void AddIsUsingFixedDice(FlatBufferBuilder builder, bool isUsingFixedDice) { builder.AddBool(4, isUsingFixedDice, false); }
public static void AddDiceRaceEventType(FlatBufferBuilder builder, VectorOffset diceRaceEventTypeOffset) { builder.AddOffset(5, diceRaceEventTypeOffset.Value, 0); }
public static VectorOffset CreateDiceRaceEventTypeVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
public static VectorOffset CreateDiceRaceEventTypeVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateDiceRaceEventTypeVectorBlock(FlatBufferBuilder builder, ArraySegment<StringOffset> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateDiceRaceEventTypeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<StringOffset>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartDiceRaceEventTypeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static Offset<SCHALE.Common.FlatData.EventContentDiceRaceExcel> EndEventContentDiceRaceExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.EventContentDiceRaceExcel>(o);
}
public EventContentDiceRaceExcelT UnPack() {
var _o = new EventContentDiceRaceExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(EventContentDiceRaceExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("EventContentDiceRace");
_o.EventContentId = TableEncryptionService.Convert(this.EventContentId, key);
_o.DiceCostGoodsId = TableEncryptionService.Convert(this.DiceCostGoodsId, key);
_o.SkipableLap = TableEncryptionService.Convert(this.SkipableLap, key);
_o.DiceRacePawnPrefab = TableEncryptionService.Convert(this.DiceRacePawnPrefab, key);
_o.IsUsingFixedDice = TableEncryptionService.Convert(this.IsUsingFixedDice, key);
_o.DiceRaceEventType = new List<string>();
for (var _j = 0; _j < this.DiceRaceEventTypeLength; ++_j) {_o.DiceRaceEventType.Add(TableEncryptionService.Convert(this.DiceRaceEventType(_j), key));}
}
public static Offset<SCHALE.Common.FlatData.EventContentDiceRaceExcel> Pack(FlatBufferBuilder builder, EventContentDiceRaceExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.EventContentDiceRaceExcel>);
var _DiceRacePawnPrefab = _o.DiceRacePawnPrefab == null ? default(StringOffset) : builder.CreateString(_o.DiceRacePawnPrefab);
var _DiceRaceEventType = default(VectorOffset);
if (_o.DiceRaceEventType != null) {
var __DiceRaceEventType = new StringOffset[_o.DiceRaceEventType.Count];
for (var _j = 0; _j < __DiceRaceEventType.Length; ++_j) { __DiceRaceEventType[_j] = builder.CreateString(_o.DiceRaceEventType[_j]); }
_DiceRaceEventType = CreateDiceRaceEventTypeVector(builder, __DiceRaceEventType);
}
return CreateEventContentDiceRaceExcel(
builder,
_o.EventContentId,
_o.DiceCostGoodsId,
_o.SkipableLap,
_DiceRacePawnPrefab,
_o.IsUsingFixedDice,
_DiceRaceEventType);
}
}
public class EventContentDiceRaceExcelT
{
public long EventContentId { get; set; }
public long DiceCostGoodsId { get; set; }
public int SkipableLap { get; set; }
public string DiceRacePawnPrefab { get; set; }
public bool IsUsingFixedDice { get; set; }
public List<string> DiceRaceEventType { get; set; }
public EventContentDiceRaceExcelT() {
this.EventContentId = 0;
this.DiceCostGoodsId = 0;
this.SkipableLap = 0;
this.DiceRacePawnPrefab = null;
this.IsUsingFixedDice = false;
this.DiceRaceEventType = null;
}
}
static public class EventContentDiceRaceExcelVerify
{
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 /*DiceCostGoodsId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 8 /*SkipableLap*/, 4 /*int*/, 4, false)
&& verifier.VerifyString(tablePos, 10 /*DiceRacePawnPrefab*/, false)
&& verifier.VerifyField(tablePos, 12 /*IsUsingFixedDice*/, 1 /*bool*/, 1, false)
&& verifier.VerifyVectorOfStrings(tablePos, 14 /*DiceRaceEventType*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}