2020-12-02 21:23:01 +00:00
|
|
|
|
using UnityEngine.Networking;
|
2020-12-02 18:40:38 +00:00
|
|
|
|
|
2020-12-02 21:19:10 +00:00
|
|
|
|
namespace QSB.QuantumUNET
|
2020-12-02 18:40:38 +00:00
|
|
|
|
{
|
2020-12-03 08:28:05 +00:00
|
|
|
|
internal class QSBCRCMessage : MessageBase
|
2020-12-02 18:40:38 +00:00
|
|
|
|
{
|
|
|
|
|
public override void Deserialize(NetworkReader reader)
|
|
|
|
|
{
|
|
|
|
|
int num = (int)reader.ReadUInt16();
|
|
|
|
|
this.scripts = new QSBCRCMessageEntry[num];
|
|
|
|
|
for (int i = 0; i < this.scripts.Length; i++)
|
|
|
|
|
{
|
|
|
|
|
QSBCRCMessageEntry crcmessageEntry = default(QSBCRCMessageEntry);
|
|
|
|
|
crcmessageEntry.name = reader.ReadString();
|
|
|
|
|
crcmessageEntry.channel = reader.ReadByte();
|
|
|
|
|
this.scripts[i] = crcmessageEntry;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Serialize(NetworkWriter writer)
|
|
|
|
|
{
|
|
|
|
|
writer.Write((ushort)this.scripts.Length);
|
|
|
|
|
for (int i = 0; i < this.scripts.Length; i++)
|
|
|
|
|
{
|
|
|
|
|
writer.Write(this.scripts[i].name);
|
|
|
|
|
writer.Write(this.scripts[i].channel);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public QSBCRCMessageEntry[] scripts;
|
|
|
|
|
}
|
2020-12-03 08:28:05 +00:00
|
|
|
|
}
|