2021-12-24 06:59:53 +00:00
|
|
|
|
using QSB.ConversationSync.WorldObjects;
|
|
|
|
|
using QSB.Messaging;
|
2021-12-20 11:48:50 +00:00
|
|
|
|
using QuantumUNET.Transport;
|
|
|
|
|
|
2021-12-24 00:26:31 +00:00
|
|
|
|
namespace QSB.ConversationSync.Messages
|
2021-12-20 11:48:50 +00:00
|
|
|
|
{
|
2021-12-24 06:59:53 +00:00
|
|
|
|
internal class EnterRemoteDialogueMessage : QSBWorldObjectMessage<QSBRemoteDialogueTrigger>
|
2021-12-20 11:48:50 +00:00
|
|
|
|
{
|
2021-12-24 06:59:53 +00:00
|
|
|
|
private int ActivatedDialogueIndex;
|
|
|
|
|
private int ListDialoguesIndex;
|
2021-12-20 11:48:50 +00:00
|
|
|
|
|
2021-12-24 06:59:53 +00:00
|
|
|
|
public EnterRemoteDialogueMessage(int activatedIndex, int listIndex)
|
2021-12-20 11:48:50 +00:00
|
|
|
|
{
|
2021-12-24 06:59:53 +00:00
|
|
|
|
ActivatedDialogueIndex = activatedIndex;
|
|
|
|
|
ListDialoguesIndex = listIndex;
|
2021-12-20 11:48:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Serialize(QNetworkWriter writer)
|
|
|
|
|
{
|
|
|
|
|
base.Serialize(writer);
|
|
|
|
|
writer.Write(ActivatedDialogueIndex);
|
|
|
|
|
writer.Write(ListDialoguesIndex);
|
|
|
|
|
}
|
2021-12-24 06:59:53 +00:00
|
|
|
|
|
|
|
|
|
public override void Deserialize(QNetworkReader reader)
|
|
|
|
|
{
|
|
|
|
|
base.Deserialize(reader);
|
|
|
|
|
ActivatedDialogueIndex = reader.ReadInt32();
|
|
|
|
|
ListDialoguesIndex = reader.ReadInt32();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnReceiveRemote()
|
|
|
|
|
=> WorldObject.RemoteEnterDialogue(ActivatedDialogueIndex, ListDialoguesIndex);
|
2021-12-20 11:48:50 +00:00
|
|
|
|
}
|
|
|
|
|
}
|