SCHALE.GameServer/SCHALE.Common/FlatData/CampaignStageRewardExcel.cs

130 lines
7.2 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 CampaignStageRewardExcel : IFlatbufferObject
{
private Table __p;
public ByteBuffer ByteBuffer { get { return __p.bb; } }
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
public static CampaignStageRewardExcel GetRootAsCampaignStageRewardExcel(ByteBuffer _bb) { return GetRootAsCampaignStageRewardExcel(_bb, new CampaignStageRewardExcel()); }
public static CampaignStageRewardExcel GetRootAsCampaignStageRewardExcel(ByteBuffer _bb, CampaignStageRewardExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
public CampaignStageRewardExcel __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; } }
2024-11-08 10:52:05 +00:00
public SCHALE.Common.FlatData.RewardTag RewardTag_ { get { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.RewardTag)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.RewardTag.Default; } }
2024-04-21 00:21:57 +00:00
public int StageRewardProb { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public SCHALE.Common.FlatData.ParcelType StageRewardParcelType { 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_; } }
2024-04-21 00:21:57 +00:00
public long StageRewardId { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
public int StageRewardAmount { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
public bool IsDisplayed { get { int o = __p.__offset(16); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
public static Offset<SCHALE.Common.FlatData.CampaignStageRewardExcel> CreateCampaignStageRewardExcel(FlatBufferBuilder builder,
long GroupId = 0,
2024-11-08 10:52:05 +00:00
SCHALE.Common.FlatData.RewardTag RewardTag_ = SCHALE.Common.FlatData.RewardTag.Default,
2024-04-21 00:21:57 +00:00
int StageRewardProb = 0,
SCHALE.Common.FlatData.ParcelType StageRewardParcelType = SCHALE.Common.FlatData.ParcelType.None_,
2024-04-21 00:21:57 +00:00
long StageRewardId = 0,
int StageRewardAmount = 0,
bool IsDisplayed = false) {
builder.StartTable(7);
CampaignStageRewardExcel.AddStageRewardId(builder, StageRewardId);
CampaignStageRewardExcel.AddGroupId(builder, GroupId);
CampaignStageRewardExcel.AddStageRewardAmount(builder, StageRewardAmount);
CampaignStageRewardExcel.AddStageRewardParcelType(builder, StageRewardParcelType);
CampaignStageRewardExcel.AddStageRewardProb(builder, StageRewardProb);
2024-11-08 10:52:05 +00:00
CampaignStageRewardExcel.AddRewardTag_(builder, RewardTag_);
2024-04-21 00:21:57 +00:00
CampaignStageRewardExcel.AddIsDisplayed(builder, IsDisplayed);
return CampaignStageRewardExcel.EndCampaignStageRewardExcel(builder);
}
public static void StartCampaignStageRewardExcel(FlatBufferBuilder builder) { builder.StartTable(7); }
public static void AddGroupId(FlatBufferBuilder builder, long groupId) { builder.AddLong(0, groupId, 0); }
2024-11-08 10:52:05 +00:00
public static void AddRewardTag_(FlatBufferBuilder builder, SCHALE.Common.FlatData.RewardTag rewardTag_) { builder.AddInt(1, (int)rewardTag_, 0); }
2024-04-21 00:21:57 +00:00
public static void AddStageRewardProb(FlatBufferBuilder builder, int stageRewardProb) { builder.AddInt(2, stageRewardProb, 0); }
public static void AddStageRewardParcelType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ParcelType stageRewardParcelType) { builder.AddInt(3, (int)stageRewardParcelType, 0); }
public static void AddStageRewardId(FlatBufferBuilder builder, long stageRewardId) { builder.AddLong(4, stageRewardId, 0); }
public static void AddStageRewardAmount(FlatBufferBuilder builder, int stageRewardAmount) { builder.AddInt(5, stageRewardAmount, 0); }
public static void AddIsDisplayed(FlatBufferBuilder builder, bool isDisplayed) { builder.AddBool(6, isDisplayed, false); }
public static Offset<SCHALE.Common.FlatData.CampaignStageRewardExcel> EndCampaignStageRewardExcel(FlatBufferBuilder builder) {
int o = builder.EndTable();
return new Offset<SCHALE.Common.FlatData.CampaignStageRewardExcel>(o);
}
2024-04-29 15:52:45 +00:00
public CampaignStageRewardExcelT UnPack() {
var _o = new CampaignStageRewardExcelT();
this.UnPackTo(_o);
return _o;
}
public void UnPackTo(CampaignStageRewardExcelT _o) {
byte[] key = TableEncryptionService.CreateKey("CampaignStageReward");
_o.GroupId = TableEncryptionService.Convert(this.GroupId, key);
2024-11-08 10:52:05 +00:00
_o.RewardTag_ = TableEncryptionService.Convert(this.RewardTag_, key);
2024-04-29 15:52:45 +00:00
_o.StageRewardProb = TableEncryptionService.Convert(this.StageRewardProb, key);
_o.StageRewardParcelType = TableEncryptionService.Convert(this.StageRewardParcelType, key);
_o.StageRewardId = TableEncryptionService.Convert(this.StageRewardId, key);
_o.StageRewardAmount = TableEncryptionService.Convert(this.StageRewardAmount, key);
_o.IsDisplayed = TableEncryptionService.Convert(this.IsDisplayed, key);
}
public static Offset<SCHALE.Common.FlatData.CampaignStageRewardExcel> Pack(FlatBufferBuilder builder, CampaignStageRewardExcelT _o) {
if (_o == null) return default(Offset<SCHALE.Common.FlatData.CampaignStageRewardExcel>);
return CreateCampaignStageRewardExcel(
builder,
_o.GroupId,
2024-11-08 10:52:05 +00:00
_o.RewardTag_,
2024-04-29 15:52:45 +00:00
_o.StageRewardProb,
_o.StageRewardParcelType,
_o.StageRewardId,
_o.StageRewardAmount,
_o.IsDisplayed);
}
}
public class CampaignStageRewardExcelT
{
public long GroupId { get; set; }
2024-11-08 10:52:05 +00:00
public SCHALE.Common.FlatData.RewardTag RewardTag_ { get; set; }
2024-04-29 15:52:45 +00:00
public int StageRewardProb { get; set; }
public SCHALE.Common.FlatData.ParcelType StageRewardParcelType { get; set; }
public long StageRewardId { get; set; }
public int StageRewardAmount { get; set; }
public bool IsDisplayed { get; set; }
public CampaignStageRewardExcelT() {
this.GroupId = 0;
2024-11-08 10:52:05 +00:00
this.RewardTag_ = SCHALE.Common.FlatData.RewardTag.Default;
2024-04-29 15:52:45 +00:00
this.StageRewardProb = 0;
this.StageRewardParcelType = SCHALE.Common.FlatData.ParcelType.None_;
2024-04-29 15:52:45 +00:00
this.StageRewardId = 0;
this.StageRewardAmount = 0;
this.IsDisplayed = false;
}
2024-04-21 00:21:57 +00:00
}
static public class CampaignStageRewardExcelVerify
{
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
{
return verifier.VerifyTableStart(tablePos)
&& verifier.VerifyField(tablePos, 4 /*GroupId*/, 8 /*long*/, 8, false)
2024-11-08 10:52:05 +00:00
&& verifier.VerifyField(tablePos, 6 /*RewardTag_*/, 4 /*SCHALE.Common.FlatData.RewardTag*/, 4, false)
2024-04-21 00:21:57 +00:00
&& verifier.VerifyField(tablePos, 8 /*StageRewardProb*/, 4 /*int*/, 4, false)
&& verifier.VerifyField(tablePos, 10 /*StageRewardParcelType*/, 4 /*SCHALE.Common.FlatData.ParcelType*/, 4, false)
&& verifier.VerifyField(tablePos, 12 /*StageRewardId*/, 8 /*long*/, 8, false)
&& verifier.VerifyField(tablePos, 14 /*StageRewardAmount*/, 4 /*int*/, 4, false)
&& verifier.VerifyField(tablePos, 16 /*IsDisplayed*/, 1 /*bool*/, 1, false)
&& verifier.VerifyTableEnd(tablePos);
}
}
}