forked from Raphael/SCHALE.GameServer
110 lines
8.5 KiB
C#
110 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::Google.FlatBuffers;
|
||
|
|
||
|
public struct EchelonConstraintExcel : IFlatbufferObject
|
||
|
{
|
||
|
private Table __p;
|
||
|
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
||
|
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
|
||
|
public static EchelonConstraintExcel GetRootAsEchelonConstraintExcel(ByteBuffer _bb) { return GetRootAsEchelonConstraintExcel(_bb, new EchelonConstraintExcel()); }
|
||
|
public static EchelonConstraintExcel GetRootAsEchelonConstraintExcel(ByteBuffer _bb, EchelonConstraintExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
||
|
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
|
||
|
public EchelonConstraintExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||
|
|
||
|
public long GroupId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
||
|
public bool IsWhiteList { get { int o = __p.__offset(6); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
|
||
|
public long CharacterId(int j) { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
|
||
|
public int CharacterIdLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } }
|
||
|
#if ENABLE_SPAN_T
|
||
|
public Span<long> GetCharacterIdBytes() { return __p.__vector_as_span<long>(8, 8); }
|
||
|
#else
|
||
|
public ArraySegment<byte>? GetCharacterIdBytes() { return __p.__vector_as_arraysegment(8); }
|
||
|
#endif
|
||
|
public long[] GetCharacterIdArray() { return __p.__vector_as_array<long>(8); }
|
||
|
public long PersonalityId(int j) { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
|
||
|
public int PersonalityIdLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } }
|
||
|
#if ENABLE_SPAN_T
|
||
|
public Span<long> GetPersonalityIdBytes() { return __p.__vector_as_span<long>(10, 8); }
|
||
|
#else
|
||
|
public ArraySegment<byte>? GetPersonalityIdBytes() { return __p.__vector_as_arraysegment(10); }
|
||
|
#endif
|
||
|
public long[] GetPersonalityIdArray() { return __p.__vector_as_array<long>(10); }
|
||
|
public SCHALE.Common.FlatData.WeaponType WeaponType { get { int o = __p.__offset(12); return o != 0 ? (SCHALE.Common.FlatData.WeaponType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.WeaponType.None; } }
|
||
|
public SCHALE.Common.FlatData.School School { get { int o = __p.__offset(14); return o != 0 ? (SCHALE.Common.FlatData.School)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.School.None; } }
|
||
|
public SCHALE.Common.FlatData.Club Club { get { int o = __p.__offset(16); return o != 0 ? (SCHALE.Common.FlatData.Club)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.Club.None; } }
|
||
|
public SCHALE.Common.FlatData.TacticRole Role { get { int o = __p.__offset(18); return o != 0 ? (SCHALE.Common.FlatData.TacticRole)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.TacticRole.None; } }
|
||
|
|
||
|
public static Offset<SCHALE.Common.FlatData.EchelonConstraintExcel> CreateEchelonConstraintExcel(FlatBufferBuilder builder,
|
||
|
long GroupId = 0,
|
||
|
bool IsWhiteList = false,
|
||
|
VectorOffset CharacterIdOffset = default(VectorOffset),
|
||
|
VectorOffset PersonalityIdOffset = default(VectorOffset),
|
||
|
SCHALE.Common.FlatData.WeaponType WeaponType = SCHALE.Common.FlatData.WeaponType.None,
|
||
|
SCHALE.Common.FlatData.School School = SCHALE.Common.FlatData.School.None,
|
||
|
SCHALE.Common.FlatData.Club Club = SCHALE.Common.FlatData.Club.None,
|
||
|
SCHALE.Common.FlatData.TacticRole Role = SCHALE.Common.FlatData.TacticRole.None) {
|
||
|
builder.StartTable(8);
|
||
|
EchelonConstraintExcel.AddGroupId(builder, GroupId);
|
||
|
EchelonConstraintExcel.AddRole(builder, Role);
|
||
|
EchelonConstraintExcel.AddClub(builder, Club);
|
||
|
EchelonConstraintExcel.AddSchool(builder, School);
|
||
|
EchelonConstraintExcel.AddWeaponType(builder, WeaponType);
|
||
|
EchelonConstraintExcel.AddPersonalityId(builder, PersonalityIdOffset);
|
||
|
EchelonConstraintExcel.AddCharacterId(builder, CharacterIdOffset);
|
||
|
EchelonConstraintExcel.AddIsWhiteList(builder, IsWhiteList);
|
||
|
return EchelonConstraintExcel.EndEchelonConstraintExcel(builder);
|
||
|
}
|
||
|
|
||
|
public static void StartEchelonConstraintExcel(FlatBufferBuilder builder) { builder.StartTable(8); }
|
||
|
public static void AddGroupId(FlatBufferBuilder builder, long groupId) { builder.AddLong(0, groupId, 0); }
|
||
|
public static void AddIsWhiteList(FlatBufferBuilder builder, bool isWhiteList) { builder.AddBool(1, isWhiteList, false); }
|
||
|
public static void AddCharacterId(FlatBufferBuilder builder, VectorOffset characterIdOffset) { builder.AddOffset(2, characterIdOffset.Value, 0); }
|
||
|
public static VectorOffset CreateCharacterIdVector(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 CreateCharacterIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
|
||
|
public static VectorOffset CreateCharacterIdVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
|
||
|
public static VectorOffset CreateCharacterIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
||
|
public static void StartCharacterIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
|
||
|
public static void AddPersonalityId(FlatBufferBuilder builder, VectorOffset personalityIdOffset) { builder.AddOffset(3, personalityIdOffset.Value, 0); }
|
||
|
public static VectorOffset CreatePersonalityIdVector(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 CreatePersonalityIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
|
||
|
public static VectorOffset CreatePersonalityIdVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
|
||
|
public static VectorOffset CreatePersonalityIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
||
|
public static void StartPersonalityIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
|
||
|
public static void AddWeaponType(FlatBufferBuilder builder, SCHALE.Common.FlatData.WeaponType weaponType) { builder.AddInt(4, (int)weaponType, 0); }
|
||
|
public static void AddSchool(FlatBufferBuilder builder, SCHALE.Common.FlatData.School school) { builder.AddInt(5, (int)school, 0); }
|
||
|
public static void AddClub(FlatBufferBuilder builder, SCHALE.Common.FlatData.Club club) { builder.AddInt(6, (int)club, 0); }
|
||
|
public static void AddRole(FlatBufferBuilder builder, SCHALE.Common.FlatData.TacticRole role) { builder.AddInt(7, (int)role, 0); }
|
||
|
public static Offset<SCHALE.Common.FlatData.EchelonConstraintExcel> EndEchelonConstraintExcel(FlatBufferBuilder builder) {
|
||
|
int o = builder.EndTable();
|
||
|
return new Offset<SCHALE.Common.FlatData.EchelonConstraintExcel>(o);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
static public class EchelonConstraintExcelVerify
|
||
|
{
|
||
|
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
|
||
|
{
|
||
|
return verifier.VerifyTableStart(tablePos)
|
||
|
&& verifier.VerifyField(tablePos, 4 /*GroupId*/, 8 /*long*/, 8, false)
|
||
|
&& verifier.VerifyField(tablePos, 6 /*IsWhiteList*/, 1 /*bool*/, 1, false)
|
||
|
&& verifier.VerifyVectorOfData(tablePos, 8 /*CharacterId*/, 8 /*long*/, false)
|
||
|
&& verifier.VerifyVectorOfData(tablePos, 10 /*PersonalityId*/, 8 /*long*/, false)
|
||
|
&& verifier.VerifyField(tablePos, 12 /*WeaponType*/, 4 /*SCHALE.Common.FlatData.WeaponType*/, 4, false)
|
||
|
&& verifier.VerifyField(tablePos, 14 /*School*/, 4 /*SCHALE.Common.FlatData.School*/, 4, false)
|
||
|
&& verifier.VerifyField(tablePos, 16 /*Club*/, 4 /*SCHALE.Common.FlatData.Club*/, 4, false)
|
||
|
&& verifier.VerifyField(tablePos, 18 /*Role*/, 4 /*SCHALE.Common.FlatData.TacticRole*/, 4, false)
|
||
|
&& verifier.VerifyTableEnd(tablePos);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|