using MessagePack;
using Server.Core;

namespace NetWorkMessage
{
    public class UserNetMessage : MessageObject, IMessage
    {
        public long Id;
        public long InstanceId;
    }

    [Message(MessageOpcode.UserNetSendMessage)]
    public class UserNetSendMessage : UserNetMessage
    {
        public MessageObject MessageObject;
        
        public static UserNetSendMessage Create()
        {
            return ReferencePool.Fetch<UserNetSendMessage>();
        }

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

    [Message(MessageOpcode.UserNetForceFinMessage)]
    public class UserNetForceFinMessage : UserNetMessage
    {
        public int FinCode;
        
        public static UserNetForceFinMessage Create()
        {
            return ReferencePool.Fetch<UserNetForceFinMessage>();
        }
    }
}