SCHALE.GameServer/SCHALE.Common/FlatData/EventContentBuffExcel.cs

189 lines
12 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 EventContentBuffExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static EventContentBuffExcel GetRootAsEventContentBuffExcel(ByteBuffer _bb) { return GetRootAsEventContentBuffExcel(_bb, new EventContentBuffExcel()); }
public static EventContentBuffExcel GetRootAsEventContentBuffExcel(ByteBuffer _bb, EventContentBuffExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public EventContentBuffExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public long EventContentBuffId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public bool IsBuff { get { int o = __p.__offset(6); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public SCHALE.Common.FlatData.Tag CharacterTag { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.Tag)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.Tag.A; } }
public SCHALE.Common.FlatData.EventContentBuffFindRule EnumType { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.EventContentBuffFindRule)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.EventContentBuffFindRule.None; } }
public string EnumTypeValue(int j) { int o = __p.__offset(12); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
public int EnumTypeValueLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } }
public string SkillGroupId { get { int o = __p.__offset(14); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetSkillGroupIdBytes() { return __p.__vector_as_span<byte>(14, 1); }
#else
public ArraySegment<byte>? GetSkillGroupIdBytes() { return __p.__vector_as_arraysegment(14); }
#endif
public byte[] GetSkillGroupIdArray() { return __p.__vector_as_array<byte>(14); }
public string IconPath { get { int o = __p.__offset(16); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetIconPathBytes() { return __p.__vector_as_span<byte>(16, 1); }
#else
public ArraySegment<byte>? GetIconPathBytes() { return __p.__vector_as_arraysegment(16); }
#endif
public byte[] GetIconPathArray() { return __p.__vector_as_array<byte>(16); }
public string SpriteName { get { int o = __p.__offset(18); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetSpriteNameBytes() { return __p.__vector_as_span<byte>(18, 1); }
#else
public ArraySegment<byte>? GetSpriteNameBytes() { return __p.__vector_as_arraysegment(18); }
#endif
public byte[] GetSpriteNameArray() { return __p.__vector_as_array<byte>(18); }
public string BuffDescriptionLocalizeCodeId { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetBuffDescriptionLocalizeCodeIdBytes() { return __p.__vector_as_span<byte>(20, 1); }
#else
public ArraySegment<byte>? GetBuffDescriptionLocalizeCodeIdBytes() { return __p.__vector_as_arraysegment(20); }
#endif
public byte[] GetBuffDescriptionLocalizeCodeIdArray() { return __p.__vector_as_array<byte>(20); }
public static Offset<SCHALE.Common.FlatData.EventContentBuffExcel> CreateEventContentBuffExcel(FlatBufferBuilder builder,
long EventContentBuffId = 0,
bool IsBuff = false,
SCHALE.Common.FlatData.Tag CharacterTag = SCHALE.Common.FlatData.Tag.A,
SCHALE.Common.FlatData.EventContentBuffFindRule EnumType = SCHALE.Common.FlatData.EventContentBuffFindRule.None,
VectorOffset EnumTypeValueOffset = default(VectorOffset),
StringOffset SkillGroupIdOffset = default(StringOffset),
StringOffset IconPathOffset = default(StringOffset),
StringOffset SpriteNameOffset = default(StringOffset),
StringOffset BuffDescriptionLocalizeCodeIdOffset = default(StringOffset)) {
builder.StartTable(9);
EventContentBuffExcel.AddEventContentBuffId(builder, EventContentBuffId);
EventContentBuffExcel.AddBuffDescriptionLocalizeCodeId(builder, BuffDescriptionLocalizeCodeIdOffset);
EventContentBuffExcel.AddSpriteName(builder, SpriteNameOffset);
EventContentBuffExcel.AddIconPath(builder, IconPathOffset);
EventContentBuffExcel.AddSkillGroupId(builder, SkillGroupIdOffset);
EventContentBuffExcel.AddEnumTypeValue(builder, EnumTypeValueOffset);
EventContentBuffExcel.AddEnumType(builder, EnumType);
EventContentBuffExcel.AddCharacterTag(builder, CharacterTag);
EventContentBuffExcel.AddIsBuff(builder, IsBuff);
return EventContentBuffExcel.EndEventContentBuffExcel(builder);
}
public static void StartEventContentBuffExcel(FlatBufferBuilder builder) { builder.StartTable(9); }
public static void AddEventContentBuffId(FlatBufferBuilder builder, long eventContentBuffId) { builder.AddLong(0, eventContentBuffId, 0); }
public static void AddIsBuff(FlatBufferBuilder builder, bool isBuff) { builder.AddBool(1, isBuff, false); }
public static void AddCharacterTag(FlatBufferBuilder builder, SCHALE.Common.FlatData.Tag characterTag) { builder.AddInt(2, (int)characterTag, 0); }
public static void AddEnumType(FlatBufferBuilder builder, SCHALE.Common.FlatData.EventContentBuffFindRule enumType) { builder.AddInt(3, (int)enumType, 0); }
public static void AddEnumTypeValue(FlatBufferBuilder builder, VectorOffset enumTypeValueOffset) { builder.AddOffset(4, enumTypeValueOffset.Value, 0); }
public static VectorOffset CreateEnumTypeValueVector(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 CreateEnumTypeValueVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateEnumTypeValueVectorBlock(FlatBufferBuilder builder, ArraySegment<StringOffset> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateEnumTypeValueVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<StringOffset>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartEnumTypeValueVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddSkillGroupId(FlatBufferBuilder builder, StringOffset skillGroupIdOffset) { builder.AddOffset(5, skillGroupIdOffset.Value, 0); }
public static void AddIconPath(FlatBufferBuilder builder, StringOffset iconPathOffset) { builder.AddOffset(6, iconPathOffset.Value, 0); }
public static void AddSpriteName(FlatBufferBuilder builder, StringOffset spriteNameOffset) { builder.AddOffset(7, spriteNameOffset.Value, 0); }
public static void AddBuffDescriptionLocalizeCodeId(FlatBufferBuilder builder, StringOffset buffDescriptionLocalizeCodeIdOffset) { builder.AddOffset(8, buffDescriptionLocalizeCodeIdOffset.Value, 0); }
public static Offset<SCHALE.Common.FlatData.EventContentBuffExcel> EndEventContentBuffExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.EventContentBuffExcel>(o);
}
2024-04-29 15:52:45 +00:00
public EventContentBuffExcelT UnPack() {
var _o = new EventContentBuffExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(EventContentBuffExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("EventContentBuff");
_o.EventContentBuffId = TableEncryptionService.Convert(this.EventContentBuffId, key);
_o.IsBuff = TableEncryptionService.Convert(this.IsBuff, key);
_o.CharacterTag = TableEncryptionService.Convert(this.CharacterTag, key);
_o.EnumType = TableEncryptionService.Convert(this.EnumType, key);
_o.EnumTypeValue = new List<string>();
for (var _j = 0; _j < this.EnumTypeValueLength; ++_j) {_o.EnumTypeValue.Add(TableEncryptionService.Convert(this.EnumTypeValue(_j), key));}
_o.SkillGroupId = TableEncryptionService.Convert(this.SkillGroupId, key);
_o.IconPath = TableEncryptionService.Convert(this.IconPath, key);
_o.SpriteName = TableEncryptionService.Convert(this.SpriteName, key);
_o.BuffDescriptionLocalizeCodeId = TableEncryptionService.Convert(this.BuffDescriptionLocalizeCodeId, key);
}
public static Offset<SCHALE.Common.FlatData.EventContentBuffExcel> Pack(FlatBufferBuilder builder, EventContentBuffExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.EventContentBuffExcel>);
var _EnumTypeValue = default(VectorOffset);
if (_o.EnumTypeValue != null) {
var __EnumTypeValue = new StringOffset[_o.EnumTypeValue.Count];
for (var _j = 0; _j < __EnumTypeValue.Length; ++_j) { __EnumTypeValue[_j] = builder.CreateString(_o.EnumTypeValue[_j]); }
_EnumTypeValue = CreateEnumTypeValueVector(builder, __EnumTypeValue);
}
var _SkillGroupId = _o.SkillGroupId == null ? default(StringOffset) : builder.CreateString(_o.SkillGroupId);
var _IconPath = _o.IconPath == null ? default(StringOffset) : builder.CreateString(_o.IconPath);
var _SpriteName = _o.SpriteName == null ? default(StringOffset) : builder.CreateString(_o.SpriteName);
var _BuffDescriptionLocalizeCodeId = _o.BuffDescriptionLocalizeCodeId == null ? default(StringOffset) : builder.CreateString(_o.BuffDescriptionLocalizeCodeId);
return CreateEventContentBuffExcel(
builder,
_o.EventContentBuffId,
_o.IsBuff,
_o.CharacterTag,
_o.EnumType,
_EnumTypeValue,
_SkillGroupId,
_IconPath,
_SpriteName,
_BuffDescriptionLocalizeCodeId);
}
}
public class EventContentBuffExcelT
{
public long EventContentBuffId { get; set; }
public bool IsBuff { get; set; }
public SCHALE.Common.FlatData.Tag CharacterTag { get; set; }
public SCHALE.Common.FlatData.EventContentBuffFindRule EnumType { get; set; }
public List<string> EnumTypeValue { get; set; }
public string SkillGroupId { get; set; }
public string IconPath { get; set; }
public string SpriteName { get; set; }
public string BuffDescriptionLocalizeCodeId { get; set; }
public EventContentBuffExcelT() {
this.EventContentBuffId = 0;
this.IsBuff = false;
this.CharacterTag = SCHALE.Common.FlatData.Tag.A;
this.EnumType = SCHALE.Common.FlatData.EventContentBuffFindRule.None;
this.EnumTypeValue = null;
this.SkillGroupId = null;
this.IconPath = null;
this.SpriteName = null;
this.BuffDescriptionLocalizeCodeId = null;
}
2024-04-21 00:21:57 +00:00
}
static public class EventContentBuffExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*EventContentBuffId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 6 /*IsBuff*/, 1 /*bool*/, 1, false)
&& verifier.VerifyField(tablePos, 8 /*CharacterTag*/, 4 /*SCHALE.Common.FlatData.Tag*/, 4, false)
&& verifier.VerifyField(tablePos, 10 /*EnumType*/, 4 /*SCHALE.Common.FlatData.EventContentBuffFindRule*/, 4, false)
&& verifier.VerifyVectorOfStrings(tablePos, 12 /*EnumTypeValue*/, false)
&& verifier.VerifyString(tablePos, 14 /*SkillGroupId*/, false)
&& verifier.VerifyString(tablePos, 16 /*IconPath*/, false)
&& verifier.VerifyString(tablePos, 18 /*SpriteName*/, false)
&& verifier.VerifyString(tablePos, 20 /*BuffDescriptionLocalizeCodeId*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}