SCHALE.GameServer/SCHALE.Common/FlatData/EchelonConstraintExcel.cs

175 lines
11 KiB
C#
Raw Normal View History

2024-04-21 00:21:57 +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;
2024-04-29 15:52:45 +00:00
using global::SCHALE.Common.Crypto;
2024-04-21 00:21:57 +00:00
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);
}
2024-04-29 15:52:45 +00:00
public EchelonConstraintExcelT UnPack() {
var _o = new EchelonConstraintExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(EchelonConstraintExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("EchelonConstraint");
_o.GroupId = TableEncryptionService.Convert(this.GroupId, key);
_o.IsWhiteList = TableEncryptionService.Convert(this.IsWhiteList, key);
_o.CharacterId = new List<long>();
for (var _j = 0; _j < this.CharacterIdLength; ++_j) {_o.CharacterId.Add(TableEncryptionService.Convert(this.CharacterId(_j), key));}
_o.PersonalityId = new List<long>();
for (var _j = 0; _j < this.PersonalityIdLength; ++_j) {_o.PersonalityId.Add(TableEncryptionService.Convert(this.PersonalityId(_j), key));}
_o.WeaponType = TableEncryptionService.Convert(this.WeaponType, key);
_o.School = TableEncryptionService.Convert(this.School, key);
_o.Club = TableEncryptionService.Convert(this.Club, key);
_o.Role = TableEncryptionService.Convert(this.Role, key);
}
public static Offset<SCHALE.Common.FlatData.EchelonConstraintExcel> Pack(FlatBufferBuilder builder, EchelonConstraintExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.EchelonConstraintExcel>);
var _CharacterId = default(VectorOffset);
if (_o.CharacterId != null) {
var __CharacterId = _o.CharacterId.ToArray();
_CharacterId = CreateCharacterIdVector(builder, __CharacterId);
}
var _PersonalityId = default(VectorOffset);
if (_o.PersonalityId != null) {
var __PersonalityId = _o.PersonalityId.ToArray();
_PersonalityId = CreatePersonalityIdVector(builder, __PersonalityId);
}
return CreateEchelonConstraintExcel(
builder,
_o.GroupId,
_o.IsWhiteList,
_CharacterId,
_PersonalityId,
_o.WeaponType,
_o.School,
_o.Club,
_o.Role);
}
}
public class EchelonConstraintExcelT
{
public long GroupId { get; set; }
public bool IsWhiteList { get; set; }
public List<long> CharacterId { get; set; }
public List<long> PersonalityId { get; set; }
public SCHALE.Common.FlatData.WeaponType WeaponType { get; set; }
public SCHALE.Common.FlatData.School School { get; set; }
public SCHALE.Common.FlatData.Club Club { get; set; }
public SCHALE.Common.FlatData.TacticRole Role { get; set; }
public EchelonConstraintExcelT() {
this.GroupId = 0;
this.IsWhiteList = false;
this.CharacterId = null;
this.PersonalityId = null;
this.WeaponType = SCHALE.Common.FlatData.WeaponType.None;
this.School = SCHALE.Common.FlatData.School.None;
this.Club = SCHALE.Common.FlatData.Club.None;
this.Role = SCHALE.Common.FlatData.TacticRole.None;
}
2024-04-21 00:21:57 +00:00
}
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);
}
}
}