2020-09-22 20:11:29 +00:00
|
|
|
|
using QSB.Messaging;
|
|
|
|
|
using UnityEngine.Networking;
|
|
|
|
|
|
2020-11-03 17:56:48 +00:00
|
|
|
|
namespace QSB.ConversationSync.Events
|
2020-09-22 20:11:29 +00:00
|
|
|
|
{
|
|
|
|
|
public class ConversationMessage : PlayerMessage
|
|
|
|
|
{
|
|
|
|
|
public ConversationType Type { get; set; }
|
|
|
|
|
public int ObjectId { get; set; }
|
|
|
|
|
public string Message { get; set; }
|
|
|
|
|
|
|
|
|
|
public override void Deserialize(NetworkReader reader)
|
|
|
|
|
{
|
|
|
|
|
base.Deserialize(reader);
|
|
|
|
|
ObjectId = reader.ReadInt32();
|
|
|
|
|
Type = (ConversationType)reader.ReadInt32();
|
|
|
|
|
Message = reader.ReadString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Serialize(NetworkWriter writer)
|
|
|
|
|
{
|
|
|
|
|
base.Serialize(writer);
|
|
|
|
|
writer.Write(ObjectId);
|
|
|
|
|
writer.Write((int)Type);
|
|
|
|
|
writer.Write(Message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|