2020-03-07 15:42:43 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using UnityEngine.Networking;
|
2020-03-06 18:03:35 +00:00
|
|
|
|
|
2020-08-09 11:38:35 +00:00
|
|
|
|
namespace QSB.Messaging
|
2020-03-06 18:03:35 +00:00
|
|
|
|
{
|
2020-08-09 11:19:51 +00:00
|
|
|
|
public class PlayerLeaveMessage : PlayerMessage
|
2020-03-06 18:03:35 +00:00
|
|
|
|
{
|
2020-08-18 20:37:27 +00:00
|
|
|
|
public uint[] NetIds { get; set; }
|
2020-03-07 15:42:43 +00:00
|
|
|
|
|
|
|
|
|
public override void Deserialize(NetworkReader reader)
|
|
|
|
|
{
|
|
|
|
|
base.Deserialize(reader);
|
2020-08-18 20:37:27 +00:00
|
|
|
|
NetIds = reader.ReadString().Split(',').Select(x => Convert.ToUInt32(x)).ToArray();
|
2020-03-07 15:42:43 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Serialize(NetworkWriter writer)
|
|
|
|
|
{
|
|
|
|
|
base.Serialize(writer);
|
2020-08-18 20:37:27 +00:00
|
|
|
|
writer.Write(string.Join(",", NetIds.Select(x => x.ToString()).ToArray()));
|
2020-03-07 15:42:43 +00:00
|
|
|
|
}
|
2020-03-06 18:03:35 +00:00
|
|
|
|
}
|
2020-08-09 11:19:51 +00:00
|
|
|
|
}
|