SCHALE.GameServer/SCHALE.Common/FlatData/BossExternalBTExcel.cs

153 lines
9.2 KiB
C#
Raw Permalink 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 BossExternalBTExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static BossExternalBTExcel GetRootAsBossExternalBTExcel(ByteBuffer _bb) { return GetRootAsBossExternalBTExcel(_bb, new BossExternalBTExcel()); }
public static BossExternalBTExcel GetRootAsBossExternalBTExcel(ByteBuffer _bb, BossExternalBTExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public BossExternalBTExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public long ExternalBTId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long AIPhase { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public SCHALE.Common.FlatData.ExternalBTNodeType ExternalBTNodeType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.ExternalBTNodeType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ExternalBTNodeType.Sequence; } }
public SCHALE.Common.FlatData.ExternalBTTrigger ExternalBTTrigger { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ExternalBTTrigger)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ExternalBTTrigger.None; } }
2024-04-21 00:21:57 +00:00
public string TriggerArgument { get { int o = __p.__offset(12); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetTriggerArgumentBytes() { return __p.__vector_as_span<byte>(12, 1); }
#else
public ArraySegment<byte>? GetTriggerArgumentBytes() { return __p.__vector_as_arraysegment(12); }
#endif
public byte[] GetTriggerArgumentArray() { return __p.__vector_as_array<byte>(12); }
public long BehaviorRate { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public SCHALE.Common.FlatData.ExternalBehavior ExternalBehavior { get { int o = __p.__offset(16); return o != 0 ? (SCHALE.Common.FlatData.ExternalBehavior)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ExternalBehavior.UseNextExSkill; } }
2024-04-21 00:21:57 +00:00
public string BehaviorArgument { get { int o = __p.__offset(18); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetBehaviorArgumentBytes() { return __p.__vector_as_span<byte>(18, 1); }
#else
public ArraySegment<byte>? GetBehaviorArgumentBytes() { return __p.__vector_as_arraysegment(18); }
#endif
public byte[] GetBehaviorArgumentArray() { return __p.__vector_as_array<byte>(18); }
public static Offset<SCHALE.Common.FlatData.BossExternalBTExcel> CreateBossExternalBTExcel(FlatBufferBuilder builder,
long ExternalBTId = 0,
long AIPhase = 0,
SCHALE.Common.FlatData.ExternalBTNodeType ExternalBTNodeType = SCHALE.Common.FlatData.ExternalBTNodeType.Sequence,
SCHALE.Common.FlatData.ExternalBTTrigger ExternalBTTrigger = SCHALE.Common.FlatData.ExternalBTTrigger.None,
2024-04-21 00:21:57 +00:00
StringOffset TriggerArgumentOffset = default(StringOffset),
long BehaviorRate = 0,
SCHALE.Common.FlatData.ExternalBehavior ExternalBehavior = SCHALE.Common.FlatData.ExternalBehavior.UseNextExSkill,
2024-04-21 00:21:57 +00:00
StringOffset BehaviorArgumentOffset = default(StringOffset)) {
builder.StartTable(8);
BossExternalBTExcel.AddBehaviorRate(builder, BehaviorRate);
BossExternalBTExcel.AddAIPhase(builder, AIPhase);
BossExternalBTExcel.AddExternalBTId(builder, ExternalBTId);
BossExternalBTExcel.AddBehaviorArgument(builder, BehaviorArgumentOffset);
BossExternalBTExcel.AddExternalBehavior(builder, ExternalBehavior);
2024-04-21 00:21:57 +00:00
BossExternalBTExcel.AddTriggerArgument(builder, TriggerArgumentOffset);
BossExternalBTExcel.AddExternalBTTrigger(builder, ExternalBTTrigger);
BossExternalBTExcel.AddExternalBTNodeType(builder, ExternalBTNodeType);
2024-04-21 00:21:57 +00:00
return BossExternalBTExcel.EndBossExternalBTExcel(builder);
}
public static void StartBossExternalBTExcel(FlatBufferBuilder builder) { builder.StartTable(8); }
public static void AddExternalBTId(FlatBufferBuilder builder, long externalBTId) { builder.AddLong(0, externalBTId, 0); }
public static void AddAIPhase(FlatBufferBuilder builder, long aIPhase) { builder.AddLong(1, aIPhase, 0); }
public static void AddExternalBTNodeType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ExternalBTNodeType externalBTNodeType) { builder.AddInt(2, (int)externalBTNodeType, 0); }
public static void AddExternalBTTrigger(FlatBufferBuilder builder, SCHALE.Common.FlatData.ExternalBTTrigger externalBTTrigger) { builder.AddInt(3, (int)externalBTTrigger, 0); }
2024-04-21 00:21:57 +00:00
public static void AddTriggerArgument(FlatBufferBuilder builder, StringOffset triggerArgumentOffset) { builder.AddOffset(4, triggerArgumentOffset.Value, 0); }
public static void AddBehaviorRate(FlatBufferBuilder builder, long behaviorRate) { builder.AddLong(5, behaviorRate, 0); }
public static void AddExternalBehavior(FlatBufferBuilder builder, SCHALE.Common.FlatData.ExternalBehavior externalBehavior) { builder.AddInt(6, (int)externalBehavior, 0); }
2024-04-21 00:21:57 +00:00
public static void AddBehaviorArgument(FlatBufferBuilder builder, StringOffset behaviorArgumentOffset) { builder.AddOffset(7, behaviorArgumentOffset.Value, 0); }
public static Offset<SCHALE.Common.FlatData.BossExternalBTExcel> EndBossExternalBTExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.BossExternalBTExcel>(o);
}
2024-04-29 15:52:45 +00:00
public BossExternalBTExcelT UnPack() {
var _o = new BossExternalBTExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(BossExternalBTExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("BossExternalBT");
_o.ExternalBTId = TableEncryptionService.Convert(this.ExternalBTId, key);
_o.AIPhase = TableEncryptionService.Convert(this.AIPhase, key);
_o.ExternalBTNodeType = TableEncryptionService.Convert(this.ExternalBTNodeType, key);
_o.ExternalBTTrigger = TableEncryptionService.Convert(this.ExternalBTTrigger, key);
2024-04-29 15:52:45 +00:00
_o.TriggerArgument = TableEncryptionService.Convert(this.TriggerArgument, key);
_o.BehaviorRate = TableEncryptionService.Convert(this.BehaviorRate, key);
_o.ExternalBehavior = TableEncryptionService.Convert(this.ExternalBehavior, key);
2024-04-29 15:52:45 +00:00
_o.BehaviorArgument = TableEncryptionService.Convert(this.BehaviorArgument, key);
}
public static Offset<SCHALE.Common.FlatData.BossExternalBTExcel> Pack(FlatBufferBuilder builder, BossExternalBTExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.BossExternalBTExcel>);
var _TriggerArgument = _o.TriggerArgument == null ? default(StringOffset) : builder.CreateString(_o.TriggerArgument);
var _BehaviorArgument = _o.BehaviorArgument == null ? default(StringOffset) : builder.CreateString(_o.BehaviorArgument);
return CreateBossExternalBTExcel(
builder,
_o.ExternalBTId,
_o.AIPhase,
_o.ExternalBTNodeType,
_o.ExternalBTTrigger,
2024-04-29 15:52:45 +00:00
_TriggerArgument,
_o.BehaviorRate,
_o.ExternalBehavior,
2024-04-29 15:52:45 +00:00
_BehaviorArgument);
}
}
public class BossExternalBTExcelT
{
public long ExternalBTId { get; set; }
public long AIPhase { get; set; }
public SCHALE.Common.FlatData.ExternalBTNodeType ExternalBTNodeType { get; set; }
public SCHALE.Common.FlatData.ExternalBTTrigger ExternalBTTrigger { get; set; }
2024-04-29 15:52:45 +00:00
public string TriggerArgument { get; set; }
public long BehaviorRate { get; set; }
public SCHALE.Common.FlatData.ExternalBehavior ExternalBehavior { get; set; }
2024-04-29 15:52:45 +00:00
public string BehaviorArgument { get; set; }
public BossExternalBTExcelT() {
this.ExternalBTId = 0;
this.AIPhase = 0;
this.ExternalBTNodeType = SCHALE.Common.FlatData.ExternalBTNodeType.Sequence;
this.ExternalBTTrigger = SCHALE.Common.FlatData.ExternalBTTrigger.None;
2024-04-29 15:52:45 +00:00
this.TriggerArgument = null;
this.BehaviorRate = 0;
this.ExternalBehavior = SCHALE.Common.FlatData.ExternalBehavior.UseNextExSkill;
2024-04-29 15:52:45 +00:00
this.BehaviorArgument = null;
}
2024-04-21 00:21:57 +00:00
}
static public class BossExternalBTExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*ExternalBTId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 6 /*AIPhase*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 8 /*ExternalBTNodeType*/, 4 /*SCHALE.Common.FlatData.ExternalBTNodeType*/, 4, false)
&& verifier.VerifyField(tablePos, 10 /*ExternalBTTrigger*/, 4 /*SCHALE.Common.FlatData.ExternalBTTrigger*/, 4, false)
2024-04-21 00:21:57 +00:00
&& verifier.VerifyString(tablePos, 12 /*TriggerArgument*/, false)
&& verifier.VerifyField(tablePos, 14 /*BehaviorRate*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 16 /*ExternalBehavior*/, 4 /*SCHALE.Common.FlatData.ExternalBehavior*/, 4, false)
2024-04-21 00:21:57 +00:00
&& verifier.VerifyString(tablePos, 18 /*BehaviorArgument*/, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}