qstbak/Questionable/Questionable.Model/QuestProgressInfo.cs
2025-10-09 07:53:51 +10:00

51 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using FFXIVClientStructs.FFXIV.Application.Network.WorkDefinitions;
using LLib.GameData;
using Questionable.Model.Questing;
namespace Questionable.Model;
internal sealed class QuestProgressInfo
{
private readonly string _asString;
public ElementId Id { get; }
public byte Sequence { get; }
public ushort Flags { get; init; }
public List<byte> Variables { get; }
public bool IsHidden { get; }
public EClassJob ClassJob { get; }
public QuestProgressInfo(QuestWork questWork)
{
Id = new QuestId(questWork.QuestId);
Sequence = questWork.Sequence;
Flags = questWork.Flags;
Variables = questWork.Variables.ToArray().ToList();
IsHidden = questWork.IsHidden;
ClassJob = (EClassJob)questWork.AcceptClassJob;
Span<byte> variables = questWork.Variables;
string text = "";
for (int i = 0; i < variables.Length; i++)
{
text = text + variables[i] + " ";
if (i % 2 == 1)
{
text += " ";
}
}
_asString = "QW: " + text.Trim();
}
public override string ToString()
{
return _asString;
}
}