2024-07-27 13:39:47 +00:00
|
|
|
|
using System.Collections.Generic;
|
2024-08-01 01:22:01 +00:00
|
|
|
|
using System.Linq;
|
2024-08-08 22:53:05 +00:00
|
|
|
|
using Questionable.Model.Common;
|
2024-07-27 13:39:47 +00:00
|
|
|
|
|
2024-08-02 16:30:21 +00:00
|
|
|
|
namespace Questionable.Model.Questing;
|
2024-07-27 13:39:47 +00:00
|
|
|
|
|
|
|
|
|
public sealed class SkipStepConditions
|
|
|
|
|
{
|
|
|
|
|
public bool Never { get; set; }
|
2024-08-01 01:22:01 +00:00
|
|
|
|
public IList<QuestWorkValue?> CompletionQuestVariablesFlags { get; set; } = new List<QuestWorkValue?>();
|
2024-07-27 13:39:47 +00:00
|
|
|
|
public ELockedSkipCondition? Flying { get; set; }
|
|
|
|
|
public ELockedSkipCondition? Chocobo { get; set; }
|
|
|
|
|
public bool NotTargetable { get; set; }
|
|
|
|
|
public List<ushort> InTerritory { get; set; } = new();
|
|
|
|
|
public List<ushort> NotInTerritory { get; set; } = new();
|
|
|
|
|
public SkipItemConditions? Item { get; set; }
|
2024-08-03 20:17:18 +00:00
|
|
|
|
public List<ElementId> QuestsAccepted { get; set; } = new();
|
|
|
|
|
public List<ElementId> QuestsCompleted { get; set; } = new();
|
2024-08-08 22:53:05 +00:00
|
|
|
|
public EAetheryteLocation? AetheryteLocked { get; set; }
|
|
|
|
|
public EAetheryteLocation? AetheryteUnlocked { get; set; }
|
2024-07-27 13:39:47 +00:00
|
|
|
|
public EExtraSkipCondition? ExtraCondition { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool HasSkipConditions()
|
|
|
|
|
{
|
2024-07-27 15:37:08 +00:00
|
|
|
|
if (Never)
|
|
|
|
|
return false;
|
2024-08-02 07:55:55 +00:00
|
|
|
|
return (CompletionQuestVariablesFlags.Count > 0 && CompletionQuestVariablesFlags.Any(x => x != null)) ||
|
2024-08-01 01:22:01 +00:00
|
|
|
|
Flying != null ||
|
2024-07-28 19:03:44 +00:00
|
|
|
|
Chocobo != null ||
|
2024-08-01 16:02:19 +00:00
|
|
|
|
NotTargetable ||
|
2024-07-28 19:03:44 +00:00
|
|
|
|
InTerritory.Count > 0 ||
|
|
|
|
|
NotInTerritory.Count > 0 ||
|
|
|
|
|
Item != null ||
|
|
|
|
|
QuestsAccepted.Count > 0 ||
|
2024-08-01 16:02:19 +00:00
|
|
|
|
QuestsCompleted.Count > 0 ||
|
2024-08-08 22:53:05 +00:00
|
|
|
|
AetheryteLocked != null ||
|
|
|
|
|
AetheryteUnlocked != null ||
|
2024-08-01 16:02:19 +00:00
|
|
|
|
ExtraCondition != null;
|
2024-07-27 13:39:47 +00:00
|
|
|
|
}
|
2024-08-01 01:22:01 +00:00
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return
|
|
|
|
|
$"{nameof(Never)}: {Never}, {nameof(CompletionQuestVariablesFlags)}: {CompletionQuestVariablesFlags}, {nameof(Flying)}: {Flying}, {nameof(Chocobo)}: {Chocobo}, {nameof(NotTargetable)}: {NotTargetable}, {nameof(InTerritory)}: {string.Join(" ", InTerritory)}, {nameof(NotInTerritory)}: {string.Join(" ", NotInTerritory)}, {nameof(Item)}: {Item}, {nameof(QuestsAccepted)}: {string.Join(" ", QuestsAccepted)}, {nameof(QuestsCompleted)}: {string.Join(" ", QuestsCompleted)}, {nameof(ExtraCondition)}: {ExtraCondition}";
|
|
|
|
|
}
|
2024-07-27 13:39:47 +00:00
|
|
|
|
}
|