using MessagePack;
#if GameClient
using GameFramework;
#endif

namespace GameMessage
{
    /// <summary>
    /// 祈福请求
    /// </summary>
    [Message(MessageCode.PrayRequest)]
    [MessagePackObject()]
    public class PrayRequest : MessageData
    {
        [Key(0)]
        public int PrayId;

        [Key(1)]
        public int DiamondValue;

#if GameClient
        public static PrayRequest Create(int prayId,int diamondValue)
        {
            PrayRequest request = ReferencePool.Acquire<PrayRequest>();
            request.PrayId = prayId;
            request.DiamondValue = diamondValue;
            return request;
        }
#endif
    }
    
    /// <summary>
    /// 祈福响应
    /// </summary>
    [Message(MessageCode.PrayResponse)]
    [MessagePackObject()]
    public class PrayResponse : MessageData
    {
        [Key(0)]
        public int PrayId;
        
        [Key(1)]
        public int DiamondValue;

        [Key(2)]
        public int ResultCode;
    }
}