//------------------------------------------------------------------------------ // // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ using Luban; namespace GameConfig.TB { public sealed partial class TbGGift : Luban.BeanBase { public TbGGift(ByteBuf _buf) { Id = _buf.ReadInt(); Name = _buf.ReadString(); Tig = _buf.ReadString(); Limit = (TbGEnum.TGiftLimit)_buf.ReadInt(); LimitValue = _buf.ReadInt(); {int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Exchanges = new TbGEntity.TResource[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { TbGEntity.TResource __e0;__e0 = TbGEntity.TResource.DeserializeTResource(_buf); Exchanges[__index0] = __e0;}} {int __n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Rewards = new TbGEntity.TReward[__n0];for(var __index0 = 0 ; __index0 < __n0 ; __index0++) { TbGEntity.TReward __e0;__e0 = TbGEntity.TReward.DeserializeTReward(_buf); Rewards[__index0] = __e0;}} } public static TbGGift DeserializeTbGGift(ByteBuf _buf) { return new TB.TbGGift(_buf); } /// /// 礼包唯一Id /// public readonly int Id; /// /// 礼包名称 /// public readonly string Name; /// /// 描述 /// public readonly string Tig; /// /// 礼包购买限制 /// public readonly TbGEnum.TGiftLimit Limit; /// /// 限购数量 /// public readonly int LimitValue; /// /// 兑换的资源 /// public readonly TbGEntity.TResource[] Exchanges; /// /// 奖励 /// public readonly TbGEntity.TReward[] Rewards; public const int __ID__ = 319065289; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { foreach (var _e in Exchanges) { _e?.ResolveRef(tables); } foreach (var _e in Rewards) { _e?.ResolveRef(tables); } } public override string ToString() { return "{ " + "id:" + Id + "," + "name:" + Name + "," + "tig:" + Tig + "," + "limit:" + Limit + "," + "limitValue:" + LimitValue + "," + "exchanges:" + Luban.StringUtil.CollectionToString(Exchanges) + "," + "rewards:" + Luban.StringUtil.CollectionToString(Rewards) + "," + "}"; } } }