forked from Raphael/SCHALE.GameServer
214 lines
12 KiB
C#
214 lines
12 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 OperatorExcel : IFlatbufferObject
|
|
{
|
|
private Table __p;
|
|
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
|
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
|
|
public static OperatorExcel GetRootAsOperatorExcel(ByteBuffer _bb) { return GetRootAsOperatorExcel(_bb, new OperatorExcel()); }
|
|
public static OperatorExcel GetRootAsOperatorExcel(ByteBuffer _bb, OperatorExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
|
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
|
|
public OperatorExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
|
|
|
public long UniqueId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
public string GroupId { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<byte> GetGroupIdBytes() { return __p.__vector_as_span<byte>(6, 1); }
|
|
#else
|
|
public ArraySegment<byte>? GetGroupIdBytes() { return __p.__vector_as_arraysegment(6); }
|
|
#endif
|
|
public byte[] GetGroupIdArray() { return __p.__vector_as_array<byte>(6); }
|
|
public SCHALE.Common.FlatData.OperatorCondition OperatorCondition { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.OperatorCondition)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.OperatorCondition.None; } }
|
|
public int OutputSequence { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
|
public int RandomWeight { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
|
public int OutputDelay { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
|
public int Duration { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
|
public int OperatorOutputPriority { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
|
public string PortraitPath { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<byte> GetPortraitPathBytes() { return __p.__vector_as_span<byte>(20, 1); }
|
|
#else
|
|
public ArraySegment<byte>? GetPortraitPathBytes() { return __p.__vector_as_arraysegment(20); }
|
|
#endif
|
|
public byte[] GetPortraitPathArray() { return __p.__vector_as_array<byte>(20); }
|
|
public string TextLocalizeKey { get { int o = __p.__offset(22); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<byte> GetTextLocalizeKeyBytes() { return __p.__vector_as_span<byte>(22, 1); }
|
|
#else
|
|
public ArraySegment<byte>? GetTextLocalizeKeyBytes() { return __p.__vector_as_arraysegment(22); }
|
|
#endif
|
|
public byte[] GetTextLocalizeKeyArray() { return __p.__vector_as_array<byte>(22); }
|
|
public uint VoiceId(int j) { int o = __p.__offset(24); return o != 0 ? __p.bb.GetUint(__p.__vector(o) + j * 4) : (uint)0; }
|
|
public int VoiceIdLength { get { int o = __p.__offset(24); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<uint> GetVoiceIdBytes() { return __p.__vector_as_span<uint>(24, 4); }
|
|
#else
|
|
public ArraySegment<byte>? GetVoiceIdBytes() { return __p.__vector_as_arraysegment(24); }
|
|
#endif
|
|
public uint[] GetVoiceIdArray() { return __p.__vector_as_array<uint>(24); }
|
|
public bool OperatorWaitQueue { get { int o = __p.__offset(26); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
|
|
|
|
public static Offset<SCHALE.Common.FlatData.OperatorExcel> CreateOperatorExcel(FlatBufferBuilder builder,
|
|
long UniqueId = 0,
|
|
StringOffset GroupIdOffset = default(StringOffset),
|
|
SCHALE.Common.FlatData.OperatorCondition OperatorCondition = SCHALE.Common.FlatData.OperatorCondition.None,
|
|
int OutputSequence = 0,
|
|
int RandomWeight = 0,
|
|
int OutputDelay = 0,
|
|
int Duration = 0,
|
|
int OperatorOutputPriority = 0,
|
|
StringOffset PortraitPathOffset = default(StringOffset),
|
|
StringOffset TextLocalizeKeyOffset = default(StringOffset),
|
|
VectorOffset VoiceIdOffset = default(VectorOffset),
|
|
bool OperatorWaitQueue = false) {
|
|
builder.StartTable(12);
|
|
OperatorExcel.AddUniqueId(builder, UniqueId);
|
|
OperatorExcel.AddVoiceId(builder, VoiceIdOffset);
|
|
OperatorExcel.AddTextLocalizeKey(builder, TextLocalizeKeyOffset);
|
|
OperatorExcel.AddPortraitPath(builder, PortraitPathOffset);
|
|
OperatorExcel.AddOperatorOutputPriority(builder, OperatorOutputPriority);
|
|
OperatorExcel.AddDuration(builder, Duration);
|
|
OperatorExcel.AddOutputDelay(builder, OutputDelay);
|
|
OperatorExcel.AddRandomWeight(builder, RandomWeight);
|
|
OperatorExcel.AddOutputSequence(builder, OutputSequence);
|
|
OperatorExcel.AddOperatorCondition(builder, OperatorCondition);
|
|
OperatorExcel.AddGroupId(builder, GroupIdOffset);
|
|
OperatorExcel.AddOperatorWaitQueue(builder, OperatorWaitQueue);
|
|
return OperatorExcel.EndOperatorExcel(builder);
|
|
}
|
|
|
|
public static void StartOperatorExcel(FlatBufferBuilder builder) { builder.StartTable(12); }
|
|
public static void AddUniqueId(FlatBufferBuilder builder, long uniqueId) { builder.AddLong(0, uniqueId, 0); }
|
|
public static void AddGroupId(FlatBufferBuilder builder, StringOffset groupIdOffset) { builder.AddOffset(1, groupIdOffset.Value, 0); }
|
|
public static void AddOperatorCondition(FlatBufferBuilder builder, SCHALE.Common.FlatData.OperatorCondition operatorCondition) { builder.AddInt(2, (int)operatorCondition, 0); }
|
|
public static void AddOutputSequence(FlatBufferBuilder builder, int outputSequence) { builder.AddInt(3, outputSequence, 0); }
|
|
public static void AddRandomWeight(FlatBufferBuilder builder, int randomWeight) { builder.AddInt(4, randomWeight, 0); }
|
|
public static void AddOutputDelay(FlatBufferBuilder builder, int outputDelay) { builder.AddInt(5, outputDelay, 0); }
|
|
public static void AddDuration(FlatBufferBuilder builder, int duration) { builder.AddInt(6, duration, 0); }
|
|
public static void AddOperatorOutputPriority(FlatBufferBuilder builder, int operatorOutputPriority) { builder.AddInt(7, operatorOutputPriority, 0); }
|
|
public static void AddPortraitPath(FlatBufferBuilder builder, StringOffset portraitPathOffset) { builder.AddOffset(8, portraitPathOffset.Value, 0); }
|
|
public static void AddTextLocalizeKey(FlatBufferBuilder builder, StringOffset textLocalizeKeyOffset) { builder.AddOffset(9, textLocalizeKeyOffset.Value, 0); }
|
|
public static void AddVoiceId(FlatBufferBuilder builder, VectorOffset voiceIdOffset) { builder.AddOffset(10, voiceIdOffset.Value, 0); }
|
|
public static VectorOffset CreateVoiceIdVector(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddUint(data[i]); return builder.EndVector(); }
|
|
public static VectorOffset CreateVoiceIdVectorBlock(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateVoiceIdVectorBlock(FlatBufferBuilder builder, ArraySegment<uint> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateVoiceIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<uint>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
public static void StartVoiceIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
|
|
public static void AddOperatorWaitQueue(FlatBufferBuilder builder, bool operatorWaitQueue) { builder.AddBool(11, operatorWaitQueue, false); }
|
|
public static Offset<SCHALE.Common.FlatData.OperatorExcel> EndOperatorExcel(FlatBufferBuilder builder) {
|
|
int o = builder.EndTable();
|
|
return new Offset<SCHALE.Common.FlatData.OperatorExcel>(o);
|
|
}
|
|
public OperatorExcelT UnPack() {
|
|
var _o = new OperatorExcelT();
|
|
this.UnPackTo(_o);
|
|
return _o;
|
|
}
|
|
public void UnPackTo(OperatorExcelT _o) {
|
|
byte[] key = TableEncryptionService.CreateKey("Operator");
|
|
_o.UniqueId = TableEncryptionService.Convert(this.UniqueId, key);
|
|
_o.GroupId = TableEncryptionService.Convert(this.GroupId, key);
|
|
_o.OperatorCondition = TableEncryptionService.Convert(this.OperatorCondition, key);
|
|
_o.OutputSequence = TableEncryptionService.Convert(this.OutputSequence, key);
|
|
_o.RandomWeight = TableEncryptionService.Convert(this.RandomWeight, key);
|
|
_o.OutputDelay = TableEncryptionService.Convert(this.OutputDelay, key);
|
|
_o.Duration = TableEncryptionService.Convert(this.Duration, key);
|
|
_o.OperatorOutputPriority = TableEncryptionService.Convert(this.OperatorOutputPriority, key);
|
|
_o.PortraitPath = TableEncryptionService.Convert(this.PortraitPath, key);
|
|
_o.TextLocalizeKey = TableEncryptionService.Convert(this.TextLocalizeKey, key);
|
|
_o.VoiceId = new List<uint>();
|
|
for (var _j = 0; _j < this.VoiceIdLength; ++_j) {_o.VoiceId.Add(TableEncryptionService.Convert(this.VoiceId(_j), key));}
|
|
_o.OperatorWaitQueue = TableEncryptionService.Convert(this.OperatorWaitQueue, key);
|
|
}
|
|
public static Offset<SCHALE.Common.FlatData.OperatorExcel> Pack(FlatBufferBuilder builder, OperatorExcelT _o) {
|
|
if (_o == null) return default(Offset<SCHALE.Common.FlatData.OperatorExcel>);
|
|
var _GroupId = _o.GroupId == null ? default(StringOffset) : builder.CreateString(_o.GroupId);
|
|
var _PortraitPath = _o.PortraitPath == null ? default(StringOffset) : builder.CreateString(_o.PortraitPath);
|
|
var _TextLocalizeKey = _o.TextLocalizeKey == null ? default(StringOffset) : builder.CreateString(_o.TextLocalizeKey);
|
|
var _VoiceId = default(VectorOffset);
|
|
if (_o.VoiceId != null) {
|
|
var __VoiceId = _o.VoiceId.ToArray();
|
|
_VoiceId = CreateVoiceIdVector(builder, __VoiceId);
|
|
}
|
|
return CreateOperatorExcel(
|
|
builder,
|
|
_o.UniqueId,
|
|
_GroupId,
|
|
_o.OperatorCondition,
|
|
_o.OutputSequence,
|
|
_o.RandomWeight,
|
|
_o.OutputDelay,
|
|
_o.Duration,
|
|
_o.OperatorOutputPriority,
|
|
_PortraitPath,
|
|
_TextLocalizeKey,
|
|
_VoiceId,
|
|
_o.OperatorWaitQueue);
|
|
}
|
|
}
|
|
|
|
public class OperatorExcelT
|
|
{
|
|
public long UniqueId { get; set; }
|
|
public string GroupId { get; set; }
|
|
public SCHALE.Common.FlatData.OperatorCondition OperatorCondition { get; set; }
|
|
public int OutputSequence { get; set; }
|
|
public int RandomWeight { get; set; }
|
|
public int OutputDelay { get; set; }
|
|
public int Duration { get; set; }
|
|
public int OperatorOutputPriority { get; set; }
|
|
public string PortraitPath { get; set; }
|
|
public string TextLocalizeKey { get; set; }
|
|
public List<uint> VoiceId { get; set; }
|
|
public bool OperatorWaitQueue { get; set; }
|
|
|
|
public OperatorExcelT() {
|
|
this.UniqueId = 0;
|
|
this.GroupId = null;
|
|
this.OperatorCondition = SCHALE.Common.FlatData.OperatorCondition.None;
|
|
this.OutputSequence = 0;
|
|
this.RandomWeight = 0;
|
|
this.OutputDelay = 0;
|
|
this.Duration = 0;
|
|
this.OperatorOutputPriority = 0;
|
|
this.PortraitPath = null;
|
|
this.TextLocalizeKey = null;
|
|
this.VoiceId = null;
|
|
this.OperatorWaitQueue = false;
|
|
}
|
|
}
|
|
|
|
|
|
static public class OperatorExcelVerify
|
|
{
|
|
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
|
|
{
|
|
return verifier.VerifyTableStart(tablePos)
|
|
&& verifier.VerifyField(tablePos, 4 /*UniqueId*/, 8 /*long*/, 8, false)
|
|
&& verifier.VerifyString(tablePos, 6 /*GroupId*/, false)
|
|
&& verifier.VerifyField(tablePos, 8 /*OperatorCondition*/, 4 /*SCHALE.Common.FlatData.OperatorCondition*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 10 /*OutputSequence*/, 4 /*int*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 12 /*RandomWeight*/, 4 /*int*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 14 /*OutputDelay*/, 4 /*int*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 16 /*Duration*/, 4 /*int*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 18 /*OperatorOutputPriority*/, 4 /*int*/, 4, false)
|
|
&& verifier.VerifyString(tablePos, 20 /*PortraitPath*/, false)
|
|
&& verifier.VerifyString(tablePos, 22 /*TextLocalizeKey*/, false)
|
|
&& verifier.VerifyVectorOfData(tablePos, 24 /*VoiceId*/, 4 /*uint*/, false)
|
|
&& verifier.VerifyField(tablePos, 26 /*OperatorWaitQueue*/, 1 /*bool*/, 1, false)
|
|
&& verifier.VerifyTableEnd(tablePos);
|
|
}
|
|
}
|
|
|
|
}
|