2021-02-25 21:24:10 +00:00
|
|
|
|
using QSB.Messaging;
|
|
|
|
|
using QuantumUNET.Transport;
|
|
|
|
|
|
2021-12-24 00:26:31 +00:00
|
|
|
|
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; }
|
2021-02-26 12:47:05 +00:00
|
|
|
|
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();
|
2021-02-26 12:47:05 +00:00
|
|
|
|
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);
|
2021-02-26 12:47:05 +00:00
|
|
|
|
writer.Write((int)SocketType);
|
2021-02-25 21:24:10 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|