1
0
Fork 0
forked from aly/qstbak
qstbak/Questionable.Model/Questionable.Model.Questing/QuestSequence.cs
2026-08-17 20:27:25 +10:00

46 lines
922 B
C#

using System.Collections.Generic;
using System.Linq;
using System.Text.Json.Serialization;
namespace Questionable.Model.Questing;
public sealed class QuestSequence
{
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public byte Sequence { get; set; }
public string? Comment { get; set; }
public List<QuestStep> Steps { get; set; } = new List<QuestStep>();
public QuestStep? FindStep(int step)
{
int num = ((step < 0) ? (-1021069970) : (-1021069969));
while (true)
{
int num2 = num;
int num3 = -1021069971;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
case 3:
return null;
case 1:
return Steps[step];
case 0:
num = -1021069969;
break;
case 2:
num = ((step < Steps.Count) ? (-1021069972) : (-1021069970));
break;
}
}
}
public QuestStep? LastStep()
{
return Steps.LastOrDefault();
}
}