quantum-space-buddies/QSB/ItemSync/Events/SocketItemMessage.cs
2021-02-26 12:47:05 +00:00

29 lines
655 B
C#

using QSB.Messaging;
using QuantumUNET.Transport;
namespace QSB.ItemSync.Events
{
public class SocketItemMessage : PlayerMessage
{
public int SocketId { get; set; }
public int ItemId { get; set; }
public SocketEventType SocketType { get; set; }
public override void Deserialize(QNetworkReader reader)
{
base.Deserialize(reader);
SocketId = reader.ReadInt32();
ItemId = reader.ReadInt32();
SocketType = (SocketEventType)reader.ReadInt32();
}
public override void Serialize(QNetworkWriter writer)
{
base.Serialize(writer);
writer.Write(SocketId);
writer.Write(ItemId);
writer.Write((int)SocketType);
}
}
}