2024-07-27 13:39:47 +00:00
|
|
|
|
using System.Collections.Generic;
|
2024-05-26 13:43:33 +00:00
|
|
|
|
using System.Numerics;
|
|
|
|
|
using System.Text.Json.Serialization;
|
2024-08-02 16:30:21 +00:00
|
|
|
|
using Questionable.Model.Common;
|
|
|
|
|
using Questionable.Model.Common.Converter;
|
|
|
|
|
using Questionable.Model.Questing.Converter;
|
2024-05-25 21:51:37 +00:00
|
|
|
|
|
2024-08-02 16:30:21 +00:00
|
|
|
|
namespace Questionable.Model.Questing;
|
2024-05-25 21:51:37 +00:00
|
|
|
|
|
2024-06-14 09:37:33 +00:00
|
|
|
|
public sealed class QuestStep
|
2024-05-25 21:51:37 +00:00
|
|
|
|
{
|
2024-07-10 16:53:34 +00:00
|
|
|
|
public const float DefaultStopDistance = 3f;
|
|
|
|
|
|
2024-05-26 13:43:33 +00:00
|
|
|
|
public EInteractionType InteractionType { get; set; }
|
|
|
|
|
|
2024-05-26 19:45:26 +00:00
|
|
|
|
public uint? DataId { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonConverter(typeof(VectorConverter))]
|
|
|
|
|
public Vector3? Position { get; set; }
|
|
|
|
|
|
|
|
|
|
public float? StopDistance { get; set; }
|
2024-06-16 16:27:07 +00:00
|
|
|
|
public float? NpcWaitDistance { get; set; }
|
2024-05-25 21:51:37 +00:00
|
|
|
|
public ushort TerritoryId { get; set; }
|
2024-05-28 20:24:06 +00:00
|
|
|
|
public ushort? TargetTerritoryId { get; set; }
|
2024-06-18 15:48:45 +00:00
|
|
|
|
public float? DelaySecondsAtStart { get; set; }
|
2024-05-28 20:24:06 +00:00
|
|
|
|
|
2024-05-26 13:43:33 +00:00
|
|
|
|
public bool Disabled { get; set; }
|
2024-05-27 19:54:34 +00:00
|
|
|
|
public bool DisableNavmesh { get; set; }
|
|
|
|
|
public bool? Mount { get; set; }
|
2024-06-01 16:46:57 +00:00
|
|
|
|
public bool? Fly { get; set; }
|
2024-07-12 21:58:48 +00:00
|
|
|
|
public bool? Land { get; set; }
|
2024-06-01 16:46:57 +00:00
|
|
|
|
public bool? Sprint { get; set; }
|
2024-07-13 20:01:06 +00:00
|
|
|
|
public bool? IgnoreDistanceToObject { get; set; }
|
2024-05-26 19:45:26 +00:00
|
|
|
|
public string? Comment { get; set; }
|
|
|
|
|
|
2024-07-17 10:58:08 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Only used when attuning to an aetheryte.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public EAetheryteLocation? Aetheryte { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Only used when attuning to an aethernet shard.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonConverter(typeof(AethernetShardConverter))]
|
|
|
|
|
public EAetheryteLocation? AethernetShard { get; set; }
|
|
|
|
|
|
2024-05-26 19:45:26 +00:00
|
|
|
|
public EAetheryteLocation? AetheryteShortcut { get; set; }
|
2024-05-26 13:43:33 +00:00
|
|
|
|
|
2024-05-26 19:45:26 +00:00
|
|
|
|
public AethernetShortcut? AethernetShortcut { get; set; }
|
2024-05-27 19:54:34 +00:00
|
|
|
|
public uint? AetherCurrentId { get; set; }
|
|
|
|
|
|
|
|
|
|
public uint? ItemId { get; set; }
|
2024-05-28 22:17:19 +00:00
|
|
|
|
public bool? GroundTarget { get; set; }
|
2024-05-27 19:54:34 +00:00
|
|
|
|
|
|
|
|
|
public EEmote? Emote { get; set; }
|
2024-06-03 12:20:02 +00:00
|
|
|
|
public ChatMessage? ChatMessage { get; set; }
|
2024-07-10 19:01:41 +00:00
|
|
|
|
public EAction? Action { get; set; }
|
2024-05-27 19:54:34 +00:00
|
|
|
|
|
|
|
|
|
public EEnemySpawnType? EnemySpawnType { get; set; }
|
2024-05-29 19:22:58 +00:00
|
|
|
|
public IList<uint> KillEnemyDataIds { get; set; } = new List<uint>();
|
2024-07-14 19:31:07 +00:00
|
|
|
|
public IList<ComplexCombatData> ComplexCombatData { get; set; } = new List<ComplexCombatData>();
|
2024-07-21 19:33:38 +00:00
|
|
|
|
public float? CombatDelaySecondsAtStart { get; set; }
|
2024-06-14 09:37:33 +00:00
|
|
|
|
|
2024-06-01 12:30:20 +00:00
|
|
|
|
public JumpDestination? JumpDestination { get; set; }
|
|
|
|
|
public uint? ContentFinderConditionId { get; set; }
|
2024-07-27 13:39:47 +00:00
|
|
|
|
public SkipConditions? SkipConditions { get; set; }
|
2024-05-29 19:22:58 +00:00
|
|
|
|
|
2024-07-20 17:09:51 +00:00
|
|
|
|
public List<List<QuestWorkValue>?> RequiredQuestVariables { get; set; } = new();
|
2024-08-03 09:17:20 +00:00
|
|
|
|
public List<GatheredItem> RequiredGatheredItems { get; set; } = [];
|
2024-08-01 01:22:01 +00:00
|
|
|
|
public IList<QuestWorkValue?> CompletionQuestVariablesFlags { get; set; } = new List<QuestWorkValue?>();
|
2024-06-01 16:46:57 +00:00
|
|
|
|
public IList<DialogueChoice> DialogueChoices { get; set; } = new List<DialogueChoice>();
|
2024-07-09 14:58:26 +00:00
|
|
|
|
public IList<uint> PointMenuChoices { get; set; } = new List<uint>();
|
2024-07-11 00:56:42 +00:00
|
|
|
|
|
|
|
|
|
// TODO: Not implemented
|
2024-07-19 19:16:40 +00:00
|
|
|
|
public ushort? PickUpQuestId { get; set; }
|
2024-07-11 00:56:42 +00:00
|
|
|
|
|
|
|
|
|
public ushort? TurnInQuestId { get; set; }
|
|
|
|
|
public ushort? NextQuestId { get; set; }
|
2024-06-01 16:46:57 +00:00
|
|
|
|
|
2024-06-14 09:37:33 +00:00
|
|
|
|
[JsonConstructor]
|
|
|
|
|
public QuestStep()
|
2024-06-01 16:46:57 +00:00
|
|
|
|
{
|
2024-06-14 09:37:33 +00:00
|
|
|
|
}
|
2024-06-01 16:46:57 +00:00
|
|
|
|
|
2024-06-14 09:37:33 +00:00
|
|
|
|
public QuestStep(EInteractionType interactionType, uint? dataId, Vector3? position, ushort territoryId)
|
|
|
|
|
{
|
|
|
|
|
InteractionType = interactionType;
|
|
|
|
|
DataId = dataId;
|
|
|
|
|
Position = position;
|
|
|
|
|
TerritoryId = territoryId;
|
2024-06-01 16:46:57 +00:00
|
|
|
|
}
|
2024-07-10 16:53:34 +00:00
|
|
|
|
|
|
|
|
|
public float CalculateActualStopDistance()
|
|
|
|
|
{
|
|
|
|
|
if (InteractionType == EInteractionType.WalkTo)
|
|
|
|
|
return StopDistance ?? 0.25f;
|
2024-07-17 10:58:08 +00:00
|
|
|
|
if (InteractionType == EInteractionType.AttuneAetheryte)
|
|
|
|
|
return StopDistance ?? 10f;
|
2024-07-10 16:53:34 +00:00
|
|
|
|
else
|
|
|
|
|
return StopDistance ?? DefaultStopDistance;
|
|
|
|
|
}
|
2024-05-25 21:51:37 +00:00
|
|
|
|
}
|