SCHALE.GameServer/SCHALE.Common/FlatData/CharacterPotentialRewardExc...

157 lines
11 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 CharacterPotentialRewardExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static CharacterPotentialRewardExcel GetRootAsCharacterPotentialRewardExcel(ByteBuffer _bb) { return GetRootAsCharacterPotentialRewardExcel(_bb, new CharacterPotentialRewardExcel()); }
public static CharacterPotentialRewardExcel GetRootAsCharacterPotentialRewardExcel(ByteBuffer _bb, CharacterPotentialRewardExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public CharacterPotentialRewardExcel __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.PotentialStatBonusRateType RequirePotentialStatType(int j) { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.PotentialStatBonusRateType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.PotentialStatBonusRateType)0; }
public int RequirePotentialStatTypeLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<SCHALE.Common.FlatData.PotentialStatBonusRateType> GetRequirePotentialStatTypeBytes() { return __p.__vector_as_span<SCHALE.Common.FlatData.PotentialStatBonusRateType>(6, 4); }
#else
public ArraySegment<byte>? GetRequirePotentialStatTypeBytes() { return __p.__vector_as_arraysegment(6); }
#endif
public SCHALE.Common.FlatData.PotentialStatBonusRateType[] GetRequirePotentialStatTypeArray() { int o = __p.__offset(6); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.PotentialStatBonusRateType[] a = new SCHALE.Common.FlatData.PotentialStatBonusRateType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.PotentialStatBonusRateType)__p.bb.GetInt(p + i * 4); } return a; }
public long RequirePotentialStatLevel(int j) { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
public int RequirePotentialStatLevelLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } }
#if ENABLE_SPAN_T
public Span<long> GetRequirePotentialStatLevelBytes() { return __p.__vector_as_span<long>(8, 8); }
#else
public ArraySegment<byte>? GetRequirePotentialStatLevelBytes() { return __p.__vector_as_arraysegment(8); }
#endif
public long[] GetRequirePotentialStatLevelArray() { return __p.__vector_as_array<long>(8); }
public SCHALE.Common.FlatData.ParcelType RewardParcelType { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.ParcelType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ParcelType.None; } }
public long RewardId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public int RewardAmount { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public static Offset<SCHALE.Common.FlatData.CharacterPotentialRewardExcel> CreateCharacterPotentialRewardExcel(FlatBufferBuilder builder,
long Id = 0,
VectorOffset RequirePotentialStatTypeOffset = default(VectorOffset),
VectorOffset RequirePotentialStatLevelOffset = default(VectorOffset),
SCHALE.Common.FlatData.ParcelType RewardParcelType = SCHALE.Common.FlatData.ParcelType.None,
long RewardId = 0,
int RewardAmount = 0) {
builder.StartTable(6);
CharacterPotentialRewardExcel.AddRewardId(builder, RewardId);
CharacterPotentialRewardExcel.AddId(builder, Id);
CharacterPotentialRewardExcel.AddRewardAmount(builder, RewardAmount);
CharacterPotentialRewardExcel.AddRewardParcelType(builder, RewardParcelType);
CharacterPotentialRewardExcel.AddRequirePotentialStatLevel(builder, RequirePotentialStatLevelOffset);
CharacterPotentialRewardExcel.AddRequirePotentialStatType(builder, RequirePotentialStatTypeOffset);
return CharacterPotentialRewardExcel.EndCharacterPotentialRewardExcel(builder);
}
public static void StartCharacterPotentialRewardExcel(FlatBufferBuilder builder) { builder.StartTable(6); }
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); }
public static void AddRequirePotentialStatType(FlatBufferBuilder builder, VectorOffset requirePotentialStatTypeOffset) { builder.AddOffset(1, requirePotentialStatTypeOffset.Value, 0); }
public static VectorOffset CreateRequirePotentialStatTypeVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.PotentialStatBonusRateType[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt((int)data[i]); return builder.EndVector(); }
public static VectorOffset CreateRequirePotentialStatTypeVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.PotentialStatBonusRateType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRequirePotentialStatTypeVectorBlock(FlatBufferBuilder builder, ArraySegment<SCHALE.Common.FlatData.PotentialStatBonusRateType> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRequirePotentialStatTypeVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<SCHALE.Common.FlatData.PotentialStatBonusRateType>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRequirePotentialStatTypeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
public static void AddRequirePotentialStatLevel(FlatBufferBuilder builder, VectorOffset requirePotentialStatLevelOffset) { builder.AddOffset(2, requirePotentialStatLevelOffset.Value, 0); }
public static VectorOffset CreateRequirePotentialStatLevelVector(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 CreateRequirePotentialStatLevelVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRequirePotentialStatLevelVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
public static VectorOffset CreateRequirePotentialStatLevelVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
public static void StartRequirePotentialStatLevelVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
public static void AddRewardParcelType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType rewardParcelType) { builder.AddInt(3, (int)rewardParcelType, 0); }
public static void AddRewardId(FlatBufferBuilder builder, long rewardId) { builder.AddLong(4, rewardId, 0); }
public static void AddRewardAmount(FlatBufferBuilder builder, int rewardAmount) { builder.AddInt(5, rewardAmount, 0); }
public static Offset<SCHALE.Common.FlatData.CharacterPotentialRewardExcel> EndCharacterPotentialRewardExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.CharacterPotentialRewardExcel>(o);
}
2024-04-29 15:52:45 +00:00
public CharacterPotentialRewardExcelT UnPack() {
var _o = new CharacterPotentialRewardExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(CharacterPotentialRewardExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("CharacterPotentialReward");
_o.Id = TableEncryptionService.Convert(this.Id, key);
_o.RequirePotentialStatType = new List<SCHALE.Common.FlatData.PotentialStatBonusRateType>();
for (var _j = 0; _j < this.RequirePotentialStatTypeLength; ++_j) {_o.RequirePotentialStatType.Add(TableEncryptionService.Convert(this.RequirePotentialStatType(_j), key));}
_o.RequirePotentialStatLevel = new List<long>();
for (var _j = 0; _j < this.RequirePotentialStatLevelLength; ++_j) {_o.RequirePotentialStatLevel.Add(TableEncryptionService.Convert(this.RequirePotentialStatLevel(_j), key));}
_o.RewardParcelType = TableEncryptionService.Convert(this.RewardParcelType, key);
_o.RewardId = TableEncryptionService.Convert(this.RewardId, key);
_o.RewardAmount = TableEncryptionService.Convert(this.RewardAmount, key);
}
public static Offset<SCHALE.Common.FlatData.CharacterPotentialRewardExcel> Pack(FlatBufferBuilder builder, CharacterPotentialRewardExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.CharacterPotentialRewardExcel>);
var _RequirePotentialStatType = default(VectorOffset);
if (_o.RequirePotentialStatType != null) {
var __RequirePotentialStatType = _o.RequirePotentialStatType.ToArray();
_RequirePotentialStatType = CreateRequirePotentialStatTypeVector(builder, __RequirePotentialStatType);
}
var _RequirePotentialStatLevel = default(VectorOffset);
if (_o.RequirePotentialStatLevel != null) {
var __RequirePotentialStatLevel = _o.RequirePotentialStatLevel.ToArray();
_RequirePotentialStatLevel = CreateRequirePotentialStatLevelVector(builder, __RequirePotentialStatLevel);
}
return CreateCharacterPotentialRewardExcel(
builder,
_o.Id,
_RequirePotentialStatType,
_RequirePotentialStatLevel,
_o.RewardParcelType,
_o.RewardId,
_o.RewardAmount);
}
}
public class CharacterPotentialRewardExcelT
{
public long Id { get; set; }
public List<SCHALE.Common.FlatData.PotentialStatBonusRateType> RequirePotentialStatType { get; set; }
public List<long> RequirePotentialStatLevel { get; set; }
public SCHALE.Common.FlatData.ParcelType RewardParcelType { get; set; }
public long RewardId { get; set; }
public int RewardAmount { get; set; }
public CharacterPotentialRewardExcelT() {
this.Id = 0;
this.RequirePotentialStatType = null;
this.RequirePotentialStatLevel = null;
this.RewardParcelType = SCHALE.Common.FlatData.ParcelType.None;
this.RewardId = 0;
this.RewardAmount = 0;
}
2024-04-21 00:21:57 +00:00
}
static public class CharacterPotentialRewardExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false)
&& verifier.VerifyVectorOfData(tablePos, 6 /*RequirePotentialStatType*/, 4 /*SCHALE.Common.FlatData.PotentialStatBonusRateType*/, false)
&& verifier.VerifyVectorOfData(tablePos, 8 /*RequirePotentialStatLevel*/, 8 /*long*/, false)
&& verifier.VerifyField(tablePos, 10 /*RewardParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false)
&& verifier.VerifyField(tablePos, 12 /*RewardId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 14 /*RewardAmount*/, 4 /*int*/, 4, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}