// // 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 ConstFieldExcel : IFlatbufferObject { private Table __p; public ByteBuffer ByteBuffer { get { return __p.bb; } } public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); } public static ConstFieldExcel GetRootAsConstFieldExcel(ByteBuffer _bb) { return GetRootAsConstFieldExcel(_bb, new ConstFieldExcel()); } public static ConstFieldExcel GetRootAsConstFieldExcel(ByteBuffer _bb, ConstFieldExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } public ConstFieldExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public int DialogSmoothTime { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int TalkDialogDurationDefault { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int ThinkDialogDurationDefault { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int IdleThinkDelayMin { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public int IdleThinkDelayMax { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } public static Offset CreateConstFieldExcel(FlatBufferBuilder builder, int DialogSmoothTime = 0, int TalkDialogDurationDefault = 0, int ThinkDialogDurationDefault = 0, int IdleThinkDelayMin = 0, int IdleThinkDelayMax = 0) { builder.StartTable(5); ConstFieldExcel.AddIdleThinkDelayMax(builder, IdleThinkDelayMax); ConstFieldExcel.AddIdleThinkDelayMin(builder, IdleThinkDelayMin); ConstFieldExcel.AddThinkDialogDurationDefault(builder, ThinkDialogDurationDefault); ConstFieldExcel.AddTalkDialogDurationDefault(builder, TalkDialogDurationDefault); ConstFieldExcel.AddDialogSmoothTime(builder, DialogSmoothTime); return ConstFieldExcel.EndConstFieldExcel(builder); } public static void StartConstFieldExcel(FlatBufferBuilder builder) { builder.StartTable(5); } public static void AddDialogSmoothTime(FlatBufferBuilder builder, int dialogSmoothTime) { builder.AddInt(0, dialogSmoothTime, 0); } public static void AddTalkDialogDurationDefault(FlatBufferBuilder builder, int talkDialogDurationDefault) { builder.AddInt(1, talkDialogDurationDefault, 0); } public static void AddThinkDialogDurationDefault(FlatBufferBuilder builder, int thinkDialogDurationDefault) { builder.AddInt(2, thinkDialogDurationDefault, 0); } public static void AddIdleThinkDelayMin(FlatBufferBuilder builder, int idleThinkDelayMin) { builder.AddInt(3, idleThinkDelayMin, 0); } public static void AddIdleThinkDelayMax(FlatBufferBuilder builder, int idleThinkDelayMax) { builder.AddInt(4, idleThinkDelayMax, 0); } public static Offset EndConstFieldExcel(FlatBufferBuilder builder) { int o = builder.EndTable(); return new Offset(o); } public ConstFieldExcelT UnPack() { var _o = new ConstFieldExcelT(); this.UnPackTo(_o); return _o; } public void UnPackTo(ConstFieldExcelT _o) { byte[] key = TableEncryptionService.CreateKey("ConstField"); _o.DialogSmoothTime = TableEncryptionService.Convert(this.DialogSmoothTime, key); _o.TalkDialogDurationDefault = TableEncryptionService.Convert(this.TalkDialogDurationDefault, key); _o.ThinkDialogDurationDefault = TableEncryptionService.Convert(this.ThinkDialogDurationDefault, key); _o.IdleThinkDelayMin = TableEncryptionService.Convert(this.IdleThinkDelayMin, key); _o.IdleThinkDelayMax = TableEncryptionService.Convert(this.IdleThinkDelayMax, key); } public static Offset Pack(FlatBufferBuilder builder, ConstFieldExcelT _o) { if (_o == null) return default(Offset); return CreateConstFieldExcel( builder, _o.DialogSmoothTime, _o.TalkDialogDurationDefault, _o.ThinkDialogDurationDefault, _o.IdleThinkDelayMin, _o.IdleThinkDelayMax); } } public class ConstFieldExcelT { public int DialogSmoothTime { get; set; } public int TalkDialogDurationDefault { get; set; } public int ThinkDialogDurationDefault { get; set; } public int IdleThinkDelayMin { get; set; } public int IdleThinkDelayMax { get; set; } public ConstFieldExcelT() { this.DialogSmoothTime = 0; this.TalkDialogDurationDefault = 0; this.ThinkDialogDurationDefault = 0; this.IdleThinkDelayMin = 0; this.IdleThinkDelayMax = 0; } } static public class ConstFieldExcelVerify { static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos) { return verifier.VerifyTableStart(tablePos) && verifier.VerifyField(tablePos, 4 /*DialogSmoothTime*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 6 /*TalkDialogDurationDefault*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 8 /*ThinkDialogDurationDefault*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 10 /*IdleThinkDelayMin*/, 4 /*int*/, 4, false) && verifier.VerifyField(tablePos, 12 /*IdleThinkDelayMax*/, 4 /*int*/, 4, false) && verifier.VerifyTableEnd(tablePos); } } }