quantum-space-buddies/QSB/ItemSync/Messages/SocketItemMessage.cs

29 lines
657 B
C#
Raw Normal View History

2021-02-25 21:24:10 +00:00
using QSB.Messaging;
using QuantumUNET.Transport;
namespace QSB.ItemSync.Messages
2021-02-25 21:24:10 +00:00
{
public class SocketItemMessage : PlayerMessage
{
public int SocketId { get; set; }
public int ItemId { get; set; }
public SocketEventType SocketType { get; set; }
2021-02-25 21:24:10 +00:00
public override void Deserialize(QNetworkReader reader)
{
base.Deserialize(reader);
SocketId = reader.ReadInt32();
ItemId = reader.ReadInt32();
SocketType = (SocketEventType)reader.ReadInt32();
2021-02-25 21:24:10 +00:00
}
public override void Serialize(QNetworkWriter writer)
{
base.Serialize(writer);
writer.Write(SocketId);
writer.Write(ItemId);
writer.Write((int)SocketType);
2021-02-25 21:24:10 +00:00
}
}
}