
using MessagePack;
#if Server
using Server.Core;
#endif
#if GameClient
using GameFramework;
#endif

namespace GameMessage
{
    [MessagePackObject]
    public class DeskOtherDataResponse : MessageData
    {
        /// <summary>
        /// 桌子其他数据信息
        /// </summary>
        [Key(0)] public CommonDeskData CommonDeskData;

#if Server
        public static DeskOtherDataResponse Create(CommonDeskData commonDeskData)
        {
            DeskOtherDataResponse self = ReferencePool.Fetch<DeskOtherDataResponse>();
            self.CommonDeskData = commonDeskData;
            return self;
        }

        public override void Dispose()
        {
            ReferencePool.Recycle(this);
        }
#endif
    }

    /// <summary>
    /// 使用记牌器数据
    /// </summary>
    [MessagePackObject]
    public class UsingHandTrackerData : MessageData
    {
        /// <summary>
        /// 消耗类型 1 记牌器 2 钻石
        /// </summary>
        [Key(0)] public int ConsumeType;

        /// <summary>
        /// 消耗数量
        /// </summary>
        [Key(1)] public int ConsumeValue;

#if Server
        public static UsingHandTrackerData Create(int consumeType,int consumeValue)
        {
            UsingHandTrackerData self = ReferencePool.Fetch<UsingHandTrackerData>();
            self.ConsumeType = consumeType;
            self.ConsumeValue = consumeValue;
            return self;
        }

        public override void Dispose()
        {
            ReferencePool.Recycle(this);
        }
#endif

#if GameClient
        public static UsingHandTrackerData Create(int consumeType)
        {
            UsingHandTrackerData self = ReferencePool.Acquire<UsingHandTrackerData>();
            self.ConsumeType = consumeType;
            return self;
        }

        public override void Clear()
        {
            
        }
#endif
    }
}