forked from Raphael/SCHALE.GameServer
166 lines
11 KiB
C#
166 lines
11 KiB
C#
// <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;
|
|
using global::SCHALE.Common.Crypto;
|
|
using global::Google.FlatBuffers;
|
|
|
|
public struct CharacterCalculationLimitExcel : IFlatbufferObject
|
|
{
|
|
private Table __p;
|
|
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
|
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
|
|
public static CharacterCalculationLimitExcel GetRootAsCharacterCalculationLimitExcel(ByteBuffer _bb) { return GetRootAsCharacterCalculationLimitExcel(_bb, new CharacterCalculationLimitExcel()); }
|
|
public static CharacterCalculationLimitExcel GetRootAsCharacterCalculationLimitExcel(ByteBuffer _bb, CharacterCalculationLimitExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
|
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
|
|
public CharacterCalculationLimitExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
|
|
|
public long Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
public SCHALE.Common.FlatData.TacticEntityType TacticEntityType { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.TacticEntityType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.TacticEntityType.None; } }
|
|
public SCHALE.Common.FlatData.BattleCalculationStat CalculationValue { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.BattleCalculationStat)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.BattleCalculationStat.FinalDamage; } }
|
|
public long MinValue { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
public long MaxValue { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
public long LimitStartValue(int j) { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
|
|
public int LimitStartValueLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<long> GetLimitStartValueBytes() { return __p.__vector_as_span<long>(14, 8); }
|
|
#else
|
|
public ArraySegment<byte>? GetLimitStartValueBytes() { return __p.__vector_as_arraysegment(14); }
|
|
#endif
|
|
public long[] GetLimitStartValueArray() { return __p.__vector_as_array<long>(14); }
|
|
public long DecreaseRate(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
|
|
public int DecreaseRateLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<long> GetDecreaseRateBytes() { return __p.__vector_as_span<long>(16, 8); }
|
|
#else
|
|
public ArraySegment<byte>? GetDecreaseRateBytes() { return __p.__vector_as_arraysegment(16); }
|
|
#endif
|
|
public long[] GetDecreaseRateArray() { return __p.__vector_as_array<long>(16); }
|
|
|
|
public static Offset<SCHALE.Common.FlatData.CharacterCalculationLimitExcel> CreateCharacterCalculationLimitExcel(FlatBufferBuilder builder,
|
|
long Id = 0,
|
|
SCHALE.Common.FlatData.TacticEntityType TacticEntityType = SCHALE.Common.FlatData.TacticEntityType.None,
|
|
SCHALE.Common.FlatData.BattleCalculationStat CalculationValue = SCHALE.Common.FlatData.BattleCalculationStat.FinalDamage,
|
|
long MinValue = 0,
|
|
long MaxValue = 0,
|
|
VectorOffset LimitStartValueOffset = default(VectorOffset),
|
|
VectorOffset DecreaseRateOffset = default(VectorOffset)) {
|
|
builder.StartTable(7);
|
|
CharacterCalculationLimitExcel.AddMaxValue(builder, MaxValue);
|
|
CharacterCalculationLimitExcel.AddMinValue(builder, MinValue);
|
|
CharacterCalculationLimitExcel.AddId(builder, Id);
|
|
CharacterCalculationLimitExcel.AddDecreaseRate(builder, DecreaseRateOffset);
|
|
CharacterCalculationLimitExcel.AddLimitStartValue(builder, LimitStartValueOffset);
|
|
CharacterCalculationLimitExcel.AddCalculationValue(builder, CalculationValue);
|
|
CharacterCalculationLimitExcel.AddTacticEntityType(builder, TacticEntityType);
|
|
return CharacterCalculationLimitExcel.EndCharacterCalculationLimitExcel(builder);
|
|
}
|
|
|
|
public static void StartCharacterCalculationLimitExcel(FlatBufferBuilder builder) { builder.StartTable(7); }
|
|
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); }
|
|
public static void AddTacticEntityType(FlatBufferBuilder builder, SCHALE.Common.FlatData.TacticEntityType tacticEntityType) { builder.AddInt(1, (int)tacticEntityType, 0); }
|
|
public static void AddCalculationValue(FlatBufferBuilder builder, SCHALE.Common.FlatData.BattleCalculationStat calculationValue) { builder.AddInt(2, (int)calculationValue, 0); }
|
|
public static void AddMinValue(FlatBufferBuilder builder, long minValue) { builder.AddLong(3, minValue, 0); }
|
|
public static void AddMaxValue(FlatBufferBuilder builder, long maxValue) { builder.AddLong(4, maxValue, 0); }
|
|
public static void AddLimitStartValue(FlatBufferBuilder builder, VectorOffset limitStartValueOffset) { builder.AddOffset(5, limitStartValueOffset.Value, 0); }
|
|
public static VectorOffset CreateLimitStartValueVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); }
|
|
public static VectorOffset CreateLimitStartValueVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateLimitStartValueVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateLimitStartValueVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
public static void StartLimitStartValueVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
|
|
public static void AddDecreaseRate(FlatBufferBuilder builder, VectorOffset decreaseRateOffset) { builder.AddOffset(6, decreaseRateOffset.Value, 0); }
|
|
public static VectorOffset CreateDecreaseRateVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); }
|
|
public static VectorOffset CreateDecreaseRateVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateDecreaseRateVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateDecreaseRateVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
public static void StartDecreaseRateVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
|
|
public static Offset<SCHALE.Common.FlatData.CharacterCalculationLimitExcel> EndCharacterCalculationLimitExcel(FlatBufferBuilder builder) {
|
|
int o = builder.EndTable();
|
|
return new Offset<SCHALE.Common.FlatData.CharacterCalculationLimitExcel>(o);
|
|
}
|
|
public CharacterCalculationLimitExcelT UnPack() {
|
|
var _o = new CharacterCalculationLimitExcelT();
|
|
this.UnPackTo(_o);
|
|
return _o;
|
|
}
|
|
public void UnPackTo(CharacterCalculationLimitExcelT _o) {
|
|
byte[] key = TableEncryptionService.CreateKey("CharacterCalculationLimit");
|
|
_o.Id = TableEncryptionService.Convert(this.Id, key);
|
|
_o.TacticEntityType = TableEncryptionService.Convert(this.TacticEntityType, key);
|
|
_o.CalculationValue = TableEncryptionService.Convert(this.CalculationValue, key);
|
|
_o.MinValue = TableEncryptionService.Convert(this.MinValue, key);
|
|
_o.MaxValue = TableEncryptionService.Convert(this.MaxValue, key);
|
|
_o.LimitStartValue = new List<long>();
|
|
for (var _j = 0; _j < this.LimitStartValueLength; ++_j) {_o.LimitStartValue.Add(TableEncryptionService.Convert(this.LimitStartValue(_j), key));}
|
|
_o.DecreaseRate = new List<long>();
|
|
for (var _j = 0; _j < this.DecreaseRateLength; ++_j) {_o.DecreaseRate.Add(TableEncryptionService.Convert(this.DecreaseRate(_j), key));}
|
|
}
|
|
public static Offset<SCHALE.Common.FlatData.CharacterCalculationLimitExcel> Pack(FlatBufferBuilder builder, CharacterCalculationLimitExcelT _o) {
|
|
if (_o == null) return default(Offset<SCHALE.Common.FlatData.CharacterCalculationLimitExcel>);
|
|
var _LimitStartValue = default(VectorOffset);
|
|
if (_o.LimitStartValue != null) {
|
|
var __LimitStartValue = _o.LimitStartValue.ToArray();
|
|
_LimitStartValue = CreateLimitStartValueVector(builder, __LimitStartValue);
|
|
}
|
|
var _DecreaseRate = default(VectorOffset);
|
|
if (_o.DecreaseRate != null) {
|
|
var __DecreaseRate = _o.DecreaseRate.ToArray();
|
|
_DecreaseRate = CreateDecreaseRateVector(builder, __DecreaseRate);
|
|
}
|
|
return CreateCharacterCalculationLimitExcel(
|
|
builder,
|
|
_o.Id,
|
|
_o.TacticEntityType,
|
|
_o.CalculationValue,
|
|
_o.MinValue,
|
|
_o.MaxValue,
|
|
_LimitStartValue,
|
|
_DecreaseRate);
|
|
}
|
|
}
|
|
|
|
public class CharacterCalculationLimitExcelT
|
|
{
|
|
public long Id { get; set; }
|
|
public SCHALE.Common.FlatData.TacticEntityType TacticEntityType { get; set; }
|
|
public SCHALE.Common.FlatData.BattleCalculationStat CalculationValue { get; set; }
|
|
public long MinValue { get; set; }
|
|
public long MaxValue { get; set; }
|
|
public List<long> LimitStartValue { get; set; }
|
|
public List<long> DecreaseRate { get; set; }
|
|
|
|
public CharacterCalculationLimitExcelT() {
|
|
this.Id = 0;
|
|
this.TacticEntityType = SCHALE.Common.FlatData.TacticEntityType.None;
|
|
this.CalculationValue = SCHALE.Common.FlatData.BattleCalculationStat.FinalDamage;
|
|
this.MinValue = 0;
|
|
this.MaxValue = 0;
|
|
this.LimitStartValue = null;
|
|
this.DecreaseRate = null;
|
|
}
|
|
}
|
|
|
|
|
|
static public class CharacterCalculationLimitExcelVerify
|
|
{
|
|
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
|
|
{
|
|
return verifier.VerifyTableStart(tablePos)
|
|
&& verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false)
|
|
&& verifier.VerifyField(tablePos, 6 /*TacticEntityType*/, 4 /*SCHALE.Common.FlatData.TacticEntityType*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 8 /*CalculationValue*/, 4 /*SCHALE.Common.FlatData.BattleCalculationStat*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 10 /*MinValue*/, 8 /*long*/, 8, false)
|
|
&& verifier.VerifyField(tablePos, 12 /*MaxValue*/, 8 /*long*/, 8, false)
|
|
&& verifier.VerifyVectorOfData(tablePos, 14 /*LimitStartValue*/, 8 /*long*/, false)
|
|
&& verifier.VerifyVectorOfData(tablePos, 16 /*DecreaseRate*/, 8 /*long*/, false)
|
|
&& verifier.VerifyTableEnd(tablePos);
|
|
}
|
|
}
|
|
|
|
}
|