SCHALE.GameServer/SCHALE.Common/FlatData/ScenarioScriptExcel.cs

194 lines
9.9 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 ScenarioScriptExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static ScenarioScriptExcel GetRootAsScenarioScriptExcel(ByteBuffer _bb) { return GetRootAsScenarioScriptExcel(_bb, new ScenarioScriptExcel()); }
public static ScenarioScriptExcel GetRootAsScenarioScriptExcel(ByteBuffer _bb, ScenarioScriptExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public ScenarioScriptExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public long GroupId { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long SelectionGroup { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public long BGMId { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public string Sound { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetSoundBytes() { return __p.__vector_as_span<byte>(10, 1); }
#else
public ArraySegment<byte>? GetSoundBytes() { return __p.__vector_as_arraysegment(10); }
#endif
public byte[] GetSoundArray() { return __p.__vector_as_array<byte>(10); }
public uint Transition { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
public uint BGName { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
public uint BGEffect { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
public string PopupFileName { get { int o = __p.__offset(18); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetPopupFileNameBytes() { return __p.__vector_as_span<byte>(18, 1); }
#else
public ArraySegment<byte>? GetPopupFileNameBytes() { return __p.__vector_as_arraysegment(18); }
#endif
public byte[] GetPopupFileNameArray() { return __p.__vector_as_array<byte>(18); }
public string ScriptKr { get { int o = __p.__offset(20); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetScriptKrBytes() { return __p.__vector_as_span<byte>(20, 1); }
#else
public ArraySegment<byte>? GetScriptKrBytes() { return __p.__vector_as_arraysegment(20); }
#endif
public byte[] GetScriptKrArray() { return __p.__vector_as_array<byte>(20); }
public string TextJp { get { int o = __p.__offset(22); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
#if ENABLE_SPAN_T
public Span<byte> GetTextJpBytes() { return __p.__vector_as_span<byte>(22, 1); }
#else
public ArraySegment<byte>? GetTextJpBytes() { return __p.__vector_as_arraysegment(22); }
#endif
public byte[] GetTextJpArray() { return __p.__vector_as_array<byte>(22); }
public uint VoiceId { get { int o = __p.__offset(24); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
public static Offset<SCHALE.Common.FlatData.ScenarioScriptExcel> CreateScenarioScriptExcel(FlatBufferBuilder builder,
long GroupId = 0,
long SelectionGroup = 0,
long BGMId = 0,
StringOffset SoundOffset = default(StringOffset),
uint Transition = 0,
uint BGName = 0,
uint BGEffect = 0,
StringOffset PopupFileNameOffset = default(StringOffset),
StringOffset ScriptKrOffset = default(StringOffset),
StringOffset TextJpOffset = default(StringOffset),
uint VoiceId = 0) {
builder.StartTable(11);
ScenarioScriptExcel.AddBGMId(builder, BGMId);
ScenarioScriptExcel.AddSelectionGroup(builder, SelectionGroup);
ScenarioScriptExcel.AddGroupId(builder, GroupId);
ScenarioScriptExcel.AddVoiceId(builder, VoiceId);
ScenarioScriptExcel.AddTextJp(builder, TextJpOffset);
ScenarioScriptExcel.AddScriptKr(builder, ScriptKrOffset);
ScenarioScriptExcel.AddPopupFileName(builder, PopupFileNameOffset);
ScenarioScriptExcel.AddBGEffect(builder, BGEffect);
ScenarioScriptExcel.AddBGName(builder, BGName);
ScenarioScriptExcel.AddTransition(builder, Transition);
ScenarioScriptExcel.AddSound(builder, SoundOffset);
return ScenarioScriptExcel.EndScenarioScriptExcel(builder);
}
public static void StartScenarioScriptExcel(FlatBufferBuilder builder) { builder.StartTable(11); }
public static void AddGroupId(FlatBufferBuilder builder, long groupId) { builder.AddLong(0, groupId, 0); }
public static void AddSelectionGroup(FlatBufferBuilder builder, long selectionGroup) { builder.AddLong(1, selectionGroup, 0); }
public static void AddBGMId(FlatBufferBuilder builder, long bGMId) { builder.AddLong(2, bGMId, 0); }
public static void AddSound(FlatBufferBuilder builder, StringOffset soundOffset) { builder.AddOffset(3, soundOffset.Value, 0); }
public static void AddTransition(FlatBufferBuilder builder, uint transition) { builder.AddUint(4, transition, 0); }
public static void AddBGName(FlatBufferBuilder builder, uint bGName) { builder.AddUint(5, bGName, 0); }
public static void AddBGEffect(FlatBufferBuilder builder, uint bGEffect) { builder.AddUint(6, bGEffect, 0); }
public static void AddPopupFileName(FlatBufferBuilder builder, StringOffset popupFileNameOffset) { builder.AddOffset(7, popupFileNameOffset.Value, 0); }
public static void AddScriptKr(FlatBufferBuilder builder, StringOffset scriptKrOffset) { builder.AddOffset(8, scriptKrOffset.Value, 0); }
public static void AddTextJp(FlatBufferBuilder builder, StringOffset textJpOffset) { builder.AddOffset(9, textJpOffset.Value, 0); }
public static void AddVoiceId(FlatBufferBuilder builder, uint voiceId) { builder.AddUint(10, voiceId, 0); }
public static Offset<SCHALE.Common.FlatData.ScenarioScriptExcel> EndScenarioScriptExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.ScenarioScriptExcel>(o);
}
2024-04-29 15:52:45 +00:00
public ScenarioScriptExcelT UnPack() {
var _o = new ScenarioScriptExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(ScenarioScriptExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("ScenarioScript");
_o.GroupId = TableEncryptionService.Convert(this.GroupId, key);
_o.SelectionGroup = TableEncryptionService.Convert(this.SelectionGroup, key);
_o.BGMId = TableEncryptionService.Convert(this.BGMId, key);
_o.Sound = TableEncryptionService.Convert(this.Sound, key);
_o.Transition = TableEncryptionService.Convert(this.Transition, key);
_o.BGName = TableEncryptionService.Convert(this.BGName, key);
_o.BGEffect = TableEncryptionService.Convert(this.BGEffect, key);
_o.PopupFileName = TableEncryptionService.Convert(this.PopupFileName, key);
_o.ScriptKr = TableEncryptionService.Convert(this.ScriptKr, key);
_o.TextJp = TableEncryptionService.Convert(this.TextJp, key);
_o.VoiceId = TableEncryptionService.Convert(this.VoiceId, key);
}
public static Offset<SCHALE.Common.FlatData.ScenarioScriptExcel> Pack(FlatBufferBuilder builder, ScenarioScriptExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.ScenarioScriptExcel>);
var _Sound = _o.Sound == null ? default(StringOffset) : builder.CreateString(_o.Sound);
var _PopupFileName = _o.PopupFileName == null ? default(StringOffset) : builder.CreateString(_o.PopupFileName);
var _ScriptKr = _o.ScriptKr == null ? default(StringOffset) : builder.CreateString(_o.ScriptKr);
var _TextJp = _o.TextJp == null ? default(StringOffset) : builder.CreateString(_o.TextJp);
return CreateScenarioScriptExcel(
builder,
_o.GroupId,
_o.SelectionGroup,
_o.BGMId,
_Sound,
_o.Transition,
_o.BGName,
_o.BGEffect,
_PopupFileName,
_ScriptKr,
_TextJp,
_o.VoiceId);
}
}
public class ScenarioScriptExcelT
{
public long GroupId { get; set; }
public long SelectionGroup { get; set; }
public long BGMId { get; set; }
public string Sound { get; set; }
public uint Transition { get; set; }
public uint BGName { get; set; }
public uint BGEffect { get; set; }
public string PopupFileName { get; set; }
public string ScriptKr { get; set; }
public string TextJp { get; set; }
public uint VoiceId { get; set; }
public ScenarioScriptExcelT() {
this.GroupId = 0;
this.SelectionGroup = 0;
this.BGMId = 0;
this.Sound = null;
this.Transition = 0;
this.BGName = 0;
this.BGEffect = 0;
this.PopupFileName = null;
this.ScriptKr = null;
this.TextJp = null;
this.VoiceId = 0;
}
2024-04-21 00:21:57 +00:00
}
static public class ScenarioScriptExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*GroupId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 6 /*SelectionGroup*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 8 /*BGMId*/, 8 /*long*/, 8, false)
&& verifier.VerifyString(tablePos, 10 /*Sound*/, false)
&& verifier.VerifyField(tablePos, 12 /*Transition*/, 4 /*uint*/, 4, false)
&& verifier.VerifyField(tablePos, 14 /*BGName*/, 4 /*uint*/, 4, false)
&& verifier.VerifyField(tablePos, 16 /*BGEffect*/, 4 /*uint*/, 4, false)
&& verifier.VerifyString(tablePos, 18 /*PopupFileName*/, false)
&& verifier.VerifyString(tablePos, 20 /*ScriptKr*/, false)
&& verifier.VerifyString(tablePos, 22 /*TextJp*/, false)
&& verifier.VerifyField(tablePos, 24 /*VoiceId*/, 4 /*uint*/, 4, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}