// // automatically generated by the FlatBuffers compiler, do not modify // namespace SCHALE.Common.FlatData { using global::System; using global::System.Collections.Generic; using global::SCHALE.Common.Crypto; 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; } } 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 GetTriggerArgumentBytes() { return __p.__vector_as_span(12, 1); } #else public ArraySegment? GetTriggerArgumentBytes() { return __p.__vector_as_arraysegment(12); } #endif public byte[] GetTriggerArgumentArray() { return __p.__vector_as_array(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; } } 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 GetBehaviorArgumentBytes() { return __p.__vector_as_span(18, 1); } #else public ArraySegment? GetBehaviorArgumentBytes() { return __p.__vector_as_arraysegment(18); } #endif public byte[] GetBehaviorArgumentArray() { return __p.__vector_as_array(18); } public static Offset 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, StringOffset TriggerArgumentOffset = default(StringOffset), long BehaviorRate = 0, SCHALE.Common.FlatData.ExternalBehavior ExternalBehavior_ = SCHALE.Common.FlatData.ExternalBehavior.UseNextExSkill, 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_); BossExternalBTExcel.AddTriggerArgument(builder, TriggerArgumentOffset); BossExternalBTExcel.AddExternalBTTrigger_(builder, ExternalBTTrigger_); BossExternalBTExcel.AddExternalBTNodeType_(builder, ExternalBTNodeType_); 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); } 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); } public static void AddBehaviorArgument(FlatBufferBuilder builder, StringOffset behaviorArgumentOffset) { builder.AddOffset(7, behaviorArgumentOffset.Value, 0); } public static Offset EndBossExternalBTExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } 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); _o.TriggerArgument = TableEncryptionService.Convert(this.TriggerArgument, key); _o.BehaviorRate = TableEncryptionService.Convert(this.BehaviorRate, key); _o.ExternalBehavior_ = TableEncryptionService.Convert(this.ExternalBehavior_, key); _o.BehaviorArgument = TableEncryptionService.Convert(this.BehaviorArgument, key); } public static Offset Pack(FlatBufferBuilder builder, BossExternalBTExcelT _o) { if (_o == null) return default(Offset); 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_, _TriggerArgument, _o.BehaviorRate, _o.ExternalBehavior_, _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; } public string TriggerArgument { get; set; } public long BehaviorRate { get; set; } public SCHALE.Common.FlatData.ExternalBehavior ExternalBehavior_ { get; set; } 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; this.TriggerArgument = null; this.BehaviorRate = 0; this.ExternalBehavior_ = SCHALE.Common.FlatData.ExternalBehavior.UseNextExSkill; this.BehaviorArgument = null; } } 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) && 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) && verifier.VerifyString(tablePos, 18 /*BehaviorArgument*/, false) && verifier.VerifyTableEnd(tablePos); } } }