using System.Collections.Generic;
using GameMessage;
using Server.Core;
using MessagePack;

namespace NetWorkMessage
{
    [Server.Core.Message(MessageOpcode.PlayerShowAwardRPCRequest)]
    [ResponseType(typeof(PlayerShowAwardRPCResponse))]
    [MessagePackObject] 
    public class PlayerShowAwardRPCRequest : MessageObject,IRequest
    {
        [Key(0)]public uint RpcId { get; set; }
        
        /// <summary>
        /// 变更得用户Id
        /// </summary>
        [Key(1)]public int UserId { get; set; }
        
        /// <summary>
        /// 所需要变更得资产
        /// </summary>
        [Key(2)]public List<PlayerPropertyPack> PropertyList { get; set; }
        
        /// <summary>
        /// 变更客户端展示类型
        /// </summary>
        [Key(3)]public PlayerPropertyNotifyUIType NotifyType { get; set; } = PlayerPropertyNotifyUIType.None;
        
        public static PlayerShowAwardRPCRequest Create()
        {
            PlayerShowAwardRPCRequest request = ReferencePool.Fetch<PlayerShowAwardRPCRequest>();
            return request;
        }
    }

    [Server.Core.Message(MessageOpcode.PlayerShowAwardRPCResponse)]
    [MessagePackObject]
    public class PlayerShowAwardRPCResponse : MessageObject, IResponse
    {
        [Key(0)]public int Error { get; set; }
        [Key(1)]public string Message { get; set; }
        [Key(2)]public uint RpcId { get; set; }
    }
}