SCHALE.GameServer/SCHALE.Common/FlatData/PersonalityExcel.cs

92 lines
3.6 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 PersonalityExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static PersonalityExcel GetRootAsPersonalityExcel(ByteBuffer _bb) { return GetRootAsPersonalityExcel(_bb, new PersonalityExcel()); }
public static PersonalityExcel GetRootAsPersonalityExcel(ByteBuffer _bb, PersonalityExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public PersonalityExcel __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 string Name { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetNameBytes() { return __p.__vector_as_span<byte>(6, 1); }
#else
public ArraySegment<byte>? GetNameBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public byte[] GetNameArray() { return __p.__vector_as_array<byte>(6); }
public static Offset<SCHALE.Common.FlatData.PersonalityExcel> CreatePersonalityExcel(FlatBufferBuilder builder,
long Id = 0,
StringOffset NameOffset = default(StringOffset)) {
builder.StartTable(2);
PersonalityExcel.AddId(builder, Id);
PersonalityExcel.AddName(builder, NameOffset);
return PersonalityExcel.EndPersonalityExcel(builder);
}
public static void StartPersonalityExcel(FlatBufferBuilder builder) { builder.StartTable(2); }
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); }
public static void AddName(FlatBufferBuilder builder, StringOffset nameOffset) { builder.AddOffset(1, nameOffset.Value, 0); }
public static Offset<SCHALE.Common.FlatData.PersonalityExcel> EndPersonalityExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.PersonalityExcel>(o);
}
2024-04-29 15:52:45 +00:00
public PersonalityExcelT UnPack() {
var _o = new PersonalityExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(PersonalityExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("Personality");
_o.Id = TableEncryptionService.Convert(this.Id, key);
_o.Name = TableEncryptionService.Convert(this.Name, key);
}
public static Offset<SCHALE.Common.FlatData.PersonalityExcel> Pack(FlatBufferBuilder builder, PersonalityExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.PersonalityExcel>);
var _Name = _o.Name == null ? default(StringOffset) : builder.CreateString(_o.Name);
return CreatePersonalityExcel(
builder,
_o.Id,
_Name);
}
}
public class PersonalityExcelT
{
public long Id { get; set; }
public string Name { get; set; }
public PersonalityExcelT() {
this.Id = 0;
this.Name = null;
}
2024-04-21 00:21:57 +00:00
}
static public class PersonalityExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 6 /*Name*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}