using MessagePack;

namespace NetWorkMessage
{
    [Server.Core.Message(MessageOpcode.UserCurrencyChange)]
    [MessagePackObject]
    public class UserCurrencyChangeMessage : MessageObject,IMessage
    {
        [Key(0)]
        public int UserId;

        [Key(1)]
        public GameMessage.ResData[] ResDatas;

        public static UserCurrencyChangeMessage Create(int userId,GameMessage.ResData[] resDatas)
        {
            UserCurrencyChangeMessage message = new UserCurrencyChangeMessage();
            message.UserId = userId;
            message.ResDatas = resDatas;
            return message;
        }

        protected override void VDispose()
        {
            ResDatas = null;
        }
    }
}