2021-12-24 01:07:29 +00:00
|
|
|
|
using QSB.WorldSync.Events;
|
2021-12-24 00:26:31 +00:00
|
|
|
|
using QuantumUNET.Transport;
|
2021-12-24 01:07:29 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
2021-01-01 10:17:35 +00:00
|
|
|
|
|
2021-12-24 00:26:31 +00:00
|
|
|
|
namespace QSB.QuantumSync.Messages
|
2021-01-01 10:17:35 +00:00
|
|
|
|
{
|
|
|
|
|
public class QuantumShuffleMessage : WorldObjectMessage
|
|
|
|
|
{
|
|
|
|
|
public int[] IndexArray { get; set; }
|
|
|
|
|
|
|
|
|
|
public override void Deserialize(QNetworkReader reader)
|
|
|
|
|
{
|
|
|
|
|
base.Deserialize(reader);
|
|
|
|
|
IndexArray = Array.ConvertAll(reader.ReadBytesAndSize(), Convert.ToInt32);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Serialize(QNetworkWriter writer)
|
|
|
|
|
{
|
|
|
|
|
base.Serialize(writer);
|
|
|
|
|
var temp = IndexArray.Select(x => (byte)x).ToArray();
|
|
|
|
|
writer.WriteBytesAndSize(temp, temp.Length);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|