using MessagePack;

#if GameClient
using GameFramework;
#endif

namespace GameMessage
{
    /// <summary>
    /// 游戏资源奖励资源  历史遗留问题，后续不用了可以删除
    /// </summary>
    [MessagePackObject]
    public class GameRewardResData
    {
        [Key(0)]
        public int Id;

        [Key(1)]
        public int Count;
    }

    /// <summary>
    /// 资源数据
    /// </summary>
    [MessagePackObject]
    public class ResData
#if GameClient
        : IReference
#endif
    {
        [Key(0)] public int Id;

        [Key(1)] public long Count;

#if GameClient
        public static ResData Create(int id, long count)
        {
            ResData resData = ReferencePool.Acquire<ResData>();
            resData.Id = id;
            resData.Count = count;
            return resData;
        }

        public void Clear()
        {
            
        }
#endif
    }
}