27 lines
705 B
C#
Raw Normal View History

2022-01-25 23:16:03 -08:00
using QSB.ConversationSync.Messages;
using QSB.Messaging;
using QSB.WorldSync;
2021-12-20 11:48:50 +00:00
namespace QSB.ConversationSync.WorldObjects
{
internal class QSBRemoteDialogueTrigger : WorldObject<RemoteDialogueTrigger>
{
public override void SendInitialState(uint to)
{
2022-01-25 23:16:03 -08:00
if (QSBCore.IsHost)
{
2022-01-26 00:04:08 -08:00
this.SendMessage(new RemoteDialogueInitialStateMessage(AttachedObject) { To = to });
2022-01-25 23:16:03 -08:00
}
}
2022-01-25 22:58:07 -08:00
public void RemoteEnterDialogue(int dialogueIndex)
2021-12-20 11:48:50 +00:00
{
2022-01-25 22:58:07 -08:00
var dialogueCondition = AttachedObject._listDialogues[dialogueIndex];
2021-12-20 11:48:50 +00:00
AttachedObject._activeRemoteDialogue = dialogueCondition.dialogue;
AttachedObject._inRemoteDialogue = true;
2022-01-25 22:58:07 -08:00
AttachedObject._activatedDialogues[dialogueIndex] = true;
2021-12-20 11:48:50 +00:00
}
}
}