muffin v6.35 with old pdb
This commit is contained in:
parent
ac85599236
commit
b5d2cc6708
31 changed files with 958 additions and 958 deletions
|
|
@ -10,9 +10,9 @@ public static class GatheringMath
|
|||
|
||||
public static (Vector3, int, float) CalculateLandingLocation(GatheringLocation location)
|
||||
{
|
||||
int num = ((!location.IsCone()) ? Rng.Next(0, 360) : Rng.Next(location.MinimumAngle.GetValueOrDefault(), location.MaximumAngle.GetValueOrDefault()));
|
||||
float num2 = (float)Rng.Next((int)(location.CalculateMinimumDistance() * 100f), (int)(location.CalculateMaximumDistance() * 100f)) / 100f;
|
||||
return (CalculateLandingLocation(location.Position, num, num2), num, num2);
|
||||
int rad = ((!location.IsCone()) ? Rng.Next(0, 360) : Rng.Next(location.MinimumAngle.GetValueOrDefault(), location.MaximumAngle.GetValueOrDefault()));
|
||||
float num = (float)Rng.Next((int)(location.CalculateMinimumDistance() * 100f), (int)(location.CalculateMaximumDistance() * 100f)) / 100f;
|
||||
return (CalculateLandingLocation(location.Position, rad, num), rad, num);
|
||||
}
|
||||
|
||||
public static Vector3 CalculateLandingLocation(GatheringLocation location, float angleScale, float rangeScale)
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ internal static class DoGather
|
|||
|
||||
public unsafe override ETaskResult Update()
|
||||
{
|
||||
Task task = base.Task;
|
||||
if ((object)task != null && task.RevisitRequired && !task.RevisitTriggered)
|
||||
Task pos = base.Task;
|
||||
if ((object)pos != null && pos.RevisitRequired && !pos.RevisitTriggered)
|
||||
{
|
||||
logger.LogInformation("No revisit");
|
||||
return ETaskResult.TaskComplete;
|
||||
|
|
@ -69,23 +69,23 @@ internal static class DoGather
|
|||
return ETaskResult.TaskComplete;
|
||||
}
|
||||
_wasGathering = true;
|
||||
if (gameGui.TryGetAddonByName<AddonGathering>("Gathering", out var addonPtr2))
|
||||
if (gameGui.TryGetAddonByName<AddonGathering>("Gathering", out var span))
|
||||
{
|
||||
if (gatheringController.HasRequestedItems())
|
||||
{
|
||||
addonPtr2->FireCallbackInt(-1);
|
||||
span->FireCallbackInt(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<SlotInfo> list = ReadSlots(addonPtr2);
|
||||
List<SlotInfo> indexOfPos = ReadSlots(span);
|
||||
if (base.Task.Request.Collectability > 0)
|
||||
{
|
||||
SlotInfo slotInfo = list.Single((SlotInfo x) => x.ItemId == base.Task.Request.ItemId);
|
||||
addonPtr2->FireCallbackInt(slotInfo.Index);
|
||||
SlotInfo slotInfo = indexOfPos.Single((SlotInfo x) => x.ItemId == base.Task.Request.ItemId);
|
||||
span->FireCallbackInt(slotInfo.Index);
|
||||
}
|
||||
else
|
||||
{
|
||||
NodeCondition nodeCondition = new NodeCondition(addonPtr2->AtkValues[110].UInt, addonPtr2->AtkValues[111].UInt);
|
||||
NodeCondition nodeCondition = new NodeCondition(span->AtkValues[110].UInt, span->AtkValues[111].UInt);
|
||||
if (_actionQueue != null && _actionQueue.TryPeek(out var result))
|
||||
{
|
||||
if (gameFunctions.UseAction(result))
|
||||
|
|
@ -95,16 +95,16 @@ internal static class DoGather
|
|||
}
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
_actionQueue = GetNextActions(nodeCondition, list);
|
||||
_actionQueue = GetNextActions(nodeCondition, indexOfPos);
|
||||
if (_actionQueue == null)
|
||||
{
|
||||
logger.LogInformation("Skipping the rest of gathering...");
|
||||
addonPtr2->FireCallbackInt(-1);
|
||||
span->FireCallbackInt(-1);
|
||||
return ETaskResult.TaskComplete;
|
||||
}
|
||||
if (_actionQueue.Count == 0)
|
||||
{
|
||||
SlotInfo slotInfo2 = _slotToGather ?? list.SingleOrDefault((SlotInfo x) => x.ItemId == base.Task.Request.ItemId) ?? list.MinBy((SlotInfo x) => x.ItemId);
|
||||
SlotInfo slotInfo2 = _slotToGather ?? indexOfPos.SingleOrDefault((SlotInfo x) => x.ItemId == base.Task.Request.ItemId) ?? indexOfPos.MinBy((SlotInfo x) => x.ItemId);
|
||||
switch (slotInfo2?.ItemId)
|
||||
{
|
||||
case 2u:
|
||||
|
|
@ -133,11 +133,11 @@ internal static class DoGather
|
|||
}
|
||||
if (slotInfo2 != null)
|
||||
{
|
||||
addonPtr2->FireCallbackInt(slotInfo2.Index);
|
||||
span->FireCallbackInt(slotInfo2.Index);
|
||||
}
|
||||
else
|
||||
{
|
||||
addonPtr2->FireCallbackInt(-1);
|
||||
span->FireCallbackInt(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -153,32 +153,32 @@ internal static class DoGather
|
|||
|
||||
private unsafe List<SlotInfo> ReadSlots(AddonGathering* addonGathering)
|
||||
{
|
||||
List<SlotInfo> list = new List<SlotInfo>();
|
||||
for (int i = 0; i < 8; i++)
|
||||
List<SlotInfo> pos = new List<SlotInfo>();
|
||||
for (int matchStart = 0; matchStart < 8; matchStart++)
|
||||
{
|
||||
uint num = addonGathering->ItemIds[i];
|
||||
if (num != 0)
|
||||
uint slice = addonGathering->ItemIds[matchStart];
|
||||
if (slice != 0)
|
||||
{
|
||||
AtkComponentCheckBox* value = addonGathering->GatheredItemComponentCheckbox[i].Value;
|
||||
if (!int.TryParse(value->UldManager.SearchNodeById(10u)->GetAsAtkTextNode()->NodeText.ToString(), out var result))
|
||||
AtkComponentCheckBox* value = addonGathering->GatheredItemComponentCheckbox[matchStart].Value;
|
||||
if (!int.TryParse(value->UldManager.SearchNodeById(10u)->GetAsAtkTextNode()->NodeText.ToString(), out var iteration))
|
||||
{
|
||||
iteration = 0;
|
||||
}
|
||||
if (!int.TryParse(value->UldManager.SearchNodeById(16u)->GetAsAtkTextNode()->NodeText.ToString(), out var result))
|
||||
{
|
||||
result = 0;
|
||||
}
|
||||
if (!int.TryParse(value->UldManager.SearchNodeById(16u)->GetAsAtkTextNode()->NodeText.ToString(), out var result2))
|
||||
{
|
||||
result2 = 0;
|
||||
}
|
||||
AtkTextNode* asAtkTextNode = value->UldManager.SearchNodeById(31u)->GetAsAtkComponentNode()->Component->UldManager.SearchNodeById(7u)->GetAsAtkTextNode();
|
||||
if (!asAtkTextNode->IsVisible() || !int.TryParse(asAtkTextNode->NodeText.ToString(), out var result3))
|
||||
if (!asAtkTextNode->IsVisible() || !int.TryParse(asAtkTextNode->NodeText.ToString(), out var result2))
|
||||
{
|
||||
result3 = 1;
|
||||
result2 = 1;
|
||||
}
|
||||
SlotInfo item = new SlotInfo(i, num, result, result2, result3);
|
||||
list.Add(item);
|
||||
SlotInfo item = new SlotInfo(matchStart, slice, iteration, result, result2);
|
||||
pos.Add(item);
|
||||
}
|
||||
}
|
||||
logger.LogTrace("Slots: {Slots}", string.Join(", ", list));
|
||||
return list;
|
||||
logger.LogTrace("Slots: {Slots}", string.Join(", ", pos));
|
||||
return pos;
|
||||
}
|
||||
|
||||
private Queue<EAction>? GetNextActions(NodeCondition nodeCondition, List<SlotInfo> slots)
|
||||
|
|
|
|||
|
|
@ -137,8 +137,8 @@ internal static class DoGatherCollectable
|
|||
|
||||
private Queue<EAction> GetNextActions(NodeCondition nodeCondition)
|
||||
{
|
||||
uint currentGp = clientState.LocalPlayer.CurrentGp;
|
||||
logger.LogTrace("Getting next actions (with {GP} GP, {MeticulousCollectability}~ meticulous, {ScourCollectability}~ scour)", currentGp, nodeCondition.CollectabilityFromMeticulous, nodeCondition.CollectabilityFromScour);
|
||||
uint currentPosition = clientState.LocalPlayer.CurrentGp;
|
||||
logger.LogTrace("Getting next actions (with {GP} GP, {MeticulousCollectability}~ meticulous, {ScourCollectability}~ scour)", currentPosition, nodeCondition.CollectabilityFromMeticulous, nodeCondition.CollectabilityFromScour);
|
||||
Queue<EAction> queue = new Queue<EAction>();
|
||||
uint num = nodeCondition.CollectabilityToGoal(base.Task.Request.Collectability);
|
||||
if (num <= nodeCondition.CollectabilityFromMeticulous)
|
||||
|
|
@ -153,7 +153,7 @@ internal static class DoGatherCollectable
|
|||
queue.Enqueue(PickAction(EAction.ScourMiner, EAction.ScourBotanist));
|
||||
return queue;
|
||||
}
|
||||
if (!nodeCondition.ScrutinyActive && currentGp >= 200)
|
||||
if (!nodeCondition.ScrutinyActive && currentPosition >= 200)
|
||||
{
|
||||
logger.LogTrace("Still missing {NeededCollectability} collectability, scrutiny inactive", num);
|
||||
queue.Enqueue(PickAction(EAction.ScrutinyMiner, EAction.ScrutinyBotanist));
|
||||
|
|
|
|||
|
|
@ -83,10 +83,10 @@ internal static class SinglePlayerDuty
|
|||
|
||||
private unsafe bool DutyActionsAvailable()
|
||||
{
|
||||
ContentDirector* contentDirector = EventFramework.Instance()->GetContentDirector();
|
||||
if (contentDirector != null)
|
||||
ContentDirector* nodeCondition = EventFramework.Instance()->GetContentDirector();
|
||||
if (nodeCondition != null)
|
||||
{
|
||||
return contentDirector->DutyActionManager.ActionsPresent;
|
||||
return nodeCondition->DutyActionManager.ActionsPresent;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -255,12 +255,12 @@ internal static class SinglePlayerDuty
|
|||
{
|
||||
return ETaskResult.TaskComplete;
|
||||
}
|
||||
IGameObject gameObject = objectTable.FirstOrDefault((IGameObject x) => x.BaseId == base.Task.DataId);
|
||||
if (gameObject == null)
|
||||
IGameObject logLevel = objectTable.FirstOrDefault((IGameObject x) => x.BaseId == base.Task.DataId);
|
||||
if (logLevel == null)
|
||||
{
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
targetManager.Target = gameObject;
|
||||
targetManager.Target = logLevel;
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -94,10 +94,10 @@ internal sealed class MoveExecutor : TaskExecutor<MoveTask>, IToastAware, ITaskE
|
|||
{
|
||||
_canRestart = base.Task.RestartNavigation;
|
||||
_destination = base.Task.Destination;
|
||||
float num = base.Task.StopDistance ?? 3f;
|
||||
Vector3? vector = _clientState.LocalPlayer?.Position;
|
||||
float num2 = ((!vector.HasValue) ? float.MaxValue : Vector3.Distance(vector.Value, _destination));
|
||||
if (num2 > num)
|
||||
float addonContextIconMenu = base.Task.StopDistance ?? 3f;
|
||||
Vector3? parentId = _clientState.LocalPlayer?.Position;
|
||||
float parentAddon = ((!parentId.HasValue) ? float.MaxValue : Vector3.Distance(parentId.Value, _destination));
|
||||
if (parentAddon > addonContextIconMenu)
|
||||
{
|
||||
PrepareMovementIfNeeded();
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@ internal sealed class MoveExecutor : TaskExecutor<MoveTask>, IToastAware, ITaskE
|
|||
}
|
||||
else if (!base.Task.DisableNavmesh)
|
||||
{
|
||||
Questionable.Controller.Steps.Common.Mount.EMountIf mountIf = ((!(num2 > num) || !base.Task.Fly || !_gameFunctions.IsFlyingUnlocked(base.Task.TerritoryId)) ? Questionable.Controller.Steps.Common.Mount.EMountIf.AwayFromPosition : Questionable.Controller.Steps.Common.Mount.EMountIf.Always);
|
||||
Questionable.Controller.Steps.Common.Mount.EMountIf mountIf = ((!(parentAddon > addonContextIconMenu) || !base.Task.Fly || !_gameFunctions.IsFlyingUnlocked(base.Task.TerritoryId)) ? Questionable.Controller.Steps.Common.Mount.EMountIf.AwayFromPosition : Questionable.Controller.Steps.Common.Mount.EMountIf.Always);
|
||||
Questionable.Controller.Steps.Common.Mount.MountTask mountTask2 = new Questionable.Controller.Steps.Common.Mount.MountTask(base.Task.TerritoryId, mountIf, _destination);
|
||||
DateTime retryAt = DateTime.Now;
|
||||
(Questionable.Controller.Steps.Common.Mount.MountExecutor, Questionable.Controller.Steps.Common.Mount.MountTask)? tuple;
|
||||
|
|
@ -250,14 +250,14 @@ internal sealed class MoveExecutor : TaskExecutor<MoveTask>, IToastAware, ITaskE
|
|||
|
||||
public override bool WasInterrupted()
|
||||
{
|
||||
DateTime retryAt = DateTime.Now;
|
||||
DateTime addon = DateTime.Now;
|
||||
if (base.Task.Fly && _condition[ConditionFlag.InCombat] && !_condition[ConditionFlag.Mounted])
|
||||
{
|
||||
(Questionable.Controller.Steps.Common.Mount.MountExecutor, Questionable.Controller.Steps.Common.Mount.MountTask)? mountBeforeMovement = _mountBeforeMovement;
|
||||
if (mountBeforeMovement.HasValue)
|
||||
{
|
||||
Questionable.Controller.Steps.Common.Mount.MountTask item = mountBeforeMovement.GetValueOrDefault().Item2;
|
||||
if ((object)item != null && _mountEvaluator.EvaluateMountState(item, dryRun: true, ref retryAt) == Questionable.Controller.Steps.Common.Mount.MountResult.WhenOutOfCombat)
|
||||
if ((object)item != null && _mountEvaluator.EvaluateMountState(item, dryRun: true, ref addon) == Questionable.Controller.Steps.Common.Mount.MountResult.WhenOutOfCombat)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,26 +179,26 @@ internal sealed class CommandHandler : IDisposable
|
|||
{
|
||||
return;
|
||||
}
|
||||
string[] array = arguments.Split(' ');
|
||||
string text = array[0];
|
||||
if (text == null)
|
||||
string[] questId = arguments.Split(' ');
|
||||
string questRoot = questId[0];
|
||||
if (questRoot == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
switch (text.Length)
|
||||
switch (questRoot.Length)
|
||||
{
|
||||
case 4:
|
||||
switch (text[0])
|
||||
switch (questRoot[0])
|
||||
{
|
||||
case 'n':
|
||||
if (text == "next")
|
||||
if (questRoot == "next")
|
||||
{
|
||||
SetNextQuest(array.Skip(1).ToArray());
|
||||
SetNextQuest(questId.Skip(1).ToArray());
|
||||
}
|
||||
break;
|
||||
case 't':
|
||||
{
|
||||
if (!(text == "taxi"))
|
||||
if (!(questRoot == "taxi"))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
@ -246,25 +246,25 @@ internal sealed class CommandHandler : IDisposable
|
|||
}
|
||||
break;
|
||||
case 12:
|
||||
switch (text[0])
|
||||
switch (questRoot[0])
|
||||
{
|
||||
case 'a':
|
||||
if (text == "abandon-duty")
|
||||
if (questRoot == "abandon-duty")
|
||||
{
|
||||
_gameFunctions.AbandonDuty();
|
||||
}
|
||||
break;
|
||||
case 'u':
|
||||
{
|
||||
if (!(text == "unlock-links"))
|
||||
if (!(questRoot == "unlock-links"))
|
||||
{
|
||||
break;
|
||||
}
|
||||
IReadOnlyList<uint> unlockLinks = _gameFunctions.GetUnlockLinks();
|
||||
if (unlockLinks.Count >= 0)
|
||||
IReadOnlyList<uint> questNode = _gameFunctions.GetUnlockLinks();
|
||||
if (questNode.Count >= 0)
|
||||
{
|
||||
_chatGui.Print($"Saved {unlockLinks.Count} unlock links to log.", "Questionable", 576);
|
||||
List<uint> list6 = unlockLinks.Except(_previouslyUnlockedUnlockLinks).ToList();
|
||||
_chatGui.Print($"Saved {questNode.Count} unlock links to log.", "Questionable", 576);
|
||||
List<uint> list6 = questNode.Except(_previouslyUnlockedUnlockLinks).ToList();
|
||||
if (_previouslyUnlockedUnlockLinks.Count > 0 && list6.Count > 0)
|
||||
{
|
||||
_chatGui.Print("New unlock links: " + string.Join(", ", list6), "Questionable", 576);
|
||||
|
|
@ -274,17 +274,17 @@ internal sealed class CommandHandler : IDisposable
|
|||
{
|
||||
_chatGui.PrintError("Could not query unlock links.", "Questionable", 576);
|
||||
}
|
||||
_previouslyUnlockedUnlockLinks = unlockLinks;
|
||||
_previouslyUnlockedUnlockLinks = questNode;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
switch (text[0])
|
||||
switch (questRoot[0])
|
||||
{
|
||||
case 'f':
|
||||
{
|
||||
if (!(text == "festivals"))
|
||||
if (!(questRoot == "festivals"))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
@ -312,7 +312,7 @@ internal sealed class CommandHandler : IDisposable
|
|||
}
|
||||
case 'a':
|
||||
{
|
||||
if (!(text == "aethernet"))
|
||||
if (!(questRoot == "aethernet"))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
@ -327,13 +327,13 @@ internal sealed class CommandHandler : IDisposable
|
|||
{
|
||||
item7.Deconstruct(out key, out value10);
|
||||
EAetheryteLocation key2 = key;
|
||||
string text2 = value10;
|
||||
string text = value10;
|
||||
if (aetheryteData.TerritoryIds.TryGetValue(key2, out var value11) && value11 == territoryType)
|
||||
{
|
||||
int num8 = text2.IndexOf(']', StringComparison.Ordinal);
|
||||
int num8 = text.IndexOf(']', StringComparison.Ordinal);
|
||||
if (num8 > 0)
|
||||
{
|
||||
string item3 = text2.Substring(1, num8 - 1);
|
||||
string item3 = text.Substring(1, num8 - 1);
|
||||
hashSet2.Add(item3);
|
||||
}
|
||||
}
|
||||
|
|
@ -347,21 +347,21 @@ internal sealed class CommandHandler : IDisposable
|
|||
{
|
||||
item8.Deconstruct(out key, out value10);
|
||||
EAetheryteLocation eAetheryteLocation = key;
|
||||
string text3 = value10;
|
||||
int num9 = text3.IndexOf(']', StringComparison.Ordinal);
|
||||
string text2 = value10;
|
||||
int num9 = text2.IndexOf(']', StringComparison.Ordinal);
|
||||
if (num9 <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
string text4 = text3.Substring(1, num9 - 1);
|
||||
if (hashSet2.Contains(text4))
|
||||
string text3 = text2.Substring(1, num9 - 1);
|
||||
if (hashSet2.Contains(text3))
|
||||
{
|
||||
if (!dictionary.ContainsKey(text4))
|
||||
if (!dictionary.ContainsKey(text3))
|
||||
{
|
||||
dictionary[text4] = new List<(EAetheryteLocation, string, bool)>();
|
||||
dictionary[text3] = new List<(EAetheryteLocation, string, bool)>();
|
||||
}
|
||||
bool item4 = _aetheryteFunctions.IsAetheryteUnlocked(eAetheryteLocation);
|
||||
dictionary[text4].Add((eAetheryteLocation, text3, item4));
|
||||
dictionary[text3].Add((eAetheryteLocation, text2, item4));
|
||||
}
|
||||
}
|
||||
{
|
||||
|
|
@ -404,32 +404,32 @@ internal sealed class CommandHandler : IDisposable
|
|||
}
|
||||
break;
|
||||
case 5:
|
||||
if (text == "setup")
|
||||
if (questRoot == "setup")
|
||||
{
|
||||
_oneTimeSetupWindow.IsOpenAndUncollapsed = true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (text == "do")
|
||||
if (questRoot == "do")
|
||||
{
|
||||
ConfigureDebugOverlay(array.Skip(1).ToArray());
|
||||
ConfigureDebugOverlay(questId.Skip(1).ToArray());
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (text == "sim")
|
||||
if (questRoot == "sim")
|
||||
{
|
||||
SetSimulatedQuest(array.Skip(1).ToArray());
|
||||
SetSimulatedQuest(questId.Skip(1).ToArray());
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (text == "mountid")
|
||||
if (questRoot == "mountid")
|
||||
{
|
||||
PrintMountId();
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
{
|
||||
if (!(text == "quest-kills"))
|
||||
if (!(questRoot == "quest-kills"))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
@ -629,21 +629,21 @@ internal sealed class CommandHandler : IDisposable
|
|||
|
||||
private void ConfigureDebugOverlay(string[] arguments)
|
||||
{
|
||||
ElementId elementId;
|
||||
ElementId name;
|
||||
if (!_debugOverlay.DrawConditions())
|
||||
{
|
||||
_chatGui.PrintError("You don't have the debug overlay enabled.", "Questionable", 576);
|
||||
}
|
||||
else if (arguments.Length >= 1 && ElementId.TryFromString(arguments[0], out elementId) && elementId != null)
|
||||
else if (arguments.Length >= 1 && ElementId.TryFromString(arguments[0], out name) && name != null)
|
||||
{
|
||||
if (_questRegistry.TryGetQuest(elementId, out Questionable.Model.Quest quest))
|
||||
if (_questRegistry.TryGetQuest(name, out Questionable.Model.Quest quest))
|
||||
{
|
||||
_debugOverlay.HighlightedQuest = quest.Id;
|
||||
_chatGui.Print($"Set highlighted quest to {elementId} ({quest.Info.Name}).", "Questionable", 576);
|
||||
_chatGui.Print($"Set highlighted quest to {name} ({quest.Info.Name}).", "Questionable", 576);
|
||||
}
|
||||
else
|
||||
{
|
||||
_chatGui.PrintError($"Unknown quest {elementId}.", "Questionable", 576);
|
||||
_chatGui.PrintError($"Unknown quest {name}.", "Questionable", 576);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -716,11 +716,11 @@ internal sealed class CommandHandler : IDisposable
|
|||
|
||||
private void PrintMountId()
|
||||
{
|
||||
ushort? mountId = _gameFunctions.GetMountId();
|
||||
if (mountId.HasValue)
|
||||
ushort? allQuests = _gameFunctions.GetMountId();
|
||||
if (allQuests.HasValue)
|
||||
{
|
||||
Mount? rowOrDefault = _dataManager.GetExcelSheet<Mount>().GetRowOrDefault(mountId.Value);
|
||||
_chatGui.Print($"Mount ID: {mountId}, Name: {rowOrDefault?.Singular}, Obtainable: {((rowOrDefault?.Order == -1) ? "No" : "Yes")}", "Questionable", 576);
|
||||
Mount? rowOrDefault = _dataManager.GetExcelSheet<Mount>().GetRowOrDefault(allQuests.Value);
|
||||
_chatGui.Print($"Mount ID: {allQuests}, Name: {rowOrDefault?.Singular}, Obtainable: {((rowOrDefault?.Order == -1) ? "No" : "Yes")}", "Questionable", 576);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -233,17 +233,17 @@ internal sealed class GatheringController : MiniTaskController<GatheringControll
|
|||
|
||||
public override IList<string> GetRemainingTaskNames()
|
||||
{
|
||||
ITask task = _taskQueue.CurrentTaskExecutor?.CurrentTask;
|
||||
if (task != null)
|
||||
ITask oldSequence = _taskQueue.CurrentTaskExecutor?.CurrentTask;
|
||||
if (oldSequence != null)
|
||||
{
|
||||
string text = task.ToString() ?? "?";
|
||||
string newSequence = oldSequence.ToString() ?? "?";
|
||||
IList<string> remainingTaskNames = base.GetRemainingTaskNames();
|
||||
int num = 1 + remainingTaskNames.Count;
|
||||
List<string> list = new List<string>(num);
|
||||
CollectionsMarshal.SetCount(list, num);
|
||||
Span<string> span = CollectionsMarshal.AsSpan(list);
|
||||
int num2 = 0;
|
||||
span[num2] = text;
|
||||
span[num2] = newSequence;
|
||||
num2++;
|
||||
{
|
||||
foreach (string item in remainingTaskNames)
|
||||
|
|
|
|||
|
|
@ -925,11 +925,11 @@ internal sealed class AetheryteData
|
|||
{
|
||||
return float.MaxValue;
|
||||
}
|
||||
if (!AirshipLandingLocations.TryGetValue(to, out var value2))
|
||||
if (!AirshipLandingLocations.TryGetValue(to, out var task))
|
||||
{
|
||||
return float.MaxValue;
|
||||
}
|
||||
return (fromPosition - value2).Length();
|
||||
return (fromPosition - task).Length();
|
||||
}
|
||||
|
||||
public bool IsCityAetheryte(EAetheryteLocation aetheryte)
|
||||
|
|
@ -938,8 +938,8 @@ internal sealed class AetheryteData
|
|||
{
|
||||
return true;
|
||||
}
|
||||
ushort value = TerritoryIds[aetheryte];
|
||||
return TownTerritoryIds.Contains(value);
|
||||
ushort toastAware = TerritoryIds[aetheryte];
|
||||
return TownTerritoryIds.Contains(toastAware);
|
||||
}
|
||||
|
||||
public bool IsAirshipLanding(EAetheryteLocation aetheryte)
|
||||
|
|
|
|||
|
|
@ -147,10 +147,10 @@ internal sealed class QuestData
|
|||
span[num2] = new AethernetQuestInfo(new AethernetId(14), "Tuliyollal");
|
||||
num2++;
|
||||
span[num2] = new AethernetQuestInfo(new AethernetId(15), "Solution Nine");
|
||||
List<AethernetQuestInfo> collection = list2;
|
||||
List<AetherCurrentQuestInfo> collection2 = new List<AetherCurrentQuestInfo>();
|
||||
quests.AddRange(collection);
|
||||
quests.AddRange(collection2);
|
||||
List<AethernetQuestInfo> currentSequence = list2;
|
||||
List<AetherCurrentQuestInfo> currentStep = new List<AetherCurrentQuestInfo>();
|
||||
quests.AddRange(currentSequence);
|
||||
quests.AddRange(currentStep);
|
||||
_quests = quests.ToDictionary((IQuestInfo x) => x.QuestId, (IQuestInfo x) => x);
|
||||
AddPreviousQuest(new QuestId(425), new QuestId(495));
|
||||
AddPreviousQuest(new QuestId(1480), new QuestId(2373));
|
||||
|
|
@ -267,7 +267,7 @@ internal sealed class QuestData
|
|||
|
||||
private void AddPreviousQuest(QuestId questToUpdate, QuestId requiredQuestId)
|
||||
{
|
||||
if (_quests.TryGetValue(questToUpdate, out IQuestInfo value) && value is QuestInfo questInfo)
|
||||
if (_quests.TryGetValue(questToUpdate, out IQuestInfo stoppableTaskExecutor) && stoppableTaskExecutor is QuestInfo questInfo)
|
||||
{
|
||||
questInfo.AddPreviousQuest(new PreviousQuestInfo(requiredQuestId, 0));
|
||||
}
|
||||
|
|
@ -275,16 +275,16 @@ internal sealed class QuestData
|
|||
|
||||
private void AddGcFollowUpQuests()
|
||||
{
|
||||
QuestId[] array = new QuestId[3]
|
||||
QuestId[] scope = new QuestId[3]
|
||||
{
|
||||
new QuestId(683),
|
||||
new QuestId(684),
|
||||
new QuestId(685)
|
||||
};
|
||||
QuestId[] array2 = array;
|
||||
foreach (QuestId questId in array2)
|
||||
QuestId[] array = scope;
|
||||
foreach (QuestId questId in array)
|
||||
{
|
||||
((QuestInfo)_quests[questId]).AddQuestLocks(EQuestJoin.AtLeastOne, array.Where((QuestId x) => x != questId).ToArray());
|
||||
((QuestInfo)_quests[questId]).AddQuestLocks(EQuestJoin.AtLeastOne, scope.Where((QuestId x) => x != questId).ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -950,8 +950,8 @@ internal sealed class QuestData
|
|||
public unsafe List<QuestId> GetLockedClassQuests()
|
||||
{
|
||||
PlayerState* ptr = PlayerState.Instance();
|
||||
EClassJob eClassJob = (EClassJob)((ptr != null) ? ptr->FirstClass : 0);
|
||||
if (eClassJob == EClassJob.Adventurer)
|
||||
EClassJob scope = (EClassJob)((ptr != null) ? ptr->FirstClass : 0);
|
||||
if (scope == EClassJob.Adventurer)
|
||||
{
|
||||
return new List<QuestId>();
|
||||
}
|
||||
|
|
@ -962,7 +962,7 @@ internal sealed class QuestData
|
|||
int num2 = 0;
|
||||
ref List<ushort> reference = ref span[num2];
|
||||
List<ushort> list2;
|
||||
if (eClassJob != EClassJob.Gladiator)
|
||||
if (scope != EClassJob.Gladiator)
|
||||
{
|
||||
int num3 = 2;
|
||||
list2 = new List<ushort>(num3);
|
||||
|
|
@ -992,7 +992,7 @@ internal sealed class QuestData
|
|||
num2++;
|
||||
ref List<ushort> reference2 = ref span[num2];
|
||||
List<ushort> list3;
|
||||
if (eClassJob != EClassJob.Pugilist)
|
||||
if (scope != EClassJob.Pugilist)
|
||||
{
|
||||
int num3 = 2;
|
||||
list3 = new List<ushort>(num3);
|
||||
|
|
@ -1022,7 +1022,7 @@ internal sealed class QuestData
|
|||
num2++;
|
||||
ref List<ushort> reference3 = ref span[num2];
|
||||
List<ushort> list4;
|
||||
if (eClassJob != EClassJob.Marauder)
|
||||
if (scope != EClassJob.Marauder)
|
||||
{
|
||||
int num3 = 2;
|
||||
list4 = new List<ushort>(num3);
|
||||
|
|
@ -1052,7 +1052,7 @@ internal sealed class QuestData
|
|||
num2++;
|
||||
ref List<ushort> reference4 = ref span[num2];
|
||||
List<ushort> list5;
|
||||
if (eClassJob != EClassJob.Lancer)
|
||||
if (scope != EClassJob.Lancer)
|
||||
{
|
||||
int num3 = 2;
|
||||
list5 = new List<ushort>(num3);
|
||||
|
|
@ -1082,7 +1082,7 @@ internal sealed class QuestData
|
|||
num2++;
|
||||
ref List<ushort> reference5 = ref span[num2];
|
||||
List<ushort> list6;
|
||||
if (eClassJob != EClassJob.Archer)
|
||||
if (scope != EClassJob.Archer)
|
||||
{
|
||||
int num3 = 2;
|
||||
list6 = new List<ushort>(num3);
|
||||
|
|
@ -1112,7 +1112,7 @@ internal sealed class QuestData
|
|||
num2++;
|
||||
ref List<ushort> reference6 = ref span[num2];
|
||||
List<ushort> list7;
|
||||
if (eClassJob != EClassJob.Conjurer)
|
||||
if (scope != EClassJob.Conjurer)
|
||||
{
|
||||
int num3 = 2;
|
||||
list7 = new List<ushort>(num3);
|
||||
|
|
@ -1142,7 +1142,7 @@ internal sealed class QuestData
|
|||
num2++;
|
||||
ref List<ushort> reference7 = ref span[num2];
|
||||
List<ushort> list8;
|
||||
if (eClassJob != EClassJob.Thaumaturge)
|
||||
if (scope != EClassJob.Thaumaturge)
|
||||
{
|
||||
int num3 = 2;
|
||||
list8 = new List<ushort>(num3);
|
||||
|
|
@ -1172,7 +1172,7 @@ internal sealed class QuestData
|
|||
num2++;
|
||||
ref List<ushort> reference8 = ref span[num2];
|
||||
List<ushort> list9;
|
||||
if (eClassJob != EClassJob.Arcanist)
|
||||
if (scope != EClassJob.Arcanist)
|
||||
{
|
||||
int num3 = 2;
|
||||
list9 = new List<ushort>(num3);
|
||||
|
|
@ -1205,13 +1205,13 @@ internal sealed class QuestData
|
|||
|
||||
public void ApplySeasonalOverride(ElementId questId, bool isSeasonal, DateTime? expiry)
|
||||
{
|
||||
if (_quests.TryGetValue(questId, out IQuestInfo value) && value is QuestInfo questInfo)
|
||||
if (_quests.TryGetValue(questId, out IQuestInfo scope) && scope is QuestInfo questInfo)
|
||||
{
|
||||
DateTime? seasonalQuestExpiry = null;
|
||||
if (expiry.HasValue)
|
||||
{
|
||||
DateTime value2 = expiry.Value;
|
||||
seasonalQuestExpiry = ((!(value2.TimeOfDay == TimeSpan.Zero)) ? new DateTime?((value2.Kind == DateTimeKind.Utc) ? value2 : value2.ToUniversalTime()) : new DateTime?(EventInfoComponent.AtDailyReset(DateOnly.FromDateTime(value2))));
|
||||
DateTime value = expiry.Value;
|
||||
seasonalQuestExpiry = ((!(value.TimeOfDay == TimeSpan.Zero)) ? new DateTime?((value.Kind == DateTimeKind.Utc) ? value : value.ToUniversalTime()) : new DateTime?(EventInfoComponent.AtDailyReset(DateOnly.FromDateTime(value))));
|
||||
}
|
||||
questInfo.IsSeasonalQuest = isSeasonal;
|
||||
questInfo.SeasonalQuestExpiry = seasonalQuestExpiry;
|
||||
|
|
@ -1232,382 +1232,382 @@ internal sealed class QuestData
|
|||
static QuestData()
|
||||
{
|
||||
Dictionary<uint, List<ushort>> dictionary = new Dictionary<uint, List<ushort>>();
|
||||
int num = 4;
|
||||
List<ushort> list = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list, num);
|
||||
Span<ushort> span = CollectionsMarshal.AsSpan(list);
|
||||
int num2 = 0;
|
||||
span[num2] = 1744;
|
||||
num2++;
|
||||
span[num2] = 1759;
|
||||
num2++;
|
||||
span[num2] = 1760;
|
||||
num2++;
|
||||
span[num2] = 2111;
|
||||
int seq = 4;
|
||||
List<ushort> list = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list, seq);
|
||||
Span<ushort> step = CollectionsMarshal.AsSpan(list);
|
||||
int createTasks = 0;
|
||||
step[createTasks] = 1744;
|
||||
createTasks++;
|
||||
step[createTasks] = 1759;
|
||||
createTasks++;
|
||||
step[createTasks] = 1760;
|
||||
createTasks++;
|
||||
step[createTasks] = 2111;
|
||||
dictionary.Add(397u, list);
|
||||
num2 = 4;
|
||||
List<ushort> list2 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list2, num2);
|
||||
span = CollectionsMarshal.AsSpan(list2);
|
||||
num = 0;
|
||||
span[num] = 1771;
|
||||
num++;
|
||||
span[num] = 1790;
|
||||
num++;
|
||||
span[num] = 1797;
|
||||
num++;
|
||||
span[num] = 1802;
|
||||
createTasks = 4;
|
||||
List<ushort> list2 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list2, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list2);
|
||||
seq = 0;
|
||||
step[seq] = 1771;
|
||||
seq++;
|
||||
step[seq] = 1790;
|
||||
seq++;
|
||||
step[seq] = 1797;
|
||||
seq++;
|
||||
step[seq] = 1802;
|
||||
dictionary.Add(398u, list2);
|
||||
num = 4;
|
||||
List<ushort> list3 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list3, num);
|
||||
span = CollectionsMarshal.AsSpan(list3);
|
||||
num2 = 0;
|
||||
span[num2] = 1936;
|
||||
num2++;
|
||||
span[num2] = 1945;
|
||||
num2++;
|
||||
span[num2] = 1963;
|
||||
num2++;
|
||||
span[num2] = 1966;
|
||||
seq = 4;
|
||||
List<ushort> list3 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list3, seq);
|
||||
step = CollectionsMarshal.AsSpan(list3);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 1936;
|
||||
createTasks++;
|
||||
step[createTasks] = 1945;
|
||||
createTasks++;
|
||||
step[createTasks] = 1963;
|
||||
createTasks++;
|
||||
step[createTasks] = 1966;
|
||||
dictionary.Add(399u, list3);
|
||||
num2 = 4;
|
||||
List<ushort> list4 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list4, num2);
|
||||
span = CollectionsMarshal.AsSpan(list4);
|
||||
num = 0;
|
||||
span[num] = 1819;
|
||||
num++;
|
||||
span[num] = 1823;
|
||||
num++;
|
||||
span[num] = 1828;
|
||||
num++;
|
||||
span[num] = 1835;
|
||||
createTasks = 4;
|
||||
List<ushort> list4 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list4, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list4);
|
||||
seq = 0;
|
||||
step[seq] = 1819;
|
||||
seq++;
|
||||
step[seq] = 1823;
|
||||
seq++;
|
||||
step[seq] = 1828;
|
||||
seq++;
|
||||
step[seq] = 1835;
|
||||
dictionary.Add(400u, list4);
|
||||
num = 4;
|
||||
List<ushort> list5 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list5, num);
|
||||
span = CollectionsMarshal.AsSpan(list5);
|
||||
num2 = 0;
|
||||
span[num2] = 1748;
|
||||
num2++;
|
||||
span[num2] = 1874;
|
||||
num2++;
|
||||
span[num2] = 1909;
|
||||
num2++;
|
||||
span[num2] = 1910;
|
||||
seq = 4;
|
||||
List<ushort> list5 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list5, seq);
|
||||
step = CollectionsMarshal.AsSpan(list5);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 1748;
|
||||
createTasks++;
|
||||
step[createTasks] = 1874;
|
||||
createTasks++;
|
||||
step[createTasks] = 1909;
|
||||
createTasks++;
|
||||
step[createTasks] = 1910;
|
||||
dictionary.Add(401u, list5);
|
||||
num2 = 4;
|
||||
List<ushort> list6 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list6, num2);
|
||||
span = CollectionsMarshal.AsSpan(list6);
|
||||
num = 0;
|
||||
span[num] = 2639;
|
||||
num++;
|
||||
span[num] = 2661;
|
||||
num++;
|
||||
span[num] = 2816;
|
||||
num++;
|
||||
span[num] = 2821;
|
||||
createTasks = 4;
|
||||
List<ushort> list6 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list6, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list6);
|
||||
seq = 0;
|
||||
step[seq] = 2639;
|
||||
seq++;
|
||||
step[seq] = 2661;
|
||||
seq++;
|
||||
step[seq] = 2816;
|
||||
seq++;
|
||||
step[seq] = 2821;
|
||||
dictionary.Add(612u, list6);
|
||||
num = 4;
|
||||
List<ushort> list7 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list7, num);
|
||||
span = CollectionsMarshal.AsSpan(list7);
|
||||
num2 = 0;
|
||||
span[num2] = 2632;
|
||||
num2++;
|
||||
span[num2] = 2673;
|
||||
num2++;
|
||||
span[num2] = 2687;
|
||||
num2++;
|
||||
span[num2] = 2693;
|
||||
seq = 4;
|
||||
List<ushort> list7 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list7, seq);
|
||||
step = CollectionsMarshal.AsSpan(list7);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 2632;
|
||||
createTasks++;
|
||||
step[createTasks] = 2673;
|
||||
createTasks++;
|
||||
step[createTasks] = 2687;
|
||||
createTasks++;
|
||||
step[createTasks] = 2693;
|
||||
dictionary.Add(613u, list7);
|
||||
num2 = 4;
|
||||
List<ushort> list8 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list8, num2);
|
||||
span = CollectionsMarshal.AsSpan(list8);
|
||||
num = 0;
|
||||
span[num] = 2724;
|
||||
num++;
|
||||
span[num] = 2728;
|
||||
num++;
|
||||
span[num] = 2730;
|
||||
num++;
|
||||
span[num] = 2733;
|
||||
createTasks = 4;
|
||||
List<ushort> list8 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list8, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list8);
|
||||
seq = 0;
|
||||
step[seq] = 2724;
|
||||
seq++;
|
||||
step[seq] = 2728;
|
||||
seq++;
|
||||
step[seq] = 2730;
|
||||
seq++;
|
||||
step[seq] = 2733;
|
||||
dictionary.Add(614u, list8);
|
||||
num = 4;
|
||||
List<ushort> list9 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list9, num);
|
||||
span = CollectionsMarshal.AsSpan(list9);
|
||||
num2 = 0;
|
||||
span[num2] = 2655;
|
||||
num2++;
|
||||
span[num2] = 2842;
|
||||
num2++;
|
||||
span[num2] = 2851;
|
||||
num2++;
|
||||
span[num2] = 2860;
|
||||
seq = 4;
|
||||
List<ushort> list9 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list9, seq);
|
||||
step = CollectionsMarshal.AsSpan(list9);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 2655;
|
||||
createTasks++;
|
||||
step[createTasks] = 2842;
|
||||
createTasks++;
|
||||
step[createTasks] = 2851;
|
||||
createTasks++;
|
||||
step[createTasks] = 2860;
|
||||
dictionary.Add(620u, list9);
|
||||
num2 = 4;
|
||||
List<ushort> list10 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list10, num2);
|
||||
span = CollectionsMarshal.AsSpan(list10);
|
||||
num = 0;
|
||||
span[num] = 2877;
|
||||
num++;
|
||||
span[num] = 2880;
|
||||
num++;
|
||||
span[num] = 2881;
|
||||
num++;
|
||||
span[num] = 2883;
|
||||
createTasks = 4;
|
||||
List<ushort> list10 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list10, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list10);
|
||||
seq = 0;
|
||||
step[seq] = 2877;
|
||||
seq++;
|
||||
step[seq] = 2880;
|
||||
seq++;
|
||||
step[seq] = 2881;
|
||||
seq++;
|
||||
step[seq] = 2883;
|
||||
dictionary.Add(621u, list10);
|
||||
num = 4;
|
||||
List<ushort> list11 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list11, num);
|
||||
span = CollectionsMarshal.AsSpan(list11);
|
||||
num2 = 0;
|
||||
span[num2] = 2760;
|
||||
num2++;
|
||||
span[num2] = 2771;
|
||||
num2++;
|
||||
span[num2] = 2782;
|
||||
num2++;
|
||||
span[num2] = 2791;
|
||||
seq = 4;
|
||||
List<ushort> list11 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list11, seq);
|
||||
step = CollectionsMarshal.AsSpan(list11);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 2760;
|
||||
createTasks++;
|
||||
step[createTasks] = 2771;
|
||||
createTasks++;
|
||||
step[createTasks] = 2782;
|
||||
createTasks++;
|
||||
step[createTasks] = 2791;
|
||||
dictionary.Add(622u, list11);
|
||||
num2 = 4;
|
||||
List<ushort> list12 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list12, num2);
|
||||
span = CollectionsMarshal.AsSpan(list12);
|
||||
num = 0;
|
||||
span[num] = 3380;
|
||||
num++;
|
||||
span[num] = 3384;
|
||||
num++;
|
||||
span[num] = 3385;
|
||||
num++;
|
||||
span[num] = 3386;
|
||||
createTasks = 4;
|
||||
List<ushort> list12 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list12, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list12);
|
||||
seq = 0;
|
||||
step[seq] = 3380;
|
||||
seq++;
|
||||
step[seq] = 3384;
|
||||
seq++;
|
||||
step[seq] = 3385;
|
||||
seq++;
|
||||
step[seq] = 3386;
|
||||
dictionary.Add(813u, list12);
|
||||
num = 4;
|
||||
List<ushort> list13 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list13, num);
|
||||
span = CollectionsMarshal.AsSpan(list13);
|
||||
num2 = 0;
|
||||
span[num2] = 3360;
|
||||
num2++;
|
||||
span[num2] = 3371;
|
||||
num2++;
|
||||
span[num2] = 3537;
|
||||
num2++;
|
||||
span[num2] = 3556;
|
||||
seq = 4;
|
||||
List<ushort> list13 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list13, seq);
|
||||
step = CollectionsMarshal.AsSpan(list13);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 3360;
|
||||
createTasks++;
|
||||
step[createTasks] = 3371;
|
||||
createTasks++;
|
||||
step[createTasks] = 3537;
|
||||
createTasks++;
|
||||
step[createTasks] = 3556;
|
||||
dictionary.Add(814u, list13);
|
||||
num2 = 4;
|
||||
List<ushort> list14 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list14, num2);
|
||||
span = CollectionsMarshal.AsSpan(list14);
|
||||
num = 0;
|
||||
span[num] = 3375;
|
||||
num++;
|
||||
span[num] = 3503;
|
||||
num++;
|
||||
span[num] = 3511;
|
||||
num++;
|
||||
span[num] = 3525;
|
||||
createTasks = 4;
|
||||
List<ushort> list14 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list14, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list14);
|
||||
seq = 0;
|
||||
step[seq] = 3375;
|
||||
seq++;
|
||||
step[seq] = 3503;
|
||||
seq++;
|
||||
step[seq] = 3511;
|
||||
seq++;
|
||||
step[seq] = 3525;
|
||||
dictionary.Add(815u, list14);
|
||||
num = 4;
|
||||
List<ushort> list15 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list15, num);
|
||||
span = CollectionsMarshal.AsSpan(list15);
|
||||
num2 = 0;
|
||||
span[num2] = 3395;
|
||||
num2++;
|
||||
span[num2] = 3398;
|
||||
num2++;
|
||||
span[num2] = 3404;
|
||||
num2++;
|
||||
span[num2] = 3427;
|
||||
seq = 4;
|
||||
List<ushort> list15 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list15, seq);
|
||||
step = CollectionsMarshal.AsSpan(list15);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 3395;
|
||||
createTasks++;
|
||||
step[createTasks] = 3398;
|
||||
createTasks++;
|
||||
step[createTasks] = 3404;
|
||||
createTasks++;
|
||||
step[createTasks] = 3427;
|
||||
dictionary.Add(816u, list15);
|
||||
num2 = 4;
|
||||
List<ushort> list16 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list16, num2);
|
||||
span = CollectionsMarshal.AsSpan(list16);
|
||||
num = 0;
|
||||
span[num] = 3444;
|
||||
num++;
|
||||
span[num] = 3467;
|
||||
num++;
|
||||
span[num] = 3478;
|
||||
num++;
|
||||
span[num] = 3656;
|
||||
createTasks = 4;
|
||||
List<ushort> list16 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list16, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list16);
|
||||
seq = 0;
|
||||
step[seq] = 3444;
|
||||
seq++;
|
||||
step[seq] = 3467;
|
||||
seq++;
|
||||
step[seq] = 3478;
|
||||
seq++;
|
||||
step[seq] = 3656;
|
||||
dictionary.Add(817u, list16);
|
||||
num = 4;
|
||||
List<ushort> list17 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list17, num);
|
||||
span = CollectionsMarshal.AsSpan(list17);
|
||||
num2 = 0;
|
||||
span[num2] = 3588;
|
||||
num2++;
|
||||
span[num2] = 3592;
|
||||
num2++;
|
||||
span[num2] = 3593;
|
||||
num2++;
|
||||
span[num2] = 3594;
|
||||
seq = 4;
|
||||
List<ushort> list17 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list17, seq);
|
||||
step = CollectionsMarshal.AsSpan(list17);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 3588;
|
||||
createTasks++;
|
||||
step[createTasks] = 3592;
|
||||
createTasks++;
|
||||
step[createTasks] = 3593;
|
||||
createTasks++;
|
||||
step[createTasks] = 3594;
|
||||
dictionary.Add(818u, list17);
|
||||
num2 = 4;
|
||||
List<ushort> list18 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list18, num2);
|
||||
span = CollectionsMarshal.AsSpan(list18);
|
||||
num = 0;
|
||||
span[num] = 4320;
|
||||
num++;
|
||||
span[num] = 4329;
|
||||
num++;
|
||||
span[num] = 4480;
|
||||
num++;
|
||||
span[num] = 4484;
|
||||
createTasks = 4;
|
||||
List<ushort> list18 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list18, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list18);
|
||||
seq = 0;
|
||||
step[seq] = 4320;
|
||||
seq++;
|
||||
step[seq] = 4329;
|
||||
seq++;
|
||||
step[seq] = 4480;
|
||||
seq++;
|
||||
step[seq] = 4484;
|
||||
dictionary.Add(956u, list18);
|
||||
num = 4;
|
||||
List<ushort> list19 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list19, num);
|
||||
span = CollectionsMarshal.AsSpan(list19);
|
||||
num2 = 0;
|
||||
span[num2] = 4203;
|
||||
num2++;
|
||||
span[num2] = 4257;
|
||||
num2++;
|
||||
span[num2] = 4259;
|
||||
num2++;
|
||||
span[num2] = 4489;
|
||||
seq = 4;
|
||||
List<ushort> list19 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list19, seq);
|
||||
step = CollectionsMarshal.AsSpan(list19);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 4203;
|
||||
createTasks++;
|
||||
step[createTasks] = 4257;
|
||||
createTasks++;
|
||||
step[createTasks] = 4259;
|
||||
createTasks++;
|
||||
step[createTasks] = 4489;
|
||||
dictionary.Add(957u, list19);
|
||||
num2 = 4;
|
||||
List<ushort> list20 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list20, num2);
|
||||
span = CollectionsMarshal.AsSpan(list20);
|
||||
num = 0;
|
||||
span[num] = 4216;
|
||||
num++;
|
||||
span[num] = 4232;
|
||||
num++;
|
||||
span[num] = 4498;
|
||||
num++;
|
||||
span[num] = 4502;
|
||||
createTasks = 4;
|
||||
List<ushort> list20 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list20, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list20);
|
||||
seq = 0;
|
||||
step[seq] = 4216;
|
||||
seq++;
|
||||
step[seq] = 4232;
|
||||
seq++;
|
||||
step[seq] = 4498;
|
||||
seq++;
|
||||
step[seq] = 4502;
|
||||
dictionary.Add(958u, list20);
|
||||
num = 4;
|
||||
List<ushort> list21 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list21, num);
|
||||
span = CollectionsMarshal.AsSpan(list21);
|
||||
num2 = 0;
|
||||
span[num2] = 4240;
|
||||
num2++;
|
||||
span[num2] = 4241;
|
||||
num2++;
|
||||
span[num2] = 4253;
|
||||
num2++;
|
||||
span[num2] = 4516;
|
||||
seq = 4;
|
||||
List<ushort> list21 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list21, seq);
|
||||
step = CollectionsMarshal.AsSpan(list21);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 4240;
|
||||
createTasks++;
|
||||
step[createTasks] = 4241;
|
||||
createTasks++;
|
||||
step[createTasks] = 4253;
|
||||
createTasks++;
|
||||
step[createTasks] = 4516;
|
||||
dictionary.Add(959u, list21);
|
||||
num2 = 4;
|
||||
List<ushort> list22 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list22, num2);
|
||||
span = CollectionsMarshal.AsSpan(list22);
|
||||
num = 0;
|
||||
span[num] = 4342;
|
||||
num++;
|
||||
span[num] = 4346;
|
||||
num++;
|
||||
span[num] = 4354;
|
||||
num++;
|
||||
span[num] = 4355;
|
||||
createTasks = 4;
|
||||
List<ushort> list22 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list22, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list22);
|
||||
seq = 0;
|
||||
step[seq] = 4342;
|
||||
seq++;
|
||||
step[seq] = 4346;
|
||||
seq++;
|
||||
step[seq] = 4354;
|
||||
seq++;
|
||||
step[seq] = 4355;
|
||||
dictionary.Add(960u, list22);
|
||||
num = 4;
|
||||
List<ushort> list23 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list23, num);
|
||||
span = CollectionsMarshal.AsSpan(list23);
|
||||
num2 = 0;
|
||||
span[num2] = 4288;
|
||||
num2++;
|
||||
span[num2] = 4313;
|
||||
num2++;
|
||||
span[num2] = 4507;
|
||||
num2++;
|
||||
span[num2] = 4511;
|
||||
seq = 4;
|
||||
List<ushort> list23 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list23, seq);
|
||||
step = CollectionsMarshal.AsSpan(list23);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 4288;
|
||||
createTasks++;
|
||||
step[createTasks] = 4313;
|
||||
createTasks++;
|
||||
step[createTasks] = 4507;
|
||||
createTasks++;
|
||||
step[createTasks] = 4511;
|
||||
dictionary.Add(961u, list23);
|
||||
num2 = 4;
|
||||
List<ushort> list24 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list24, num2);
|
||||
span = CollectionsMarshal.AsSpan(list24);
|
||||
num = 0;
|
||||
span[num] = 5039;
|
||||
num++;
|
||||
span[num] = 5047;
|
||||
num++;
|
||||
span[num] = 5051;
|
||||
num++;
|
||||
span[num] = 5055;
|
||||
createTasks = 4;
|
||||
List<ushort> list24 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list24, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list24);
|
||||
seq = 0;
|
||||
step[seq] = 5039;
|
||||
seq++;
|
||||
step[seq] = 5047;
|
||||
seq++;
|
||||
step[seq] = 5051;
|
||||
seq++;
|
||||
step[seq] = 5055;
|
||||
dictionary.Add(1187u, list24);
|
||||
num = 4;
|
||||
List<ushort> list25 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list25, num);
|
||||
span = CollectionsMarshal.AsSpan(list25);
|
||||
num2 = 0;
|
||||
span[num2] = 5064;
|
||||
num2++;
|
||||
span[num2] = 5074;
|
||||
num2++;
|
||||
span[num2] = 5081;
|
||||
num2++;
|
||||
span[num2] = 5085;
|
||||
seq = 4;
|
||||
List<ushort> list25 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list25, seq);
|
||||
step = CollectionsMarshal.AsSpan(list25);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 5064;
|
||||
createTasks++;
|
||||
step[createTasks] = 5074;
|
||||
createTasks++;
|
||||
step[createTasks] = 5081;
|
||||
createTasks++;
|
||||
step[createTasks] = 5085;
|
||||
dictionary.Add(1188u, list25);
|
||||
num2 = 4;
|
||||
List<ushort> list26 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list26, num2);
|
||||
span = CollectionsMarshal.AsSpan(list26);
|
||||
num = 0;
|
||||
span[num] = 5094;
|
||||
num++;
|
||||
span[num] = 5103;
|
||||
num++;
|
||||
span[num] = 5110;
|
||||
num++;
|
||||
span[num] = 5114;
|
||||
createTasks = 4;
|
||||
List<ushort> list26 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list26, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list26);
|
||||
seq = 0;
|
||||
step[seq] = 5094;
|
||||
seq++;
|
||||
step[seq] = 5103;
|
||||
seq++;
|
||||
step[seq] = 5110;
|
||||
seq++;
|
||||
step[seq] = 5114;
|
||||
dictionary.Add(1189u, list26);
|
||||
num = 4;
|
||||
List<ushort> list27 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list27, num);
|
||||
span = CollectionsMarshal.AsSpan(list27);
|
||||
num2 = 0;
|
||||
span[num2] = 5130;
|
||||
num2++;
|
||||
span[num2] = 5138;
|
||||
num2++;
|
||||
span[num2] = 5140;
|
||||
num2++;
|
||||
span[num2] = 5144;
|
||||
seq = 4;
|
||||
List<ushort> list27 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list27, seq);
|
||||
step = CollectionsMarshal.AsSpan(list27);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 5130;
|
||||
createTasks++;
|
||||
step[createTasks] = 5138;
|
||||
createTasks++;
|
||||
step[createTasks] = 5140;
|
||||
createTasks++;
|
||||
step[createTasks] = 5144;
|
||||
dictionary.Add(1190u, list27);
|
||||
num2 = 4;
|
||||
List<ushort> list28 = new List<ushort>(num2);
|
||||
CollectionsMarshal.SetCount(list28, num2);
|
||||
span = CollectionsMarshal.AsSpan(list28);
|
||||
num = 0;
|
||||
span[num] = 5153;
|
||||
num++;
|
||||
span[num] = 5156;
|
||||
num++;
|
||||
span[num] = 5159;
|
||||
num++;
|
||||
span[num] = 5160;
|
||||
createTasks = 4;
|
||||
List<ushort> list28 = new List<ushort>(createTasks);
|
||||
CollectionsMarshal.SetCount(list28, createTasks);
|
||||
step = CollectionsMarshal.AsSpan(list28);
|
||||
seq = 0;
|
||||
step[seq] = 5153;
|
||||
seq++;
|
||||
step[seq] = 5156;
|
||||
seq++;
|
||||
step[seq] = 5159;
|
||||
seq++;
|
||||
step[seq] = 5160;
|
||||
dictionary.Add(1191u, list28);
|
||||
num = 4;
|
||||
List<ushort> list29 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list29, num);
|
||||
span = CollectionsMarshal.AsSpan(list29);
|
||||
num2 = 0;
|
||||
span[num2] = 5174;
|
||||
num2++;
|
||||
span[num2] = 5176;
|
||||
num2++;
|
||||
span[num2] = 5178;
|
||||
num2++;
|
||||
span[num2] = 5179;
|
||||
seq = 4;
|
||||
List<ushort> list29 = new List<ushort>(seq);
|
||||
CollectionsMarshal.SetCount(list29, seq);
|
||||
step = CollectionsMarshal.AsSpan(list29);
|
||||
createTasks = 0;
|
||||
step[createTasks] = 5174;
|
||||
createTasks++;
|
||||
step[createTasks] = 5176;
|
||||
createTasks++;
|
||||
step[createTasks] = 5178;
|
||||
createTasks++;
|
||||
step[createTasks] = 5179;
|
||||
dictionary.Add(1192u, list29);
|
||||
AetherCurrentQuestsByTerritory = dictionary.ToImmutableDictionary((KeyValuePair<uint, List<ushort>> x) => x.Key, (KeyValuePair<uint, List<ushort>> x) => x.Value.Select((ushort y) => new QuestId(y)).ToImmutableList());
|
||||
AetherCurrentQuests = AetherCurrentQuestsByTerritory.Values.SelectMany((ImmutableList<QuestId> x) => x).ToImmutableHashSet();
|
||||
|
|
|
|||
|
|
@ -80,12 +80,12 @@ internal sealed class TerritoryData
|
|||
|
||||
public string GetNameAndId(ushort territoryId)
|
||||
{
|
||||
string name = GetName(territoryId);
|
||||
if (name != null)
|
||||
string t = GetName(territoryId);
|
||||
if (t != null)
|
||||
{
|
||||
IFormatProvider invariantCulture = CultureInfo.InvariantCulture;
|
||||
DefaultInterpolatedStringHandler handler = new DefaultInterpolatedStringHandler(3, 2, invariantCulture);
|
||||
handler.AppendFormatted(name);
|
||||
handler.AppendFormatted(t);
|
||||
handler.AppendLiteral(" (");
|
||||
handler.AppendFormatted(territoryId);
|
||||
handler.AppendLiteral(")");
|
||||
|
|
@ -106,9 +106,9 @@ internal sealed class TerritoryData
|
|||
|
||||
public bool IsQuestBattleInstance(ushort territoryId)
|
||||
{
|
||||
if (_dutyTerritories.TryGetValue(territoryId, out var value))
|
||||
if (_dutyTerritories.TryGetValue(territoryId, out var debugStateProvider))
|
||||
{
|
||||
return value == 7;
|
||||
return debugStateProvider == 7;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -130,9 +130,9 @@ internal sealed class TerritoryData
|
|||
|
||||
public bool TryGetContentFinderConditionForSoloInstance(ElementId questId, byte index, [NotNullWhen(true)] out ContentFinderConditionData? contentFinderConditionData)
|
||||
{
|
||||
if (_questBattlesToContentFinderCondition.TryGetValue((questId, index), out var value))
|
||||
if (_questBattlesToContentFinderCondition.TryGetValue((questId, index), out var priorityQuestId))
|
||||
{
|
||||
return _contentFinderConditions.TryGetValue(value, out contentFinderConditionData);
|
||||
return _contentFinderConditions.TryGetValue(priorityQuestId, out contentFinderConditionData);
|
||||
}
|
||||
contentFinderConditionData = null;
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -89,21 +89,21 @@ internal sealed class AutoDutyIpc
|
|||
|
||||
public void StartInstance(uint cfcId, DutyMode dutyMode)
|
||||
{
|
||||
if (!_territoryData.TryGetContentFinderCondition(cfcId, out TerritoryData.ContentFinderConditionData contentFinderConditionData))
|
||||
if (!_territoryData.TryGetContentFinderCondition(cfcId, out TerritoryData.ContentFinderConditionData player))
|
||||
{
|
||||
throw new TaskException($"Unknown ContentFinderConditionId {cfcId}");
|
||||
}
|
||||
try
|
||||
{
|
||||
_setConfig.InvokeAction("Unsynced", $"{dutyMode == DutyMode.UnsyncRegular}");
|
||||
ICallGateSubscriber<string, string, object> setConfig = _setConfig;
|
||||
setConfig.InvokeAction("dutyModeEnum", dutyMode switch
|
||||
ICallGateSubscriber<string, string, object> actualDistance = _setConfig;
|
||||
actualDistance.InvokeAction("dutyModeEnum", dutyMode switch
|
||||
{
|
||||
DutyMode.Support => "Support",
|
||||
DutyMode.UnsyncRegular => "Regular",
|
||||
_ => throw new ArgumentOutOfRangeException("dutyMode", dutyMode, null),
|
||||
});
|
||||
_run.InvokeAction(contentFinderConditionData.TerritoryId, 1, !_configuration.Advanced.DisableAutoDutyBareMode);
|
||||
_run.InvokeAction(player.TerritoryId, 1, !_configuration.Advanced.DisableAutoDutyBareMode);
|
||||
}
|
||||
catch (IpcError ipcError)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
|
||||
private bool StartQuest(string questId, bool single)
|
||||
{
|
||||
if (ElementId.TryFromString(questId, out ElementId elementId) && elementId != null && _questRegistry.TryGetQuest(elementId, out Quest quest))
|
||||
if (ElementId.TryFromString(questId, out ElementId currentTaskRevisitAware) && currentTaskRevisitAware != null && _questRegistry.TryGetQuest(currentTaskRevisitAware, out Quest quest))
|
||||
{
|
||||
_questController.SetNextQuest(quest);
|
||||
if (single)
|
||||
|
|
@ -201,9 +201,9 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
|
||||
private bool IsQuestCompleted(string questId)
|
||||
{
|
||||
if (ElementId.TryFromString(questId, out ElementId elementId) && elementId != null)
|
||||
if (ElementId.TryFromString(questId, out ElementId e) && e != null)
|
||||
{
|
||||
return _questFunctions.IsQuestComplete(elementId);
|
||||
return _questFunctions.IsQuestComplete(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -219,18 +219,18 @@ internal sealed class QuestionableIpc : IDisposable
|
|||
|
||||
private bool IsQuestAccepted(string questId)
|
||||
{
|
||||
if (ElementId.TryFromString(questId, out ElementId elementId) && elementId != null)
|
||||
if (ElementId.TryFromString(questId, out ElementId solutionDirectory) && solutionDirectory != null)
|
||||
{
|
||||
return _questFunctions.IsQuestAccepted(elementId);
|
||||
return _questFunctions.IsQuestAccepted(solutionDirectory);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool IsQuestUnobtainable(string questId)
|
||||
{
|
||||
if (ElementId.TryFromString(questId, out ElementId elementId) && elementId != null)
|
||||
if (ElementId.TryFromString(questId, out ElementId gatheringPointId) && gatheringPointId != null)
|
||||
{
|
||||
return _questFunctions.IsQuestUnobtainable(elementId);
|
||||
return _questFunctions.IsQuestUnobtainable(gatheringPointId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ internal sealed class AetheryteFunctions
|
|||
public unsafe bool IsAetheryteUnlocked(uint aetheryteId, out byte subIndex)
|
||||
{
|
||||
subIndex = 0;
|
||||
UIState* ptr = UIState.Instance();
|
||||
if (ptr != null)
|
||||
UIState* cfcData = UIState.Instance();
|
||||
if (cfcData != null)
|
||||
{
|
||||
return ptr->IsAetheryteUnlocked(aetheryteId);
|
||||
return cfcData->IsAetheryteUnlocked(aetheryteId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -51,8 +51,8 @@ internal sealed class AetheryteFunctions
|
|||
{
|
||||
return _serviceProvider.GetRequiredService<QuestFunctions>().IsQuestComplete(new QuestId(3672));
|
||||
}
|
||||
byte subIndex;
|
||||
return IsAetheryteUnlocked((uint)aetheryteLocation, out subIndex);
|
||||
byte cfcData;
|
||||
return IsAetheryteUnlocked((uint)aetheryteLocation, out cfcData);
|
||||
}
|
||||
|
||||
public unsafe bool CanTeleport(EAetheryteLocation aetheryteLocation)
|
||||
|
|
@ -66,8 +66,8 @@ internal sealed class AetheryteFunctions
|
|||
|
||||
public unsafe bool IsTeleportUnlocked()
|
||||
{
|
||||
uint rowId = _dataManager.GetExcelSheet<Lumina.Excel.Sheets.Action>().GetRow(5u).UnlockLink.RowId;
|
||||
return UIState.Instance()->IsUnlockLinkUnlocked(rowId);
|
||||
uint e = _dataManager.GetExcelSheet<Lumina.Excel.Sheets.Action>().GetRow(5u).UnlockLink.RowId;
|
||||
return UIState.Instance()->IsUnlockLinkUnlocked(e);
|
||||
}
|
||||
|
||||
public unsafe bool TeleportAetheryte(uint aetheryteId)
|
||||
|
|
|
|||
|
|
@ -131,8 +131,8 @@ internal sealed class GameFunctions
|
|||
{
|
||||
foreach (IGameObject item in _objectTable)
|
||||
{
|
||||
Dalamud.Game.ClientState.Objects.Enums.ObjectKind objectKind = item.ObjectKind;
|
||||
bool flag = ((objectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Player || objectKind - 8 <= Dalamud.Game.ClientState.Objects.Enums.ObjectKind.BattleNpc || objectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Housing) ? true : false);
|
||||
Dalamud.Game.ClientState.Objects.Enums.ObjectKind e = item.ObjectKind;
|
||||
bool flag = ((e == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Player || e - 8 <= Dalamud.Game.ClientState.Objects.Enums.ObjectKind.BattleNpc || e == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Housing) ? true : false);
|
||||
if (!flag && (item == null || item.ObjectKind != Dalamud.Game.ClientState.Objects.Enums.ObjectKind.GatheringPoint || item.IsTargetable) && item.BaseId == dataId && (!kind.HasValue || kind.Value == item.ObjectKind))
|
||||
{
|
||||
return item;
|
||||
|
|
@ -186,9 +186,9 @@ internal sealed class GameFunctions
|
|||
if (gameObject != null)
|
||||
{
|
||||
_targetManager.Target = gameObject;
|
||||
long num = AgentInventoryContext.Instance()->UseItem(itemId, InventoryType.Invalid, 0u, 0);
|
||||
_logger.LogInformation("UseItem result on {DataId}: {Result}", dataId, num);
|
||||
if ((ulong)num <= 1uL)
|
||||
long e = AgentInventoryContext.Instance()->UseItem(itemId, InventoryType.Invalid, 0u, 0);
|
||||
_logger.LogInformation("UseItem result on {DataId}: {Result}", dataId, e);
|
||||
if ((ulong)e <= 1uL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -215,16 +215,16 @@ internal sealed class GameFunctions
|
|||
|
||||
public unsafe bool UseAction(EAction action)
|
||||
{
|
||||
uint num = (uint)(action & (EAction)65535);
|
||||
ActionType actionType = (((action & (EAction)65536) != (EAction)65536) ? ActionType.Action : ActionType.GeneralAction);
|
||||
if (actionType == ActionType.Action)
|
||||
uint elementId = (uint)(action & (EAction)65535);
|
||||
ActionType quest = (((action & (EAction)65536) != (EAction)65536) ? ActionType.Action : ActionType.GeneralAction);
|
||||
if (quest == ActionType.Action)
|
||||
{
|
||||
num = ActionManager.Instance()->GetAdjustedActionId(num);
|
||||
elementId = ActionManager.Instance()->GetAdjustedActionId(elementId);
|
||||
}
|
||||
if (ActionManager.Instance()->GetActionStatus(actionType, num, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0)
|
||||
if (ActionManager.Instance()->GetActionStatus(quest, elementId, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0)
|
||||
{
|
||||
bool flag = ActionManager.Instance()->UseAction(actionType, num, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
_logger.LogInformation("UseAction {Action} (adjusted: {AdjustedActionId}) result: {Result}", action, num, flag);
|
||||
bool flag = ActionManager.Instance()->UseAction(quest, elementId, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
_logger.LogInformation("UseAction {Action} (adjusted: {AdjustedActionId}) result: {Result}", action, elementId, flag);
|
||||
return flag;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -232,34 +232,34 @@ internal sealed class GameFunctions
|
|||
|
||||
public unsafe bool UseAction(IGameObject gameObject, EAction action, bool checkCanUse = true)
|
||||
{
|
||||
uint actionId = (uint)(action & (EAction)65535);
|
||||
ActionType actionType = (((action & (EAction)65536) != (EAction)65536) ? ActionType.Action : ActionType.GeneralAction);
|
||||
if (actionType == ActionType.GeneralAction)
|
||||
uint progress = (uint)(action & (EAction)65535);
|
||||
ActionType questId = (((action & (EAction)65536) != (EAction)65536) ? ActionType.Action : ActionType.GeneralAction);
|
||||
if (questId == ActionType.GeneralAction)
|
||||
{
|
||||
_logger.LogWarning("Can not use general action {Action} on target {Target}", action, gameObject);
|
||||
return false;
|
||||
}
|
||||
actionId = ActionManager.Instance()->GetAdjustedActionId(actionId);
|
||||
if (checkCanUse && !ActionManager.CanUseActionOnTarget(actionId, (GameObject*)gameObject.Address))
|
||||
progress = ActionManager.Instance()->GetAdjustedActionId(progress);
|
||||
if (checkCanUse && !ActionManager.CanUseActionOnTarget(progress, (GameObject*)gameObject.Address))
|
||||
{
|
||||
_logger.LogWarning("Can not use action {Action} (adjusted: {AdjustedActionId}) on target {Target}", action, actionId, gameObject);
|
||||
_logger.LogWarning("Can not use action {Action} (adjusted: {AdjustedActionId}) on target {Target}", action, progress, gameObject);
|
||||
return false;
|
||||
}
|
||||
Lumina.Excel.Sheets.Action row = _dataManager.GetExcelSheet<Lumina.Excel.Sheets.Action>().GetRow(actionId);
|
||||
Lumina.Excel.Sheets.Action step = _dataManager.GetExcelSheet<Lumina.Excel.Sheets.Action>().GetRow(progress);
|
||||
_targetManager.Target = gameObject;
|
||||
if (ActionManager.Instance()->GetActionStatus(actionType, actionId, gameObject.GameObjectId, checkRecastActive: true, checkCastingActive: true, null) == 0)
|
||||
if (ActionManager.Instance()->GetActionStatus(questId, progress, gameObject.GameObjectId, checkRecastActive: true, checkCastingActive: true, null) == 0)
|
||||
{
|
||||
bool flag;
|
||||
if (row.TargetArea)
|
||||
if (step.TargetArea)
|
||||
{
|
||||
Vector3 position = gameObject.Position;
|
||||
flag = ActionManager.Instance()->UseActionLocation(actionType, actionId, 3758096384uL, &position, 0u, 0);
|
||||
_logger.LogInformation("UseAction {Action} (adjusted: {AdjustedActionId}) on target area {Target} result: {Result}", action, actionId, gameObject, flag);
|
||||
flag = ActionManager.Instance()->UseActionLocation(questId, progress, 3758096384uL, &position, 0u, 0);
|
||||
_logger.LogInformation("UseAction {Action} (adjusted: {AdjustedActionId}) on target area {Target} result: {Result}", action, progress, gameObject, flag);
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = ActionManager.Instance()->UseAction(actionType, actionId, gameObject.GameObjectId, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
_logger.LogInformation("UseAction {Action} (adjusted: {AdjustedActionId}) on target {Target} result: {Result}", action, actionId, gameObject, flag);
|
||||
flag = ActionManager.Instance()->UseAction(questId, progress, gameObject.GameObjectId, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
_logger.LogInformation("UseAction {Action} (adjusted: {AdjustedActionId}) on target {Target} result: {Result}", action, progress, gameObject, flag);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
|
@ -268,10 +268,10 @@ internal sealed class GameFunctions
|
|||
|
||||
public bool IsObjectAtPosition(uint dataId, Vector3 position, float distance)
|
||||
{
|
||||
IGameObject gameObject = FindObjectByDataId(dataId);
|
||||
if (gameObject != null)
|
||||
IGameObject elementId = FindObjectByDataId(dataId);
|
||||
if (elementId != null)
|
||||
{
|
||||
return (gameObject.Position - position).Length() < distance;
|
||||
return (elementId.Position - position).Length() < distance;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -282,8 +282,8 @@ internal sealed class GameFunctions
|
|||
{
|
||||
return true;
|
||||
}
|
||||
PlayerState* ptr = PlayerState.Instance();
|
||||
if (ptr != null && !ptr->IsMountUnlocked(1u))
|
||||
PlayerState* questElements = PlayerState.Instance();
|
||||
if (questElements != null && !questElements->IsMountUnlocked(1u))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -308,12 +308,12 @@ internal sealed class GameFunctions
|
|||
|
||||
private unsafe bool HasCharacterStatusPreventingMountOrSprint()
|
||||
{
|
||||
IPlayerCharacter localPlayer = _clientState.LocalPlayer;
|
||||
if (localPlayer == null)
|
||||
IPlayerCharacter elementId = _clientState.LocalPlayer;
|
||||
if (elementId == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
BattleChara* address = (BattleChara*)localPlayer.Address;
|
||||
BattleChara* address = (BattleChara*)elementId.Address;
|
||||
StatusManager* statusManager = address->GetStatusManager();
|
||||
if (!statusManager->HasStatus(565u) && !statusManager->HasStatus(404u) && !statusManager->HasStatus(416u) && !statusManager->HasStatus(2729u))
|
||||
{
|
||||
|
|
@ -324,12 +324,12 @@ internal sealed class GameFunctions
|
|||
|
||||
public unsafe bool HasStatus(EStatus statusId)
|
||||
{
|
||||
IPlayerCharacter localPlayer = _clientState.LocalPlayer;
|
||||
if (localPlayer == null)
|
||||
IPlayerCharacter elementId = _clientState.LocalPlayer;
|
||||
if (elementId == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
BattleChara* address = (BattleChara*)localPlayer.Address;
|
||||
BattleChara* address = (BattleChara*)elementId.Address;
|
||||
return address->GetStatusManager()->HasStatus((uint)statusId);
|
||||
}
|
||||
|
||||
|
|
@ -393,14 +393,14 @@ internal sealed class GameFunctions
|
|||
|
||||
public unsafe void OpenDutyFinder(uint contentFinderConditionId)
|
||||
{
|
||||
if (_contentFinderConditionToContentId.TryGetValue(contentFinderConditionId, out var value))
|
||||
if (_contentFinderConditionToContentId.TryGetValue(contentFinderConditionId, out var hasActiveQuest))
|
||||
{
|
||||
if (UIState.IsInstanceContentUnlocked(value))
|
||||
if (UIState.IsInstanceContentUnlocked(hasActiveQuest))
|
||||
{
|
||||
AgentContentsFinder.Instance()->OpenRegularDuty(contentFinderConditionId);
|
||||
return;
|
||||
}
|
||||
_logger.LogError("Trying to access a locked duty (cf: {ContentFinderId}, content: {ContentId})", contentFinderConditionId, value);
|
||||
_logger.LogError("Trying to access a locked duty (cf: {ContentFinderId}, content: {ContentId})", contentFinderConditionId, hasActiveQuest);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -591,21 +591,21 @@ internal sealed class GameFunctions
|
|||
{
|
||||
try
|
||||
{
|
||||
UIModule* uIModule = Framework.Instance()->GetUIModule();
|
||||
if (uIModule == null)
|
||||
UIModule* toTerritoryType = Framework.Instance()->GetUIModule();
|
||||
if (toTerritoryType == null)
|
||||
{
|
||||
_logger.LogError("UIModule is null, cannot execute command: {Command}", command);
|
||||
return;
|
||||
}
|
||||
Utf8String utf8String = new Utf8String(command);
|
||||
Utf8String toPosition = new Utf8String(command);
|
||||
try
|
||||
{
|
||||
uIModule->ProcessChatBoxEntry(&utf8String, (nint)utf8String.StringLength);
|
||||
toTerritoryType->ProcessChatBoxEntry(&toPosition, (nint)toPosition.StringLength);
|
||||
_logger.LogDebug("Executed chat command: {Command}", command);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)utf8String/*cast due to .constrained prefix*/).Dispose();
|
||||
((IDisposable)toPosition/*cast due to .constrained prefix*/).Dispose();
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ internal sealed class QuestFunctions
|
|||
|
||||
public unsafe QuestReference GetCurrentQuest(bool allowNewMsq = true)
|
||||
{
|
||||
QuestReference currentQuestInternal = GetCurrentQuestInternal(allowNewMsq);
|
||||
currentQuestInternal.Deconstruct(out ElementId CurrentQuest, out byte Sequence, out MainScenarioQuestState State);
|
||||
QuestReference territoryId = GetCurrentQuestInternal(allowNewMsq);
|
||||
territoryId.Deconstruct(out ElementId CurrentQuest, out byte Sequence, out MainScenarioQuestState State);
|
||||
ElementId elementId = CurrentQuest;
|
||||
byte sequence = Sequence;
|
||||
MainScenarioQuestState state = State;
|
||||
|
|
@ -140,7 +140,7 @@ internal sealed class QuestFunctions
|
|||
return new QuestReference(questId, QuestManager.GetQuestSequence(questId.Value), state);
|
||||
}
|
||||
}
|
||||
return currentQuestInternal;
|
||||
return territoryId;
|
||||
}
|
||||
|
||||
public unsafe QuestReference GetCurrentQuestInternal(bool allowNewMsq)
|
||||
|
|
@ -949,8 +949,8 @@ internal sealed class QuestFunctions
|
|||
{
|
||||
return false;
|
||||
}
|
||||
QuestInfo questInfo = (QuestInfo)_questData.GetQuestInfo(questId);
|
||||
return _alliedSocietyQuestFunctions.GetAvailableAlliedSocietyQuests(questInfo.AlliedSociety).Contains(questId);
|
||||
QuestInfo combatJob = (QuestInfo)_questData.GetQuestInfo(questId);
|
||||
return _alliedSocietyQuestFunctions.GetAvailableAlliedSocietyQuests(combatJob.AlliedSociety).Contains(questId);
|
||||
}
|
||||
|
||||
public bool IsQuestUnobtainable(ElementId elementId, ElementId? extraCompletedQuest = null)
|
||||
|
|
@ -959,17 +959,17 @@ internal sealed class QuestFunctions
|
|||
{
|
||||
return IsQuestUnobtainable(questId, extraCompletedQuest);
|
||||
}
|
||||
if (elementId is UnlockLinkId unlockLinkId)
|
||||
if (elementId is UnlockLinkId combatJobGearSets)
|
||||
{
|
||||
return IsQuestUnobtainable(unlockLinkId);
|
||||
return IsQuestUnobtainable(combatJobGearSets);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe bool IsQuestUnobtainable(QuestId questId, ElementId? extraCompletedQuest = null)
|
||||
{
|
||||
IQuestInfo questInfo = _questData.GetQuestInfo(questId);
|
||||
if (questInfo is UnlockLinkQuestInfo { QuestExpiry: { TimeOfDay: var timeOfDay } questExpiry })
|
||||
IQuestInfo playerState = _questData.GetQuestInfo(questId);
|
||||
if (playerState is UnlockLinkQuestInfo { QuestExpiry: { TimeOfDay: var timeOfDay } questExpiry })
|
||||
{
|
||||
TimeSpan timeSpan = new TimeSpan(23, 59, 59);
|
||||
bool flag = false;
|
||||
|
|
@ -997,12 +997,12 @@ internal sealed class QuestFunctions
|
|||
return true;
|
||||
}
|
||||
}
|
||||
QuestInfo questInfo2 = (QuestInfo)questInfo;
|
||||
if ((int)questInfo2.Expansion > (int)PlayerState.Instance()->MaxExpansion)
|
||||
QuestInfo i = (QuestInfo)playerState;
|
||||
if ((int)i.Expansion > (int)PlayerState.Instance()->MaxExpansion)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (questInfo2.JournalGenre >= 234 && questInfo2.JournalGenre <= 247)
|
||||
if (i.JournalGenre >= 234 && i.JournalGenre <= 247)
|
||||
{
|
||||
if (_questRegistry.TryGetQuest(questId, out Questionable.Model.Quest quest))
|
||||
{
|
||||
|
|
@ -1021,38 +1021,38 @@ internal sealed class QuestFunctions
|
|||
}
|
||||
goto IL_0288;
|
||||
IL_0288:
|
||||
if (questInfo2.QuestLocks.Count > 0)
|
||||
if (i.QuestLocks.Count > 0)
|
||||
{
|
||||
int num = questInfo2.QuestLocks.Count((QuestId x) => IsQuestComplete(x) || x.Equals(extraCompletedQuest));
|
||||
if (questInfo2.QuestLockJoin == EQuestJoin.All && questInfo2.QuestLocks.Count == num)
|
||||
int num = i.QuestLocks.Count((QuestId x) => IsQuestComplete(x) || x.Equals(extraCompletedQuest));
|
||||
if (i.QuestLockJoin == EQuestJoin.All && i.QuestLocks.Count == num)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (questInfo2.QuestLockJoin == EQuestJoin.AtLeastOne && num > 0)
|
||||
if (i.QuestLockJoin == EQuestJoin.AtLeastOne && num > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
DateTime? seasonalQuestExpiry = questInfo2.SeasonalQuestExpiry;
|
||||
DateTime? seasonalQuestExpiry = i.SeasonalQuestExpiry;
|
||||
if (seasonalQuestExpiry.HasValue)
|
||||
{
|
||||
DateTime valueOrDefault = seasonalQuestExpiry.GetValueOrDefault();
|
||||
TimeSpan timeOfDay2 = valueOrDefault.TimeOfDay;
|
||||
DateTime gearset = seasonalQuestExpiry.GetValueOrDefault();
|
||||
TimeSpan timeOfDay2 = gearset.TimeOfDay;
|
||||
TimeSpan timeSpan2 = new TimeSpan(23, 59, 59);
|
||||
bool flag2 = false;
|
||||
DateTime dateTime2;
|
||||
if (timeOfDay2 == TimeSpan.Zero || timeOfDay2 == timeSpan2)
|
||||
{
|
||||
dateTime2 = EventInfoComponent.AtDailyReset(DateOnly.FromDateTime(valueOrDefault));
|
||||
dateTime2 = EventInfoComponent.AtDailyReset(DateOnly.FromDateTime(gearset));
|
||||
flag2 = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
dateTime2 = ((valueOrDefault.Kind == DateTimeKind.Utc) ? valueOrDefault : valueOrDefault.ToUniversalTime());
|
||||
dateTime2 = ((gearset.Kind == DateTimeKind.Utc) ? gearset : gearset.ToUniversalTime());
|
||||
}
|
||||
if (_alreadyLoggedUnobtainableQuestsDetailed.Add(questId.Value))
|
||||
{
|
||||
_logger.LogDebug("Quest {QuestId} seasonal expiry raw={ExpiryRaw} Kind={Kind} TimeOfDay={TimeOfDay}", questId, valueOrDefault.ToString("o"), valueOrDefault.Kind, valueOrDefault.TimeOfDay);
|
||||
_logger.LogDebug("Quest {QuestId} seasonal expiry raw={ExpiryRaw} Kind={Kind} TimeOfDay={TimeOfDay}", questId, gearset.ToString("o"), gearset.Kind, gearset.TimeOfDay);
|
||||
_logger.LogDebug("Quest {QuestId} normalized expiryUtc={ExpiryUtc:o} treatedAsDailyReset={TreatedAsDailyReset}", questId, dateTime2, flag2);
|
||||
_logger.LogTrace("Quest {QuestId} expiry check: nowUtc={Now:o}, expiryUtc={Expiry:o}, expired={Expired}", questId, DateTime.UtcNow, dateTime2, DateTime.UtcNow > dateTime2);
|
||||
}
|
||||
|
|
@ -1065,7 +1065,7 @@ internal sealed class QuestFunctions
|
|||
return true;
|
||||
}
|
||||
}
|
||||
if ((questInfo2.IsSeasonalEvent || questInfo2.IsSeasonalQuest) && !(questInfo2.SeasonalQuestExpiry is DateTime))
|
||||
if ((i.IsSeasonalEvent || i.IsSeasonalQuest) && !(i.SeasonalQuestExpiry is DateTime))
|
||||
{
|
||||
if (_alreadyLoggedUnobtainableQuestsDetailed.Add(questId.Value))
|
||||
{
|
||||
|
|
@ -1080,20 +1080,20 @@ internal sealed class QuestFunctions
|
|||
{
|
||||
return true;
|
||||
}
|
||||
byte startTown = PlayerState.Instance()->StartTown;
|
||||
if (questInfo2.StartingCity > 0 && questInfo2.StartingCity != startTown)
|
||||
byte classJob = PlayerState.Instance()->StartTown;
|
||||
if (i.StartingCity > 0 && i.StartingCity != classJob)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (questId.Value == 674 && startTown == 3)
|
||||
if (questId.Value == 674 && classJob == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (questId.Value == 673 && startTown != 3)
|
||||
if (questId.Value == 673 && classJob != 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
Dictionary<ushort, EClassJob> dictionary = new Dictionary<ushort, EClassJob>
|
||||
Dictionary<ushort, EClassJob> level = new Dictionary<ushort, EClassJob>
|
||||
{
|
||||
{
|
||||
108,
|
||||
|
|
@ -1128,7 +1128,7 @@ internal sealed class QuestFunctions
|
|||
EClassJob.Thaumaturge
|
||||
}
|
||||
};
|
||||
if (dictionary.TryGetValue(questId.Value, out var value) && dictionary.Any((KeyValuePair<ushort, EClassJob> x) => IsQuestAcceptedOrComplete(new QuestId(x.Key))) && (EClassJob)PlayerState.Instance()->FirstClass != value)
|
||||
if (level.TryGetValue(questId.Value, out var itemLevel) && level.Any((KeyValuePair<ushort, EClassJob> x) => IsQuestAcceptedOrComplete(new QuestId(x.Key))) && (EClassJob)PlayerState.Instance()->FirstClass != itemLevel)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1156,12 +1156,12 @@ internal sealed class QuestFunctions
|
|||
{
|
||||
for (int i = 0; i < GameMain.Instance()->ActiveFestivals.Length; i++)
|
||||
{
|
||||
GameMain.Festival festival = GameMain.Instance()->ActiveFestivals[i];
|
||||
if (festival.Id == id)
|
||||
GameMain.Festival gatheringItemToItem = GameMain.Instance()->ActiveFestivals[i];
|
||||
if (gatheringItemToItem.Id == id)
|
||||
{
|
||||
if (phase.HasValue)
|
||||
{
|
||||
return festival.Phase == phase;
|
||||
return gatheringItemToItem.Phase == phase;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ internal sealed class QuestInfo : IQuestInfo
|
|||
public QuestInfo(Lumina.Excel.Sheets.Quest quest, uint newGamePlusChapter, byte startingCity, JournalGenreOverrides journalGenreOverrides, bool isSeasonalEventQuest = false, DateTime? seasonalQuestExpiry = null)
|
||||
{
|
||||
QuestId = Questionable.Model.Questing.QuestId.FromRowId(quest.RowId);
|
||||
string value = QuestId.Value switch
|
||||
string localPlayer = QuestId.Value switch
|
||||
{
|
||||
85 => " (Lancer)",
|
||||
108 => " (Marauder)",
|
||||
|
|
@ -90,7 +90,7 @@ internal sealed class QuestInfo : IQuestInfo
|
|||
1434 => " (Ul'dah)",
|
||||
_ => "",
|
||||
};
|
||||
Name = $"{quest.Name}{value}";
|
||||
Name = $"{quest.Name}{localPlayer}";
|
||||
Level = quest.ClassJobLevel[0];
|
||||
IssuerDataId = quest.IssuerStart.RowId;
|
||||
IsRepeatable = quest.IsRepeatable;
|
||||
|
|
@ -144,9 +144,9 @@ internal sealed class QuestInfo : IQuestInfo
|
|||
tuple = (quest.JournalGenre.ValueNullable?.RowId, null);
|
||||
break;
|
||||
}
|
||||
(uint?, ushort?) tuple2 = tuple;
|
||||
JournalGenre = tuple2.Item1;
|
||||
SortKey = tuple2.Item2 ?? quest.SortKey;
|
||||
(uint?, ushort?) battleChara = tuple;
|
||||
JournalGenre = battleChara.Item1;
|
||||
SortKey = battleChara.Item2 ?? quest.SortKey;
|
||||
JournalGenre? valueNullable = quest.JournalGenre.ValueNullable;
|
||||
IsMainScenarioQuest = valueNullable.HasValue && valueNullable.GetValueOrDefault().Icon == 61412;
|
||||
CompletesInstantly = quest.TodoParams[0].ToDoCompleteSeq == 0;
|
||||
|
|
@ -210,16 +210,16 @@ internal sealed class QuestInfo : IQuestInfo
|
|||
}
|
||||
QuestLockJoin = questJoin;
|
||||
ImmutableList<QuestId> questLocks = QuestLocks;
|
||||
int num = 0;
|
||||
int festival = 0;
|
||||
QuestId[] array = new QuestId[questLocks.Count + questId.Length];
|
||||
foreach (QuestId item in questLocks)
|
||||
{
|
||||
array[num] = item;
|
||||
num++;
|
||||
array[festival] = item;
|
||||
festival++;
|
||||
}
|
||||
ReadOnlySpan<QuestId> readOnlySpan = new ReadOnlySpan<QuestId>(questId);
|
||||
readOnlySpan.CopyTo(new Span<QuestId>(array).Slice(num, readOnlySpan.Length));
|
||||
num += readOnlySpan.Length;
|
||||
readOnlySpan.CopyTo(new Span<QuestId>(array).Slice(festival, readOnlySpan.Length));
|
||||
festival += readOnlySpan.Length;
|
||||
QuestLocks = ImmutableList.Create(new ReadOnlySpan<QuestId>(array));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,11 +31,11 @@ internal sealed class QuestProgressInfo
|
|||
Variables = questWork.Variables.ToArray().ToList();
|
||||
IsHidden = questWork.IsHidden;
|
||||
ClassJob = (EClassJob)questWork.AcceptClassJob;
|
||||
Span<byte> variables = questWork.Variables;
|
||||
Span<byte> progress = questWork.Variables;
|
||||
string text = "";
|
||||
for (int i = 0; i < variables.Length; i++)
|
||||
for (int i = 0; i < progress.Length; i++)
|
||||
{
|
||||
text = text + variables[i] + " ";
|
||||
text = text + progress[i] + " ";
|
||||
if (i % 2 == 1)
|
||||
{
|
||||
text += " ";
|
||||
|
|
|
|||
|
|
@ -46,28 +46,28 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
{
|
||||
return;
|
||||
}
|
||||
foreach (EAlliedSociety item in from x in Enum.GetValues<EAlliedSociety>()
|
||||
foreach (EAlliedSociety quest in from x in Enum.GetValues<EAlliedSociety>()
|
||||
where x != EAlliedSociety.None
|
||||
select x)
|
||||
{
|
||||
List<QuestInfo> list = (from x in _alliedSocietyQuestFunctions.GetAvailableAlliedSocietyQuests(item)
|
||||
List<QuestInfo> foundStep = (from x in _alliedSocietyQuestFunctions.GetAvailableAlliedSocietyQuests(quest)
|
||||
select (QuestInfo)_questData.GetQuestInfo(x)).ToList();
|
||||
if (list.Count == 0 || !ImGui.CollapsingHeader($"{item}###AlliedSociety{item}"))
|
||||
if (foundStep.Count == 0 || !ImGui.CollapsingHeader($"{quest}###AlliedSociety{quest}"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if ((int)item <= 5)
|
||||
if ((int)quest <= 5)
|
||||
{
|
||||
byte i = 1;
|
||||
while (i <= 8)
|
||||
{
|
||||
List<QuestInfo> list2 = list.Where((QuestInfo x) => x.AlliedSocietyRank == i).ToList();
|
||||
if (list2.Count != 0)
|
||||
List<QuestInfo> list = foundStep.Where((QuestInfo x) => x.AlliedSocietyRank == i).ToList();
|
||||
if (list.Count != 0)
|
||||
{
|
||||
ImGui.Text(RankNames[i - 1]);
|
||||
foreach (QuestInfo item2 in list2)
|
||||
foreach (QuestInfo item in list)
|
||||
{
|
||||
DrawQuest(item2);
|
||||
DrawQuest(item);
|
||||
}
|
||||
}
|
||||
byte b = (byte)(i + 1);
|
||||
|
|
@ -75,22 +75,22 @@ internal sealed class AlliedSocietyJournalComponent
|
|||
}
|
||||
continue;
|
||||
}
|
||||
foreach (QuestInfo item3 in list)
|
||||
foreach (QuestInfo item2 in foundStep)
|
||||
{
|
||||
DrawQuest(item3);
|
||||
DrawQuest(item2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawQuest(QuestInfo questInfo)
|
||||
{
|
||||
var (color, icon, value) = _uiUtils.GetQuestStyle(questInfo.QuestId);
|
||||
var (journalGenre, journalCategory, genreName) = _uiUtils.GetQuestStyle(questInfo.QuestId);
|
||||
if (!_questRegistry.TryGetQuest(questInfo.QuestId, out Quest quest) || quest.Root.Disabled)
|
||||
{
|
||||
color = ImGuiColors.DalamudGrey;
|
||||
journalGenre = ImGuiColors.DalamudGrey;
|
||||
}
|
||||
string text = $"{questInfo.Name} ({value}) [{questInfo.QuestId}]";
|
||||
if (_uiUtils.ChecklistItem(text, color, icon))
|
||||
string text = $"{questInfo.Name} ({genreName}) [{questInfo.QuestId}]";
|
||||
if (_uiUtils.ChecklistItem(text, journalGenre, journalCategory))
|
||||
{
|
||||
_questTooltipComponent.Draw(questInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,8 +205,8 @@ internal sealed class GatheringJournalComponent
|
|||
|
||||
public void DrawGatheringItems()
|
||||
{
|
||||
using ImRaii.IEndObject endObject = ImRaii.TabItem("Gathering Points");
|
||||
if (!endObject)
|
||||
using ImRaii.IEndObject totalEnabled = ImRaii.TabItem("Gathering Points");
|
||||
if (!totalEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -217,9 +217,9 @@ internal sealed class GatheringJournalComponent
|
|||
}
|
||||
if (_filteredExpansions.Count > 0)
|
||||
{
|
||||
using (ImRaii.IEndObject endObject2 = ImRaii.Table("GatheringPoints", 3, ImGuiTableFlags.NoSavedSettings))
|
||||
using (ImRaii.IEndObject totalCount = ImRaii.Table("GatheringPoints", 3, ImGuiTableFlags.NoSavedSettings))
|
||||
{
|
||||
if (!endObject2)
|
||||
if (!totalCount)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -250,9 +250,9 @@ internal sealed class GatheringJournalComponent
|
|||
{
|
||||
return;
|
||||
}
|
||||
foreach (FilteredTerritory territory in expansion.Territories)
|
||||
foreach (FilteredTerritory dutyInfo in expansion.Territories)
|
||||
{
|
||||
DrawTerritory(territory);
|
||||
DrawTerritory(dutyInfo);
|
||||
}
|
||||
ImGui.TreePop();
|
||||
}
|
||||
|
|
@ -317,12 +317,12 @@ internal sealed class GatheringJournalComponent
|
|||
ImGui.TreeNodeEx(_gatheringItems.GetValueOrDefault(item, "???"), ImGuiTreeNodeFlags.NoTreePushOnOpen | ImGuiTreeNodeFlags.Leaf | ImGuiTreeNodeFlags.SpanFullWidth);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TableNextColumn();
|
||||
float num;
|
||||
float clipboardText;
|
||||
using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push())
|
||||
{
|
||||
num = ImGui.GetColumnWidth() / 2f - ImGui.CalcTextSize(FontAwesomeIcon.Check.ToIconString()).X;
|
||||
clipboardText = ImGui.GetColumnWidth() / 2f - ImGui.CalcTextSize(FontAwesomeIcon.Check.ToIconString()).X;
|
||||
}
|
||||
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + num);
|
||||
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + clipboardText);
|
||||
if (item < 10000)
|
||||
{
|
||||
_uiUtils.ChecklistItem(string.Empty, _gatheredItems.Contains(item));
|
||||
|
|
@ -368,13 +368,13 @@ internal sealed class GatheringJournalComponent
|
|||
|
||||
private FilteredExpansion? FilterExpansion(ExpansionPoints expansion, Predicate<string> match)
|
||||
{
|
||||
List<FilteredTerritory> list = (from x in expansion.PointsByTerritories
|
||||
List<FilteredTerritory> totalCount = (from x in expansion.PointsByTerritories
|
||||
select FilterTerritory(x, match) into x
|
||||
where x != null
|
||||
select (x)).ToList();
|
||||
if (list.Count > 0)
|
||||
if (totalCount.Count > 0)
|
||||
{
|
||||
return new FilteredExpansion(expansion, list);
|
||||
return new FilteredExpansion(expansion, totalCount);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -385,13 +385,13 @@ internal sealed class GatheringJournalComponent
|
|||
{
|
||||
return new FilteredTerritory(territory, territory.Points.Select((DefaultGatheringPoint x) => FilterGatheringPoint(x, (string _) => true)).ToList());
|
||||
}
|
||||
List<FilteredGatheringPoint> list = (from x in territory.Points
|
||||
List<FilteredGatheringPoint> totalCount = (from x in territory.Points
|
||||
select FilterGatheringPoint(x, match) into x
|
||||
where x != null
|
||||
select (x)).ToList();
|
||||
if (list.Count > 0)
|
||||
if (totalCount.Count > 0)
|
||||
{
|
||||
return new FilteredTerritory(territory, list);
|
||||
return new FilteredTerritory(territory, totalCount);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -402,10 +402,10 @@ internal sealed class GatheringJournalComponent
|
|||
{
|
||||
return new FilteredGatheringPoint(gatheringPoint, gatheringPoint.GatheringItemIds);
|
||||
}
|
||||
List<ushort> list = gatheringPoint.GatheringItemIds.Where((ushort x) => match(_gatheringItems.GetValueOrDefault(x, string.Empty))).ToList();
|
||||
if (list.Count > 0)
|
||||
List<ushort> totalCount = gatheringPoint.GatheringItemIds.Where((ushort x) => match(_gatheringItems.GetValueOrDefault(x, string.Empty))).ToList();
|
||||
if (totalCount.Count > 0)
|
||||
{
|
||||
return new FilteredGatheringPoint(gatheringPoint, list);
|
||||
return new FilteredGatheringPoint(gatheringPoint, totalCount);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -415,30 +415,30 @@ internal sealed class GatheringJournalComponent
|
|||
_gatheredItems.Clear();
|
||||
foreach (int key in _gatheringItems.Keys)
|
||||
{
|
||||
ushort item = (ushort)key;
|
||||
if (IsGatheringItemGathered(item))
|
||||
ushort totalCount = (ushort)key;
|
||||
if (IsGatheringItemGathered(totalCount))
|
||||
{
|
||||
_gatheredItems.Add(item);
|
||||
_gatheredItems.Add(totalCount);
|
||||
}
|
||||
}
|
||||
foreach (ExpansionPoints item2 in _gatheringPointsByExpansion)
|
||||
foreach (ExpansionPoints otherTotal in _gatheringPointsByExpansion)
|
||||
{
|
||||
foreach (TerritoryPoints pointsByTerritory in item2.PointsByTerritories)
|
||||
foreach (TerritoryPoints battles in otherTotal.PointsByTerritories)
|
||||
{
|
||||
foreach (DefaultGatheringPoint point in pointsByTerritory.Points)
|
||||
foreach (DefaultGatheringPoint total in battles.Points)
|
||||
{
|
||||
point.TotalItems = point.GatheringItemIds.Count((ushort x) => x < 10000);
|
||||
point.CompletedItems = point.GatheringItemIds.Count(_gatheredItems.Contains);
|
||||
point.IsComplete = _gatheringPointRegistry.TryGetGatheringPoint(point.Id, out GatheringRoot _);
|
||||
total.TotalItems = total.GatheringItemIds.Count((ushort x) => x < 10000);
|
||||
total.CompletedItems = total.GatheringItemIds.Count(_gatheredItems.Contains);
|
||||
total.IsComplete = _gatheringPointRegistry.TryGetGatheringPoint(total.Id, out GatheringRoot _);
|
||||
}
|
||||
pointsByTerritory.TotalItems = pointsByTerritory.Points.Sum((DefaultGatheringPoint x) => x.TotalItems);
|
||||
pointsByTerritory.CompletedItems = pointsByTerritory.Points.Sum((DefaultGatheringPoint x) => x.CompletedItems);
|
||||
pointsByTerritory.CompletedPoints = pointsByTerritory.Points.Count((DefaultGatheringPoint x) => x.IsComplete);
|
||||
battles.TotalItems = battles.Points.Sum((DefaultGatheringPoint x) => x.TotalItems);
|
||||
battles.CompletedItems = battles.Points.Sum((DefaultGatheringPoint x) => x.CompletedItems);
|
||||
battles.CompletedPoints = battles.Points.Count((DefaultGatheringPoint x) => x.IsComplete);
|
||||
}
|
||||
item2.TotalItems = item2.PointsByTerritories.Sum((TerritoryPoints x) => x.TotalItems);
|
||||
item2.CompletedItems = item2.PointsByTerritories.Sum((TerritoryPoints x) => x.CompletedItems);
|
||||
item2.TotalPoints = item2.PointsByTerritories.Sum((TerritoryPoints x) => x.TotalPoints);
|
||||
item2.CompletedPoints = item2.PointsByTerritories.Sum((TerritoryPoints x) => x.CompletedPoints);
|
||||
otherTotal.TotalItems = otherTotal.PointsByTerritories.Sum((TerritoryPoints x) => x.TotalItems);
|
||||
otherTotal.CompletedItems = otherTotal.PointsByTerritories.Sum((TerritoryPoints x) => x.CompletedItems);
|
||||
otherTotal.TotalPoints = otherTotal.PointsByTerritories.Sum((TerritoryPoints x) => x.TotalPoints);
|
||||
otherTotal.CompletedPoints = otherTotal.PointsByTerritories.Sum((TerritoryPoints x) => x.CompletedPoints);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -235,19 +235,19 @@ internal sealed class QuestJournalComponent
|
|||
|
||||
private void DrawGenre(FilteredGenre filter)
|
||||
{
|
||||
var (count, num5, total, count2) = _genreCounts.GetValueOrDefault(filter.Genre, new JournalCounts());
|
||||
if (num5 == 0)
|
||||
var (tab, enabled, total, levelToStopAfter) = _genreCounts.GetValueOrDefault(filter.Genre, new JournalCounts());
|
||||
if (enabled == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
bool num6 = ImGui.TreeNodeEx(filter.Genre.Name, ImGuiTreeNodeFlags.SpanFullWidth);
|
||||
bool num2 = ImGui.TreeNodeEx(filter.Genre.Name, ImGuiTreeNodeFlags.SpanFullWidth);
|
||||
ImGui.TableNextColumn();
|
||||
DrawCount(count, num5);
|
||||
DrawCount(tab, enabled);
|
||||
ImGui.TableNextColumn();
|
||||
DrawCount(count2, total);
|
||||
if (!num6)
|
||||
DrawCount(levelToStopAfter, total);
|
||||
if (!num2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,16 +175,16 @@ internal sealed class ActiveQuestComponent
|
|||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed))
|
||||
{
|
||||
ImU8String text = new ImU8String(26, 4);
|
||||
text.AppendLiteral("Simulated Quest: ");
|
||||
text.AppendFormatted(Shorten(currentQuest.Quest.Info.Name));
|
||||
text.AppendLiteral(" (");
|
||||
text.AppendFormatted(currentQuest.Quest.Id);
|
||||
text.AppendLiteral(") / ");
|
||||
text.AppendFormatted(currentQuest.Sequence);
|
||||
text.AppendLiteral(" / ");
|
||||
text.AppendFormatted(currentQuest.Step);
|
||||
ImGui.TextUnformatted(text);
|
||||
ImU8String hover = new ImU8String(26, 4);
|
||||
hover.AppendLiteral("Simulated Quest: ");
|
||||
hover.AppendFormatted(Shorten(currentQuest.Quest.Info.Name));
|
||||
hover.AppendLiteral(" (");
|
||||
hover.AppendFormatted(currentQuest.Quest.Id);
|
||||
hover.AppendLiteral(") / ");
|
||||
hover.AppendFormatted(currentQuest.Sequence);
|
||||
hover.AppendLiteral(" / ");
|
||||
hover.AppendFormatted(currentQuest.Step);
|
||||
ImGui.TextUnformatted(hover);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -192,16 +192,16 @@ internal sealed class ActiveQuestComponent
|
|||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGold))
|
||||
{
|
||||
ImU8String text = new ImU8String(20, 4);
|
||||
text.AppendLiteral("Gathering: ");
|
||||
text.AppendFormatted(Shorten(currentQuest.Quest.Info.Name));
|
||||
text.AppendLiteral(" (");
|
||||
text.AppendFormatted(currentQuest.Quest.Id);
|
||||
text.AppendLiteral(") / ");
|
||||
text.AppendFormatted(currentQuest.Sequence);
|
||||
text.AppendLiteral(" / ");
|
||||
text.AppendFormatted(currentQuest.Step);
|
||||
ImGui.TextUnformatted(text);
|
||||
ImU8String hover = new ImU8String(20, 4);
|
||||
hover.AppendLiteral("Gathering: ");
|
||||
hover.AppendFormatted(Shorten(currentQuest.Quest.Info.Name));
|
||||
hover.AppendLiteral(" (");
|
||||
hover.AppendFormatted(currentQuest.Quest.Id);
|
||||
hover.AppendLiteral(") / ");
|
||||
hover.AppendFormatted(currentQuest.Sequence);
|
||||
hover.AppendLiteral(" / ");
|
||||
hover.AppendFormatted(currentQuest.Step);
|
||||
ImGui.TextUnformatted(hover);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -219,25 +219,25 @@ internal sealed class ActiveQuestComponent
|
|||
ImGui.SetTooltip("This quest is loaded from your 'pluginConfigs\\Questionable\\Quests' directory.\nThis gets loaded even if Questionable ships with a newer/different version of the quest.");
|
||||
}
|
||||
}
|
||||
ImU8String text = new ImU8String(16, 4);
|
||||
text.AppendLiteral("Quest: ");
|
||||
text.AppendFormatted(Shorten(startedQuest.Quest.Info.Name));
|
||||
text.AppendLiteral(" (");
|
||||
text.AppendFormatted(startedQuest.Quest.Id);
|
||||
text.AppendLiteral(") / ");
|
||||
text.AppendFormatted(startedQuest.Sequence);
|
||||
text.AppendLiteral(" / ");
|
||||
text.AppendFormatted(startedQuest.Step);
|
||||
ImGui.TextUnformatted(text);
|
||||
ImU8String hover = new ImU8String(16, 4);
|
||||
hover.AppendLiteral("Quest: ");
|
||||
hover.AppendFormatted(Shorten(startedQuest.Quest.Info.Name));
|
||||
hover.AppendLiteral(" (");
|
||||
hover.AppendFormatted(startedQuest.Quest.Id);
|
||||
hover.AppendLiteral(") / ");
|
||||
hover.AppendFormatted(startedQuest.Sequence);
|
||||
hover.AppendLiteral(" / ");
|
||||
hover.AppendFormatted(startedQuest.Step);
|
||||
ImGui.TextUnformatted(hover);
|
||||
if (startedQuest.Quest.Root.Disabled)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
ImGui.TextColored(ImGuiColors.DalamudRed, "Disabled");
|
||||
}
|
||||
bool flag = _configuration.Stop.Enabled && _configuration.Stop.LevelToStopAfter;
|
||||
bool flag2 = _configuration.Stop.Enabled && _configuration.Stop.QuestsToStopAfter.Any((ElementId x) => !_questFunctions.IsQuestComplete(x) && !_questFunctions.IsQuestUnobtainable(x));
|
||||
bool flag3 = _configuration.Stop.Enabled && _configuration.Stop.SequenceToStopAfter;
|
||||
if (flag || flag2 || flag3)
|
||||
bool instanceId = _configuration.Stop.Enabled && _configuration.Stop.QuestsToStopAfter.Any((ElementId x) => !_questFunctions.IsQuestComplete(x) && !_questFunctions.IsQuestUnobtainable(x));
|
||||
bool color = _configuration.Stop.Enabled && _configuration.Stop.SequenceToStopAfter;
|
||||
if (flag || instanceId || color)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
Vector4 col = ImGuiColors.ParsedPurple;
|
||||
|
|
@ -253,7 +253,7 @@ internal sealed class ActiveQuestComponent
|
|||
col = ImGuiColors.ParsedBlue;
|
||||
}
|
||||
}
|
||||
if (flag3)
|
||||
if (color)
|
||||
{
|
||||
col = ((startedQuest.Sequence < _configuration.Stop.TargetSequence) ? ImGuiColors.ParsedBlue : ImGuiColors.ParsedGreen);
|
||||
}
|
||||
|
|
@ -268,67 +268,67 @@ internal sealed class ActiveQuestComponent
|
|||
if (flag)
|
||||
{
|
||||
int num2 = _clientState.LocalPlayer?.Level ?? 0;
|
||||
text = new ImU8String(14, 1);
|
||||
text.AppendLiteral("Stop at level ");
|
||||
text.AppendFormatted(_configuration.Stop.TargetLevel);
|
||||
ImGui.BulletText(text);
|
||||
hover = new ImU8String(14, 1);
|
||||
hover.AppendLiteral("Stop at level ");
|
||||
hover.AppendFormatted(_configuration.Stop.TargetLevel);
|
||||
ImGui.BulletText(hover);
|
||||
if (num2 > 0)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
if (num2 >= _configuration.Stop.TargetLevel)
|
||||
{
|
||||
Vector4 col2 = ImGuiColors.ParsedGreen;
|
||||
text = new ImU8String(22, 1);
|
||||
text.AppendLiteral("(Current: ");
|
||||
text.AppendFormatted(num2);
|
||||
text.AppendLiteral(" - Reached!)");
|
||||
ImGui.TextColored(in col2, text);
|
||||
Vector4 icon = ImGuiColors.ParsedGreen;
|
||||
hover = new ImU8String(22, 1);
|
||||
hover.AppendLiteral("(Current: ");
|
||||
hover.AppendFormatted(num2);
|
||||
hover.AppendLiteral(" - Reached!)");
|
||||
ImGui.TextColored(in icon, hover);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector4 col2 = ImGuiColors.ParsedBlue;
|
||||
text = new ImU8String(11, 1);
|
||||
text.AppendLiteral("(Current: ");
|
||||
text.AppendFormatted(num2);
|
||||
text.AppendLiteral(")");
|
||||
ImGui.TextColored(in col2, text);
|
||||
Vector4 icon = ImGuiColors.ParsedBlue;
|
||||
hover = new ImU8String(11, 1);
|
||||
hover.AppendLiteral("(Current: ");
|
||||
hover.AppendFormatted(num2);
|
||||
hover.AppendLiteral(")");
|
||||
ImGui.TextColored(in icon, hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (flag3)
|
||||
if (color)
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
ImGui.Spacing();
|
||||
}
|
||||
int sequence = startedQuest.Sequence;
|
||||
text = new ImU8String(23, 1);
|
||||
text.AppendLiteral("Stop at quest sequence ");
|
||||
text.AppendFormatted(_configuration.Stop.TargetSequence);
|
||||
ImGui.BulletText(text);
|
||||
hover = new ImU8String(23, 1);
|
||||
hover.AppendLiteral("Stop at quest sequence ");
|
||||
hover.AppendFormatted(_configuration.Stop.TargetSequence);
|
||||
ImGui.BulletText(hover);
|
||||
ImGui.SameLine();
|
||||
if (sequence >= _configuration.Stop.TargetSequence)
|
||||
{
|
||||
Vector4 col2 = ImGuiColors.ParsedGreen;
|
||||
text = new ImU8String(22, 1);
|
||||
text.AppendLiteral("(Current: ");
|
||||
text.AppendFormatted(sequence);
|
||||
text.AppendLiteral(" - Reached!)");
|
||||
ImGui.TextColored(in col2, text);
|
||||
Vector4 icon = ImGuiColors.ParsedGreen;
|
||||
hover = new ImU8String(22, 1);
|
||||
hover.AppendLiteral("(Current: ");
|
||||
hover.AppendFormatted(sequence);
|
||||
hover.AppendLiteral(" - Reached!)");
|
||||
ImGui.TextColored(in icon, hover);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector4 col2 = ImGuiColors.ParsedBlue;
|
||||
text = new ImU8String(11, 1);
|
||||
text.AppendLiteral("(Current: ");
|
||||
text.AppendFormatted(sequence);
|
||||
text.AppendLiteral(")");
|
||||
ImGui.TextColored(in col2, text);
|
||||
Vector4 icon = ImGuiColors.ParsedBlue;
|
||||
hover = new ImU8String(11, 1);
|
||||
hover.AppendLiteral("(Current: ");
|
||||
hover.AppendFormatted(sequence);
|
||||
hover.AppendLiteral(")");
|
||||
ImGui.TextColored(in icon, hover);
|
||||
}
|
||||
}
|
||||
if (flag2)
|
||||
if (instanceId)
|
||||
{
|
||||
if (flag || flag3)
|
||||
if (flag || color)
|
||||
{
|
||||
ImGui.Spacing();
|
||||
}
|
||||
|
|
@ -338,8 +338,8 @@ internal sealed class ActiveQuestComponent
|
|||
{
|
||||
if (_questRegistry.TryGetQuest(item, out Quest quest))
|
||||
{
|
||||
var (color, icon, _) = _uiUtils.GetQuestStyle(item);
|
||||
_uiUtils.ChecklistItem($"{quest.Info.Name} ({item})", color, icon);
|
||||
var (color2, icon2, _) = _uiUtils.GetQuestStyle(item);
|
||||
_uiUtils.ChecklistItem($"{quest.Info.Name} ({item})", color2, icon2);
|
||||
}
|
||||
}
|
||||
ImGui.Unindent();
|
||||
|
|
@ -370,12 +370,12 @@ internal sealed class ActiveQuestComponent
|
|||
{
|
||||
if (_questRegistry.TryGetQuest(item2, out Quest quest2))
|
||||
{
|
||||
text = new ImU8String(3, 2);
|
||||
text.AppendFormatted(quest2.Info.Name);
|
||||
text.AppendLiteral(" (");
|
||||
text.AppendFormatted(item2);
|
||||
text.AppendLiteral(")");
|
||||
ImGui.BulletText(text);
|
||||
hover = new ImU8String(3, 2);
|
||||
hover.AppendFormatted(quest2.Info.Name);
|
||||
hover.AppendLiteral(" (");
|
||||
hover.AppendFormatted(item2);
|
||||
hover.AppendLiteral(")");
|
||||
ImGui.BulletText(hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -393,13 +393,13 @@ internal sealed class ActiveQuestComponent
|
|||
{
|
||||
if (_questRegistry.TryGetQuest(elementId2, out Quest quest3))
|
||||
{
|
||||
text = new ImU8String(6, 3);
|
||||
text.AppendFormatted(quest3.Info.Name);
|
||||
text.AppendLiteral(" (");
|
||||
text.AppendFormatted(elementId2);
|
||||
text.AppendLiteral(") - ");
|
||||
text.AppendFormatted(value);
|
||||
ImGui.BulletText(text);
|
||||
hover = new ImU8String(6, 3);
|
||||
hover.AppendFormatted(quest3.Info.Name);
|
||||
hover.AppendLiteral(" (");
|
||||
hover.AppendFormatted(elementId2);
|
||||
hover.AppendLiteral(") - ");
|
||||
hover.AppendFormatted(value);
|
||||
ImGui.BulletText(hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -413,41 +413,41 @@ internal sealed class ActiveQuestComponent
|
|||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow))
|
||||
{
|
||||
ImU8String text = new ImU8String(21, 4);
|
||||
text.AppendLiteral("Next Quest: ");
|
||||
text.AppendFormatted(Shorten(nextQuest.Quest.Info.Name));
|
||||
text.AppendLiteral(" (");
|
||||
text.AppendFormatted(nextQuest.Quest.Id);
|
||||
text.AppendLiteral(") / ");
|
||||
text.AppendFormatted(nextQuest.Sequence);
|
||||
text.AppendLiteral(" / ");
|
||||
text.AppendFormatted(nextQuest.Step);
|
||||
ImGui.TextUnformatted(text);
|
||||
ImU8String hover = new ImU8String(21, 4);
|
||||
hover.AppendLiteral("Next Quest: ");
|
||||
hover.AppendFormatted(Shorten(nextQuest.Quest.Info.Name));
|
||||
hover.AppendLiteral(" (");
|
||||
hover.AppendFormatted(nextQuest.Quest.Id);
|
||||
hover.AppendLiteral(") / ");
|
||||
hover.AppendFormatted(nextQuest.Sequence);
|
||||
hover.AppendLiteral(" / ");
|
||||
hover.AppendFormatted(nextQuest.Step);
|
||||
ImGui.TextUnformatted(hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private unsafe QuestProgressInfo? DrawQuestWork(QuestController.QuestProgress currentQuest, bool isMinimized)
|
||||
{
|
||||
QuestProgressInfo questProgressInfo = _questFunctions.GetQuestProgressInfo(currentQuest.Quest.Id);
|
||||
if (questProgressInfo != null)
|
||||
QuestProgressInfo complete = _questFunctions.GetQuestProgressInfo(currentQuest.Quest.Id);
|
||||
if (complete != null)
|
||||
{
|
||||
if (isMinimized)
|
||||
{
|
||||
return questProgressInfo;
|
||||
return complete;
|
||||
}
|
||||
Vector4* styleColorVec = ImGui.GetStyleColorVec4(ImGuiCol.TextDisabled);
|
||||
Vector4 color = ((styleColorVec == null) ? ImGuiColors.ParsedOrange : (*styleColorVec));
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, color))
|
||||
Vector4 hover = ((styleColorVec == null) ? ImGuiColors.ParsedOrange : (*styleColorVec));
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, hover))
|
||||
{
|
||||
ImU8String text = new ImU8String(0, 1);
|
||||
text.AppendFormatted(questProgressInfo);
|
||||
text.AppendFormatted(complete);
|
||||
ImGui.Text(text);
|
||||
if (ImGui.IsItemClicked())
|
||||
{
|
||||
string text2 = MultipleWhitespaceRegex().Replace(questProgressInfo.ToString(), " ");
|
||||
ImGui.SetClipboardText(text2);
|
||||
_chatGui.Print("Copied '" + text2 + "' to clipboard");
|
||||
string questId = MultipleWhitespaceRegex().Replace(complete.ToString(), " ");
|
||||
ImGui.SetClipboardText(questId);
|
||||
_chatGui.Print("Copied '" + questId + "' to clipboard");
|
||||
}
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
|
|
@ -461,7 +461,7 @@ internal sealed class ActiveQuestComponent
|
|||
ImGui.SameLine();
|
||||
text = new ImU8String(2, 1);
|
||||
text.AppendLiteral("/ ");
|
||||
text.AppendFormatted(questProgressInfo.ClassJob);
|
||||
text.AppendFormatted(complete.ClassJob);
|
||||
ImGui.Text(text);
|
||||
}
|
||||
}
|
||||
|
|
@ -480,7 +480,7 @@ internal sealed class ActiveQuestComponent
|
|||
}
|
||||
}
|
||||
}
|
||||
return questProgressInfo;
|
||||
return complete;
|
||||
}
|
||||
|
||||
private void DrawQuestButtons(QuestController.QuestProgress currentQuest, QuestStep? currentStep, QuestProgressInfo? questProgressInfo, bool isMinimized)
|
||||
|
|
|
|||
|
|
@ -75,12 +75,12 @@ internal sealed class CreationUtilsComponent
|
|||
}
|
||||
if (_configuration.Advanced.AdditionalStatusInformation)
|
||||
{
|
||||
QuestReference currentQuest = _questFunctions.GetCurrentQuest();
|
||||
QuestReference time = _questFunctions.GetCurrentQuest();
|
||||
ImU8String text = new ImU8String(18, 2);
|
||||
text.AppendLiteral("Current Quest: ");
|
||||
text.AppendFormatted(currentQuest.CurrentQuest);
|
||||
text.AppendFormatted(time.CurrentQuest);
|
||||
text.AppendLiteral(" → ");
|
||||
text.AppendFormatted(currentQuest.Sequence);
|
||||
text.AppendFormatted(time.Sequence);
|
||||
ImGui.Text(text);
|
||||
}
|
||||
if (_targetManager.Target != null)
|
||||
|
|
@ -94,13 +94,13 @@ internal sealed class CreationUtilsComponent
|
|||
{
|
||||
DrawCopyButton();
|
||||
}
|
||||
ulong hoveredItem = _gameGui.HoveredItem;
|
||||
if (hoveredItem != 0L)
|
||||
ulong startableQuests = _gameGui.HoveredItem;
|
||||
if (startableQuests != 0L)
|
||||
{
|
||||
ImGui.Separator();
|
||||
ImU8String text = new ImU8String(14, 1);
|
||||
text.AppendLiteral("Hovered Item: ");
|
||||
text.AppendFormatted(hoveredItem);
|
||||
text.AppendFormatted(startableQuests);
|
||||
ImGui.Text(text);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ internal sealed class EventInfoComponent
|
|||
public void Draw()
|
||||
{
|
||||
UpdateCacheIfNeeded();
|
||||
foreach (IGrouping<string, IQuestInfo> item in _cachedActiveSeasonalQuests.GroupBy(delegate(IQuestInfo q)
|
||||
foreach (IGrouping<string, IQuestInfo> tooltipText in _cachedActiveSeasonalQuests.GroupBy(delegate(IQuestInfo q)
|
||||
{
|
||||
if (q.QuestId is UnlockLinkId)
|
||||
{
|
||||
|
|
@ -89,11 +89,11 @@ internal sealed class EventInfoComponent
|
|||
return q.JournalGenre.HasValue ? GetJournalGenreName(q.JournalGenre.Value) : q.Name;
|
||||
}))
|
||||
{
|
||||
if (item.All((IQuestInfo q) => _questFunctions.IsQuestComplete(q.QuestId)))
|
||||
if (tooltipText.All((IQuestInfo q) => _questFunctions.IsQuestComplete(q.QuestId)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
DateTime endsAtUtc = item.Select(delegate(IQuestInfo q)
|
||||
DateTime quest = tooltipText.Select(delegate(IQuestInfo q)
|
||||
{
|
||||
DateTime? dateTime = (q as QuestInfo)?.SeasonalQuestExpiry ?? ((q is UnlockLinkQuestInfo unlockLinkQuestInfo) ? unlockLinkQuestInfo.QuestExpiry : ((DateTime?)null));
|
||||
if (dateTime.HasValue)
|
||||
|
|
@ -103,12 +103,12 @@ internal sealed class EventInfoComponent
|
|||
}
|
||||
return DateTime.MaxValue;
|
||||
}).DefaultIfEmpty(DateTime.MaxValue).Min();
|
||||
List<string> list = (from q in item
|
||||
List<string> list = (from q in tooltipText
|
||||
select (q as UnlockLinkQuestInfo)?.Patch into p
|
||||
where !string.IsNullOrEmpty(p)
|
||||
select p).Distinct().ToList();
|
||||
string patch = ((list.Count == 1) ? list[0] : null);
|
||||
EventQuest eventQuest = new EventQuest(item.Key, item.Select((IQuestInfo q) => q.QuestId).ToList(), endsAtUtc, patch);
|
||||
EventQuest eventQuest = new EventQuest(tooltipText.Key, tooltipText.Select((IQuestInfo q) => q.QuestId).ToList(), quest, patch);
|
||||
DrawEventQuest(eventQuest);
|
||||
}
|
||||
}
|
||||
|
|
@ -117,10 +117,10 @@ internal sealed class EventInfoComponent
|
|||
{
|
||||
try
|
||||
{
|
||||
JournalGenre row = _dataManager.GetExcelSheet<JournalGenre>().GetRow(journalGenreId);
|
||||
if (!row.Equals(default(JournalGenre)))
|
||||
JournalGenre actualQuestInfo = _dataManager.GetExcelSheet<JournalGenre>().GetRow(journalGenreId);
|
||||
if (!actualQuestInfo.Equals(default(JournalGenre)))
|
||||
{
|
||||
return row.Name.ExtractText();
|
||||
return actualQuestInfo.Name.ExtractText();
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
|
|
@ -132,10 +132,10 @@ internal sealed class EventInfoComponent
|
|||
|
||||
private void DrawEventQuest(EventQuest eventQuest)
|
||||
{
|
||||
string text = eventQuest.Name;
|
||||
string name = eventQuest.Name;
|
||||
if (!string.IsNullOrEmpty(eventQuest.Patch))
|
||||
{
|
||||
text = text + " [" + eventQuest.Patch + "]";
|
||||
name = name + " [" + eventQuest.Patch + "]";
|
||||
}
|
||||
if (eventQuest.EndsAtUtc != DateTime.MaxValue)
|
||||
{
|
||||
|
|
@ -145,21 +145,21 @@ internal sealed class EventInfoComponent
|
|||
timeSpan = TimeSpan.Zero;
|
||||
}
|
||||
string value = FormatRemainingDays(timeSpan);
|
||||
string text2 = FormatRemainingFull(timeSpan);
|
||||
ImU8String text3 = new ImU8String(3, 2);
|
||||
text3.AppendFormatted(text);
|
||||
text3.AppendLiteral(" (");
|
||||
text3.AppendFormatted(value);
|
||||
text3.AppendLiteral(")");
|
||||
ImGui.Text(text3);
|
||||
string text = FormatRemainingFull(timeSpan);
|
||||
ImU8String text2 = new ImU8String(3, 2);
|
||||
text2.AppendFormatted(name);
|
||||
text2.AppendLiteral(" (");
|
||||
text2.AppendFormatted(value);
|
||||
text2.AppendLiteral(")");
|
||||
ImGui.Text(text2);
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip(text2);
|
||||
ImGui.SetTooltip(text);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui.Text(text);
|
||||
ImGui.Text(name);
|
||||
}
|
||||
List<ElementId> list = eventQuest.QuestIds.Where((ElementId x) => _questRegistry.IsKnownQuest(x) && _questFunctions.IsReadyToAcceptQuest(x) && x != _questController.StartedQuest?.Quest.Id && x != _questController.NextQuest?.Quest.Id).ToList();
|
||||
foreach (ElementId questId in eventQuest.QuestIds)
|
||||
|
|
@ -168,12 +168,12 @@ internal sealed class EventInfoComponent
|
|||
{
|
||||
continue;
|
||||
}
|
||||
ImU8String text3 = new ImU8String(21, 1);
|
||||
text3.AppendLiteral("##EventQuestSelection");
|
||||
text3.AppendFormatted(questId);
|
||||
using (ImRaii.PushId(text3))
|
||||
ImU8String text2 = new ImU8String(21, 1);
|
||||
text2.AppendLiteral("##EventQuestSelection");
|
||||
text2.AppendFormatted(questId);
|
||||
using (ImRaii.PushId(text2))
|
||||
{
|
||||
string name = _questData.GetQuestInfo(questId).Name;
|
||||
string name2 = _questData.GetQuestInfo(questId).Name;
|
||||
if (list.Contains(questId) && _questRegistry.TryGetQuest(questId, out Questionable.Model.Quest quest))
|
||||
{
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
|
||||
|
|
@ -184,7 +184,7 @@ internal sealed class EventInfoComponent
|
|||
bool num = ImGui.IsItemHovered();
|
||||
ImGui.SameLine();
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.Text(name);
|
||||
ImGui.Text(name2);
|
||||
if (num | ImGui.IsItemHovered())
|
||||
{
|
||||
_questTooltipComponent.Draw(quest.Info);
|
||||
|
|
@ -194,7 +194,7 @@ internal sealed class EventInfoComponent
|
|||
{
|
||||
ImGui.SetCursorPosX(ImGui.GetCursorPosX());
|
||||
(Vector4, FontAwesomeIcon, string) questStyle = _uiUtils.GetQuestStyle(questId);
|
||||
if (_uiUtils.ChecklistItem(name, questStyle.Item1, questStyle.Item2, ImGui.GetStyle().FramePadding.X))
|
||||
if (_uiUtils.ChecklistItem(name2, questStyle.Item1, questStyle.Item2, ImGui.GetStyle().FramePadding.X))
|
||||
{
|
||||
_questTooltipComponent.Draw(_questData.GetQuestInfo(questId));
|
||||
}
|
||||
|
|
@ -424,14 +424,14 @@ internal sealed class EventInfoComponent
|
|||
private static string FormatRemainingFull(TimeSpan remaining)
|
||||
{
|
||||
int num = (int)Math.Ceiling(Math.Max(0.0, remaining.TotalSeconds));
|
||||
int num2 = num / 86400;
|
||||
int value = num % 86400 / 3600;
|
||||
int value2 = num % 3600 / 60;
|
||||
int value3 = num % 60;
|
||||
if (num2 < 1)
|
||||
int errorCount = num / 86400;
|
||||
int infoCount = num % 86400 / 3600;
|
||||
int partsToRender = num % 3600 / 60;
|
||||
int id = num % 60;
|
||||
if (errorCount < 1)
|
||||
{
|
||||
return $"Ends in {value:D2}d {value2:D2}m {value3:D2}s";
|
||||
return $"Ends in {infoCount:D2}d {partsToRender:D2}m {id:D2}s";
|
||||
}
|
||||
return $"Ends in {num2}d {value:D2}h {value2:D2}m {value3:D2}s";
|
||||
return $"Ends in {errorCount}d {infoCount:D2}h {partsToRender:D2}m {id:D2}s";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,11 +117,11 @@ internal sealed class PresetBuilderComponent
|
|||
where x.Key.StartsWith("aether_currents_", StringComparison.Ordinal)
|
||||
orderby x.Value.DisplayOrder
|
||||
select x;
|
||||
IOrderedEnumerable<KeyValuePair<string, QuestPreset>> orderedEnumerable2 = from x in _availablePresets
|
||||
IOrderedEnumerable<KeyValuePair<string, QuestPreset>> filteredTerritories = from x in _availablePresets
|
||||
where x.Key.StartsWith("aethernet_", StringComparison.Ordinal)
|
||||
orderby x.Value.DisplayOrder
|
||||
select x;
|
||||
IOrderedEnumerable<KeyValuePair<string, QuestPreset>> orderedEnumerable3 = from x in _availablePresets
|
||||
IOrderedEnumerable<KeyValuePair<string, QuestPreset>> orderedEnumerable2 = from x in _availablePresets
|
||||
where !x.Key.StartsWith("aether_currents_", StringComparison.Ordinal) && !x.Key.StartsWith("aethernet_", StringComparison.Ordinal)
|
||||
orderby x.Value.DisplayOrder
|
||||
select x;
|
||||
|
|
@ -140,11 +140,11 @@ internal sealed class PresetBuilderComponent
|
|||
}
|
||||
}
|
||||
}
|
||||
if (DrawGroupHeader("City Aethernet", "Unlock aethernet shards in major cities to enable city teleports.", orderedEnumerable2))
|
||||
if (DrawGroupHeader("City Aethernet", "Unlock aethernet shards in major cities to enable city teleports.", filteredTerritories))
|
||||
{
|
||||
using (ImRaii.PushIndent())
|
||||
{
|
||||
foreach (KeyValuePair<string, QuestPreset> item2 in orderedEnumerable2)
|
||||
foreach (KeyValuePair<string, QuestPreset> item2 in filteredTerritories)
|
||||
{
|
||||
item2.Deconstruct(out key, out value);
|
||||
string key3 = key;
|
||||
|
|
@ -153,13 +153,13 @@ internal sealed class PresetBuilderComponent
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!orderedEnumerable3.Any() || !DrawGroupHeader("Content Unlocks", "Essential quest series and unlocks that may be required for progression.", orderedEnumerable3))
|
||||
if (!orderedEnumerable2.Any() || !DrawGroupHeader("Content Unlocks", "Essential quest series and unlocks that may be required for progression.", orderedEnumerable2))
|
||||
{
|
||||
return;
|
||||
}
|
||||
using (ImRaii.PushIndent())
|
||||
{
|
||||
foreach (KeyValuePair<string, QuestPreset> item3 in orderedEnumerable3)
|
||||
foreach (KeyValuePair<string, QuestPreset> item3 in orderedEnumerable2)
|
||||
{
|
||||
item3.Deconstruct(out key, out value);
|
||||
string key4 = key;
|
||||
|
|
@ -172,31 +172,31 @@ internal sealed class PresetBuilderComponent
|
|||
private bool DrawGroupHeader(string groupName, string groupDescription, IEnumerable<KeyValuePair<string, QuestPreset>> presets)
|
||||
{
|
||||
int num = 0;
|
||||
int filteredPoints = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
foreach (KeyValuePair<string, QuestPreset> preset2 in presets)
|
||||
{
|
||||
preset2.Deconstruct(out var _, out var value);
|
||||
QuestPreset preset = value;
|
||||
num += GetAvailableQuestsForPreset(preset).Count;
|
||||
num2 += GetCompletedQuestsForPreset(preset).Count;
|
||||
num3 += GetAlreadyPriorityQuestsForPreset(preset).Count;
|
||||
filteredPoints += GetCompletedQuestsForPreset(preset).Count;
|
||||
num2 += GetAlreadyPriorityQuestsForPreset(preset).Count;
|
||||
}
|
||||
string text = groupName;
|
||||
if (num > 0 || num2 > 0 || num3 > 0)
|
||||
if (num > 0 || filteredPoints > 0 || num2 > 0)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
if (num > 0)
|
||||
{
|
||||
list.Add($"{num} available");
|
||||
}
|
||||
if (num3 > 0)
|
||||
{
|
||||
list.Add($"{num3} priority");
|
||||
}
|
||||
if (num2 > 0)
|
||||
{
|
||||
list.Add($"{num2} completed");
|
||||
list.Add($"{num2} priority");
|
||||
}
|
||||
if (filteredPoints > 0)
|
||||
{
|
||||
list.Add($"{filteredPoints} completed");
|
||||
}
|
||||
if (list.Count > 0)
|
||||
{
|
||||
|
|
@ -221,16 +221,16 @@ internal sealed class PresetBuilderComponent
|
|||
{
|
||||
using (ImRaii.PushId(key))
|
||||
{
|
||||
List<ElementId> availableQuestsForPreset = GetAvailableQuestsForPreset(preset);
|
||||
List<ElementId> filteredItems = GetAvailableQuestsForPreset(preset);
|
||||
List<ElementId> completedQuestsForPreset = GetCompletedQuestsForPreset(preset);
|
||||
List<ElementId> alreadyPriorityQuestsForPreset = GetAlreadyPriorityQuestsForPreset(preset);
|
||||
string text = preset.Name;
|
||||
if (availableQuestsForPreset.Count > 0 || completedQuestsForPreset.Count > 0 || alreadyPriorityQuestsForPreset.Count > 0)
|
||||
if (filteredItems.Count > 0 || completedQuestsForPreset.Count > 0 || alreadyPriorityQuestsForPreset.Count > 0)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
if (availableQuestsForPreset.Count > 0)
|
||||
if (filteredItems.Count > 0)
|
||||
{
|
||||
list.Add($"{availableQuestsForPreset.Count} available");
|
||||
list.Add($"{filteredItems.Count} available");
|
||||
}
|
||||
if (alreadyPriorityQuestsForPreset.Count > 0)
|
||||
{
|
||||
|
|
@ -265,7 +265,7 @@ internal sealed class PresetBuilderComponent
|
|||
ImGui.TextWrapped(preset.Description);
|
||||
ImGui.Spacing();
|
||||
bool flag = key.StartsWith("aethernet_", StringComparison.Ordinal);
|
||||
if (flag && availableQuestsForPreset.Count == 0 && completedQuestsForPreset.Count == 0 && alreadyPriorityQuestsForPreset.Count == 0)
|
||||
if (flag && filteredItems.Count == 0 && completedQuestsForPreset.Count == 0 && alreadyPriorityQuestsForPreset.Count == 0)
|
||||
{
|
||||
EAetheryteLocation? mainAetheryteForAethernetPreset = GetMainAetheryteForAethernetPreset(key);
|
||||
if (mainAetheryteForAethernetPreset.HasValue && !_aetheryteFunctions.IsAetheryteUnlocked(mainAetheryteForAethernetPreset.Value))
|
||||
|
|
@ -274,9 +274,9 @@ internal sealed class PresetBuilderComponent
|
|||
ImGui.Spacing();
|
||||
}
|
||||
}
|
||||
if (availableQuestsForPreset.Count > 0)
|
||||
if (filteredItems.Count > 0)
|
||||
{
|
||||
_uiUtils.ChecklistItem($"{availableQuestsForPreset.Count} {((availableQuestsForPreset.Count == 1) ? "quest" : "quests")} available", ImGuiColors.DalamudYellow, FontAwesomeIcon.Running);
|
||||
_uiUtils.ChecklistItem($"{filteredItems.Count} {((filteredItems.Count == 1) ? "quest" : "quests")} available", ImGuiColors.DalamudYellow, FontAwesomeIcon.Running);
|
||||
}
|
||||
if (alreadyPriorityQuestsForPreset.Count > 0)
|
||||
{
|
||||
|
|
@ -286,7 +286,7 @@ internal sealed class PresetBuilderComponent
|
|||
{
|
||||
_uiUtils.ChecklistItem($"{completedQuestsForPreset.Count} {((completedQuestsForPreset.Count == 1) ? "quest" : "quests")} already completed", ImGuiColors.ParsedGreen, FontAwesomeIcon.Check);
|
||||
}
|
||||
if (availableQuestsForPreset.Count == 0 && completedQuestsForPreset.Count == 0 && alreadyPriorityQuestsForPreset.Count == 0)
|
||||
if (filteredItems.Count == 0 && completedQuestsForPreset.Count == 0 && alreadyPriorityQuestsForPreset.Count == 0)
|
||||
{
|
||||
if (!flag)
|
||||
{
|
||||
|
|
@ -303,20 +303,20 @@ internal sealed class PresetBuilderComponent
|
|||
}
|
||||
goto IL_03d8;
|
||||
IL_03d8:
|
||||
if (availableQuestsForPreset.Count > 0)
|
||||
if (filteredItems.Count > 0)
|
||||
{
|
||||
ImGui.Spacing();
|
||||
string text2 = ((availableQuestsForPreset.Count == 1) ? "Add Quest to Priority" : $"Add All {availableQuestsForPreset.Count} Quests to Priority");
|
||||
string text2 = ((filteredItems.Count == 1) ? "Add Quest to Priority" : $"Add All {filteredItems.Count} Quests to Priority");
|
||||
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Plus, text2))
|
||||
{
|
||||
AddPresetToPriority(preset, availableQuestsForPreset);
|
||||
AddPresetToPriority(preset, filteredItems);
|
||||
}
|
||||
}
|
||||
if (availableQuestsForPreset.Count > 0 || completedQuestsForPreset.Count > 0 || alreadyPriorityQuestsForPreset.Count > 0)
|
||||
if (filteredItems.Count > 0 || completedQuestsForPreset.Count > 0 || alreadyPriorityQuestsForPreset.Count > 0)
|
||||
{
|
||||
ImGui.Spacing();
|
||||
ImGui.Separator();
|
||||
foreach (ElementId item in availableQuestsForPreset)
|
||||
foreach (ElementId item in filteredItems)
|
||||
{
|
||||
if (_questData.TryGetQuestInfo(item, out IQuestInfo questInfo))
|
||||
{
|
||||
|
|
@ -394,30 +394,30 @@ internal sealed class PresetBuilderComponent
|
|||
|
||||
private void ClearAllPresetQuests(List<ElementId> questsToRemove)
|
||||
{
|
||||
int num = 0;
|
||||
int tab = 0;
|
||||
foreach (ElementId questId in questsToRemove)
|
||||
{
|
||||
Quest quest = _questController.ManualPriorityQuests.FirstOrDefault((Quest q) => q.Id.Equals(questId));
|
||||
if (quest != null)
|
||||
{
|
||||
_questController.ManualPriorityQuests.Remove(quest);
|
||||
num++;
|
||||
tab++;
|
||||
}
|
||||
}
|
||||
_logger.LogInformation("Removed {Count} preset quests from priority list", num);
|
||||
_logger.LogInformation("Removed {Count} preset quests from priority list", tab);
|
||||
}
|
||||
|
||||
private void AddPresetToPriority(QuestPreset preset, List<ElementId> questIds)
|
||||
{
|
||||
int num = 0;
|
||||
foreach (ElementId questId in questIds)
|
||||
int available = 0;
|
||||
foreach (ElementId obtainable in questIds)
|
||||
{
|
||||
if (_questController.AddQuestPriority(questId))
|
||||
if (_questController.AddQuestPriority(obtainable))
|
||||
{
|
||||
num++;
|
||||
available++;
|
||||
}
|
||||
}
|
||||
_logger.LogInformation("Added {Count} quests from preset '{PresetName}' to priority list", num, preset.Name);
|
||||
_logger.LogInformation("Added {Count} quests from preset '{PresetName}' to priority list", available, preset.Name);
|
||||
}
|
||||
|
||||
private void AddIndividualQuestToPriority(IQuestInfo questInfo, ElementId questId)
|
||||
|
|
@ -614,15 +614,15 @@ internal sealed class PresetBuilderComponent
|
|||
List<ElementId> list15 = new List<ElementId>(num);
|
||||
CollectionsMarshal.SetCount(list15, num);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list15);
|
||||
int index = 0;
|
||||
span[index] = new AethernetId(1);
|
||||
int text = 0;
|
||||
span[text] = new AethernetId(1);
|
||||
return list15;
|
||||
}
|
||||
case "Gridania":
|
||||
{
|
||||
int index = 1;
|
||||
List<ElementId> list14 = new List<ElementId>(index);
|
||||
CollectionsMarshal.SetCount(list14, index);
|
||||
int text = 1;
|
||||
List<ElementId> list14 = new List<ElementId>(text);
|
||||
CollectionsMarshal.SetCount(list14, text);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list14);
|
||||
int num = 0;
|
||||
span[num] = new AethernetId(2);
|
||||
|
|
@ -634,15 +634,15 @@ internal sealed class PresetBuilderComponent
|
|||
List<ElementId> list13 = new List<ElementId>(num);
|
||||
CollectionsMarshal.SetCount(list13, num);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list13);
|
||||
int index = 0;
|
||||
span[index] = new AethernetId(3);
|
||||
int text = 0;
|
||||
span[text] = new AethernetId(3);
|
||||
return list13;
|
||||
}
|
||||
case "GoldSaucer":
|
||||
{
|
||||
int index = 1;
|
||||
List<ElementId> list12 = new List<ElementId>(index);
|
||||
CollectionsMarshal.SetCount(list12, index);
|
||||
int text = 1;
|
||||
List<ElementId> list12 = new List<ElementId>(text);
|
||||
CollectionsMarshal.SetCount(list12, text);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list12);
|
||||
int num = 0;
|
||||
span[num] = new AethernetId(4);
|
||||
|
|
@ -654,15 +654,15 @@ internal sealed class PresetBuilderComponent
|
|||
List<ElementId> list11 = new List<ElementId>(num);
|
||||
CollectionsMarshal.SetCount(list11, num);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list11);
|
||||
int index = 0;
|
||||
span[index] = new AethernetId(5);
|
||||
int text = 0;
|
||||
span[text] = new AethernetId(5);
|
||||
return list11;
|
||||
}
|
||||
case "Idyllshire":
|
||||
{
|
||||
int index = 1;
|
||||
List<ElementId> list10 = new List<ElementId>(index);
|
||||
CollectionsMarshal.SetCount(list10, index);
|
||||
int text = 1;
|
||||
List<ElementId> list10 = new List<ElementId>(text);
|
||||
CollectionsMarshal.SetCount(list10, text);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list10);
|
||||
int num = 0;
|
||||
span[num] = new AethernetId(6);
|
||||
|
|
@ -674,15 +674,15 @@ internal sealed class PresetBuilderComponent
|
|||
List<ElementId> list9 = new List<ElementId>(num);
|
||||
CollectionsMarshal.SetCount(list9, num);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list9);
|
||||
int index = 0;
|
||||
span[index] = new AethernetId(7);
|
||||
int text = 0;
|
||||
span[text] = new AethernetId(7);
|
||||
return list9;
|
||||
}
|
||||
case "Kugane":
|
||||
{
|
||||
int index = 1;
|
||||
List<ElementId> list8 = new List<ElementId>(index);
|
||||
CollectionsMarshal.SetCount(list8, index);
|
||||
int text = 1;
|
||||
List<ElementId> list8 = new List<ElementId>(text);
|
||||
CollectionsMarshal.SetCount(list8, text);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list8);
|
||||
int num = 0;
|
||||
span[num] = new AethernetId(8);
|
||||
|
|
@ -694,15 +694,15 @@ internal sealed class PresetBuilderComponent
|
|||
List<ElementId> list7 = new List<ElementId>(num);
|
||||
CollectionsMarshal.SetCount(list7, num);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list7);
|
||||
int index = 0;
|
||||
span[index] = new AethernetId(9);
|
||||
int text = 0;
|
||||
span[text] = new AethernetId(9);
|
||||
return list7;
|
||||
}
|
||||
case "The Crystarium":
|
||||
{
|
||||
int index = 1;
|
||||
List<ElementId> list6 = new List<ElementId>(index);
|
||||
CollectionsMarshal.SetCount(list6, index);
|
||||
int text = 1;
|
||||
List<ElementId> list6 = new List<ElementId>(text);
|
||||
CollectionsMarshal.SetCount(list6, text);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list6);
|
||||
int num = 0;
|
||||
span[num] = new AethernetId(10);
|
||||
|
|
@ -714,15 +714,15 @@ internal sealed class PresetBuilderComponent
|
|||
List<ElementId> list5 = new List<ElementId>(num);
|
||||
CollectionsMarshal.SetCount(list5, num);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list5);
|
||||
int index = 0;
|
||||
span[index] = new AethernetId(11);
|
||||
int text = 0;
|
||||
span[text] = new AethernetId(11);
|
||||
return list5;
|
||||
}
|
||||
case "Old Sharlayan":
|
||||
{
|
||||
int index = 1;
|
||||
List<ElementId> list4 = new List<ElementId>(index);
|
||||
CollectionsMarshal.SetCount(list4, index);
|
||||
int text = 1;
|
||||
List<ElementId> list4 = new List<ElementId>(text);
|
||||
CollectionsMarshal.SetCount(list4, text);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list4);
|
||||
int num = 0;
|
||||
span[num] = new AethernetId(12);
|
||||
|
|
@ -734,15 +734,15 @@ internal sealed class PresetBuilderComponent
|
|||
List<ElementId> list3 = new List<ElementId>(num);
|
||||
CollectionsMarshal.SetCount(list3, num);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list3);
|
||||
int index = 0;
|
||||
span[index] = new AethernetId(13);
|
||||
int text = 0;
|
||||
span[text] = new AethernetId(13);
|
||||
return list3;
|
||||
}
|
||||
case "Tuliyollal":
|
||||
{
|
||||
int index = 1;
|
||||
List<ElementId> list2 = new List<ElementId>(index);
|
||||
CollectionsMarshal.SetCount(list2, index);
|
||||
int text = 1;
|
||||
List<ElementId> list2 = new List<ElementId>(text);
|
||||
CollectionsMarshal.SetCount(list2, text);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list2);
|
||||
int num = 0;
|
||||
span[num] = new AethernetId(14);
|
||||
|
|
@ -754,8 +754,8 @@ internal sealed class PresetBuilderComponent
|
|||
List<ElementId> list = new List<ElementId>(num);
|
||||
CollectionsMarshal.SetCount(list, num);
|
||||
Span<ElementId> span = CollectionsMarshal.AsSpan(list);
|
||||
int index = 0;
|
||||
span[index] = new AethernetId(15);
|
||||
int text = 0;
|
||||
span[text] = new AethernetId(15);
|
||||
return list;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ internal sealed class QuestTooltipComponent
|
|||
|
||||
public void Draw(IQuestInfo questInfo)
|
||||
{
|
||||
using ImRaii.IEndObject endObject = ImRaii.Tooltip();
|
||||
if (endObject)
|
||||
using ImRaii.IEndObject quest = ImRaii.Tooltip();
|
||||
if (quest)
|
||||
{
|
||||
DrawInner(questInfo, showItemRewards: true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ internal sealed class QuestValidationComponent
|
|||
|
||||
private void DrawValidationTable()
|
||||
{
|
||||
using ImRaii.IEndObject endObject = ImRaii.Table("ValidationIssues", 6, ImGuiTableFlags.Borders | ImGuiTableFlags.Sortable | ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollY);
|
||||
if (!(!endObject))
|
||||
using ImRaii.IEndObject tab = ImRaii.Table("ValidationIssues", 6, ImGuiTableFlags.Borders | ImGuiTableFlags.Sortable | ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollY);
|
||||
if (!(!tab))
|
||||
{
|
||||
ImGui.TableSetupColumn("ID", ImGuiTableColumnFlags.WidthFixed, 60f);
|
||||
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.WidthFixed, 250f);
|
||||
|
|
|
|||
|
|
@ -82,30 +82,30 @@ internal sealed class ValidationDetailsRenderer
|
|||
|
||||
public void DrawDetailWindows()
|
||||
{
|
||||
List<int> list = new List<int>();
|
||||
foreach (KeyValuePair<int, bool> item in _openDetailWindows.ToList())
|
||||
List<int> tab = new List<int>();
|
||||
foreach (KeyValuePair<int, bool> neverFly in _openDetailWindows.ToList())
|
||||
{
|
||||
if (item.Value && _storedIssues.TryGetValue(item.Key, out ValidationIssue value))
|
||||
if (neverFly.Value && _storedIssues.TryGetValue(neverFly.Key, out ValidationIssue additionalStatusInformation))
|
||||
{
|
||||
string obj = $"Validation Details##{item.Key}";
|
||||
string obj = $"Validation Details##{neverFly.Key}";
|
||||
bool open = true;
|
||||
ImGui.SetNextWindowSize(new Vector2(800f, 600f), ImGuiCond.FirstUseEver);
|
||||
ImGui.SetNextWindowSizeConstraints(new Vector2(500f, 300f), new Vector2(1200f, 800f));
|
||||
if (ImGui.Begin(obj, ref open))
|
||||
{
|
||||
DrawIssueDetails(value);
|
||||
DrawIssueDetails(additionalStatusInformation);
|
||||
ImGui.End();
|
||||
}
|
||||
if (!open)
|
||||
{
|
||||
list.Add(item.Key);
|
||||
tab.Add(neverFly.Key);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (int item2 in list)
|
||||
foreach (int combatDataOverlay in tab)
|
||||
{
|
||||
_openDetailWindows.Remove(item2);
|
||||
_storedIssues.Remove(item2);
|
||||
_openDetailWindows.Remove(combatDataOverlay);
|
||||
_storedIssues.Remove(combatDataOverlay);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -184,10 +184,10 @@ internal sealed class ValidationDetailsRenderer
|
|||
|
||||
private static void DrawJsonSyntaxErrorDetails(string description)
|
||||
{
|
||||
string[] array = description.Split('\n');
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
string[] tab = description.Split('\n');
|
||||
for (int runInstancedContentWithAutoDuty = 0; runInstancedContentWithAutoDuty < tab.Length; runInstancedContentWithAutoDuty++)
|
||||
{
|
||||
string text = array[i].Trim();
|
||||
string text = tab[runInstancedContentWithAutoDuty].Trim();
|
||||
if (string.IsNullOrEmpty(text))
|
||||
{
|
||||
ImGui.Spacing();
|
||||
|
|
@ -222,15 +222,15 @@ internal sealed class ValidationDetailsRenderer
|
|||
|
||||
private void DrawDisabledTribesDetails(string description)
|
||||
{
|
||||
string[] array = description.Split(':', 2);
|
||||
if (array.Length < 2)
|
||||
string[] child = description.Split(':', 2);
|
||||
if (child.Length < 2)
|
||||
{
|
||||
ImGui.TextWrapped(description);
|
||||
return;
|
||||
}
|
||||
ImGui.TextWrapped(array[0]);
|
||||
ImGui.TextWrapped(child[0]);
|
||||
ImGui.Spacing();
|
||||
List<string> list = (from x in array[1].Split(',', StringSplitOptions.RemoveEmptyEntries)
|
||||
List<string> list = (from x in child[1].Split(',', StringSplitOptions.RemoveEmptyEntries)
|
||||
select x.Trim() into x
|
||||
where !string.IsNullOrEmpty(x)
|
||||
select x).Distinct().ToList();
|
||||
|
|
@ -241,7 +241,7 @@ internal sealed class ValidationDetailsRenderer
|
|||
}
|
||||
ImGui.Text("Disabled Quests:");
|
||||
ImGui.Indent();
|
||||
Vector4[] array2 = new Vector4[6]
|
||||
Vector4[] array = new Vector4[6]
|
||||
{
|
||||
ImGuiColors.TankBlue,
|
||||
ImGuiColors.HealerGreen,
|
||||
|
|
@ -250,29 +250,29 @@ internal sealed class ValidationDetailsRenderer
|
|||
ImGuiColors.ParsedBlue,
|
||||
ImGuiColors.DalamudViolet
|
||||
};
|
||||
for (int num = 0; num < list.Count; num++)
|
||||
for (int expansion = 0; expansion < list.Count; expansion++)
|
||||
{
|
||||
string value = list[num];
|
||||
Vector4 color = array2[num % array2.Length];
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, color))
|
||||
string enabledCount = list[expansion];
|
||||
Vector4 totalCount = array[expansion % array.Length];
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, totalCount))
|
||||
{
|
||||
if (ElementId.TryFromString(value, out ElementId elementId) && elementId != null)
|
||||
if (ElementId.TryFromString(enabledCount, out ElementId elementId) && elementId != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
IQuestInfo questInfo = _questData.GetQuestInfo(elementId);
|
||||
IQuestInfo table = _questData.GetQuestInfo(elementId);
|
||||
ImU8String text = new ImU8String(5, 2);
|
||||
text.AppendLiteral("\ufffd ");
|
||||
text.AppendFormatted(value);
|
||||
text.AppendFormatted(enabledCount);
|
||||
text.AppendLiteral(" - ");
|
||||
text.AppendFormatted(questInfo.Name);
|
||||
text.AppendFormatted(table.Name);
|
||||
ImGui.TextWrapped(text);
|
||||
}
|
||||
catch
|
||||
{
|
||||
ImU8String text = new ImU8String(18, 1);
|
||||
text.AppendLiteral("\ufffd ");
|
||||
text.AppendFormatted(value);
|
||||
text.AppendFormatted(enabledCount);
|
||||
text.AppendLiteral(" (unknown quest)");
|
||||
ImGui.TextWrapped(text);
|
||||
}
|
||||
|
|
@ -281,7 +281,7 @@ internal sealed class ValidationDetailsRenderer
|
|||
{
|
||||
ImU8String text = new ImU8String(2, 1);
|
||||
text.AppendLiteral("\ufffd ");
|
||||
text.AppendFormatted(value);
|
||||
text.AppendFormatted(enabledCount);
|
||||
ImGui.TextWrapped(text);
|
||||
}
|
||||
}
|
||||
|
|
@ -296,15 +296,15 @@ internal sealed class ValidationDetailsRenderer
|
|||
ImGui.TextWrapped("No validation details available.");
|
||||
return;
|
||||
}
|
||||
List<JsonValidationError> list = ParseJsonValidationErrors(description);
|
||||
if (list.Count > 0)
|
||||
List<JsonValidationError> cfcNames = ParseJsonValidationErrors(description);
|
||||
if (cfcNames.Count > 0)
|
||||
{
|
||||
ImGui.Text("JSON Schema Validation Errors:");
|
||||
ImGui.Spacing();
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
for (int enabledCount = 0; enabledCount < cfcNames.Count; enabledCount++)
|
||||
{
|
||||
DrawJsonValidationError(list[i], i);
|
||||
if (i < list.Count - 1)
|
||||
DrawJsonValidationError(cfcNames[enabledCount], enabledCount);
|
||||
if (enabledCount < cfcNames.Count - 1)
|
||||
{
|
||||
ImGui.Separator();
|
||||
}
|
||||
|
|
@ -390,8 +390,8 @@ internal sealed class ValidationDetailsRenderer
|
|||
|
||||
private static void DrawSimpleJsonSchemaDetails(string description)
|
||||
{
|
||||
string[] array = description.Split('\n');
|
||||
foreach (string text in array)
|
||||
string[] clipboardText = description.Split('\n');
|
||||
foreach (string text in clipboardText)
|
||||
{
|
||||
if (text.StartsWith("JSON Validation failed:", StringComparison.Ordinal))
|
||||
{
|
||||
|
|
@ -402,11 +402,11 @@ internal sealed class ValidationDetailsRenderer
|
|||
}
|
||||
else if (text.StartsWith(" - ", StringComparison.Ordinal))
|
||||
{
|
||||
int num = text.IndexOf(':', 3);
|
||||
if (num > 0)
|
||||
int whitelisted = text.IndexOf(':', 3);
|
||||
if (whitelisted > 0)
|
||||
{
|
||||
string path = text.Substring(3, num - 3).Trim();
|
||||
string text2 = CleanJsonText(text.Substring(num + 1).Trim());
|
||||
string blacklisted = text.Substring(3, whitelisted - 3).Trim();
|
||||
string text2 = CleanJsonText(text.Substring(whitelisted + 1).Trim());
|
||||
if (string.Equals(text2, "validation failed", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
text2 = "Schema validation failed - check property format and values";
|
||||
|
|
@ -415,7 +415,7 @@ internal sealed class ValidationDetailsRenderer
|
|||
ImGui.SameLine();
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedBlue))
|
||||
{
|
||||
ImGui.Text(FormatJsonPath(path));
|
||||
ImGui.Text(FormatJsonPath(blacklisted));
|
||||
}
|
||||
ImGui.SameLine();
|
||||
ImGui.Text(":");
|
||||
|
|
@ -477,12 +477,12 @@ internal sealed class ValidationDetailsRenderer
|
|||
Match match = JsonPropertyPathRegex.Match(path);
|
||||
if (match.Success)
|
||||
{
|
||||
string value = match.Groups[1].Value;
|
||||
if (string.IsNullOrEmpty(value))
|
||||
string mounts = match.Groups[1].Value;
|
||||
if (string.IsNullOrEmpty(mounts))
|
||||
{
|
||||
return "<root>";
|
||||
}
|
||||
return value.Replace('/', '.');
|
||||
return mounts.Replace('/', '.');
|
||||
}
|
||||
if (!(path == "<root>"))
|
||||
{
|
||||
|
|
@ -493,40 +493,40 @@ internal sealed class ValidationDetailsRenderer
|
|||
|
||||
private static List<string> GetValidationSuggestions(JsonValidationError error)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
List<string> tab = new List<string>();
|
||||
foreach (string message in error.Messages)
|
||||
{
|
||||
string text = message.ToUpperInvariant();
|
||||
if (text.Contains("REQUIRED", StringComparison.Ordinal))
|
||||
string grandCompany = message.ToUpperInvariant();
|
||||
if (grandCompany.Contains("REQUIRED", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Add the missing required property to your JSON.");
|
||||
tab.Add("Add the missing required property to your JSON.");
|
||||
}
|
||||
else if (text.Contains("TYPE", StringComparison.Ordinal))
|
||||
else if (grandCompany.Contains("TYPE", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Check that the property value has the correct data type (string, number, boolean, etc.).");
|
||||
tab.Add("Check that the property value has the correct data type (string, number, boolean, etc.).");
|
||||
}
|
||||
else if (text.Contains("ENUM", StringComparison.Ordinal) || text.Contains("ALLOWED VALUES", StringComparison.Ordinal))
|
||||
else if (grandCompany.Contains("ENUM", StringComparison.Ordinal) || grandCompany.Contains("ALLOWED VALUES", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Use one of the allowed enumeration values for this property.");
|
||||
tab.Add("Use one of the allowed enumeration values for this property.");
|
||||
}
|
||||
else if (text.Contains("FORMAT", StringComparison.Ordinal))
|
||||
else if (grandCompany.Contains("FORMAT", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Ensure the property value follows the expected format.");
|
||||
tab.Add("Ensure the property value follows the expected format.");
|
||||
}
|
||||
else if (text.Contains("MINIMUM", StringComparison.Ordinal) || text.Contains("MAXIMUM", StringComparison.Ordinal))
|
||||
else if (grandCompany.Contains("MINIMUM", StringComparison.Ordinal) || grandCompany.Contains("MAXIMUM", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Check that numeric values are within the allowed range.");
|
||||
tab.Add("Check that numeric values are within the allowed range.");
|
||||
}
|
||||
else if (text.Contains("ADDITIONAL", StringComparison.Ordinal) && text.Contains("NOT ALLOWED", StringComparison.Ordinal))
|
||||
else if (grandCompany.Contains("ADDITIONAL", StringComparison.Ordinal) && grandCompany.Contains("NOT ALLOWED", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Remove any extra properties that are not defined in the schema.");
|
||||
tab.Add("Remove any extra properties that are not defined in the schema.");
|
||||
}
|
||||
else if (text.Contains("VALIDATION FAILED", StringComparison.Ordinal))
|
||||
else if (grandCompany.Contains("VALIDATION FAILED", StringComparison.Ordinal))
|
||||
{
|
||||
list.Add("Review the JSON structure and ensure all properties match the expected schema format.");
|
||||
tab.Add("Review the JSON structure and ensure all properties match the expected schema format.");
|
||||
}
|
||||
}
|
||||
return list.Distinct().ToList();
|
||||
return tab.Distinct().ToList();
|
||||
}
|
||||
|
||||
private static void DrawGenericDetails(string description)
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ internal sealed class QuestSelector(QuestRegistry questRegistry)
|
|||
if (ImGui.BeginCombo("##QuestSelection", "Add Quest...", ImGuiComboFlags.HeightLarge))
|
||||
{
|
||||
ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X);
|
||||
bool flag = ImGui.InputTextWithHint("", "Filter...", ref _searchString, 256, ImGuiInputTextFlags.AutoSelectAll | ImGuiInputTextFlags.EnterReturnsTrue);
|
||||
IEnumerable<Quest> enumerable;
|
||||
bool questWork = ImGui.InputTextWithHint("", "Filter...", ref _searchString, 256, ImGuiInputTextFlags.AutoSelectAll | ImGuiInputTextFlags.EnterReturnsTrue);
|
||||
IEnumerable<Quest> color;
|
||||
if (!string.IsNullOrEmpty(_searchString))
|
||||
{
|
||||
enumerable = Enumerable.Where(predicate: (!ElementId.TryFromString(_searchString, out ElementId elementId)) ? new Func<Quest, bool>(DefaultPredicate) : ((Func<Quest, bool>)((Quest x) => DefaultPredicate(x) || x.Id == elementId)), source: questRegistry.AllQuests.Where(delegate(Quest x)
|
||||
color = Enumerable.Where(predicate: (!ElementId.TryFromString(_searchString, out ElementId elementId)) ? new Func<Quest, bool>(DefaultPredicate) : ((Func<Quest, bool>)((Quest x) => DefaultPredicate(x) || x.Id == elementId)), source: questRegistry.AllQuests.Where(delegate(Quest x)
|
||||
{
|
||||
ElementId id = x.Id;
|
||||
return !(id is SatisfactionSupplyNpcId) && !(id is AlliedSocietyDailyId);
|
||||
|
|
@ -40,17 +40,17 @@ internal sealed class QuestSelector(QuestRegistry questRegistry)
|
|||
}
|
||||
else
|
||||
{
|
||||
enumerable = questRegistry.AllQuests.Where((Quest x) => this.DefaultPredicate?.Invoke(x) ?? true);
|
||||
color = questRegistry.AllQuests.Where((Quest x) => this.DefaultPredicate?.Invoke(x) ?? true);
|
||||
}
|
||||
foreach (Quest item in enumerable)
|
||||
foreach (Quest progressText in color)
|
||||
{
|
||||
if ((SuggestionPredicate == null || SuggestionPredicate(item)) && (ImGui.Selectable(item.Info.Name) || flag))
|
||||
if ((SuggestionPredicate == null || SuggestionPredicate(progressText)) && (ImGui.Selectable(progressText.Info.Name) || questWork))
|
||||
{
|
||||
QuestSelected(item);
|
||||
if (flag)
|
||||
QuestSelected(progressText);
|
||||
if (questWork)
|
||||
{
|
||||
ImGui.CloseCurrentPopup();
|
||||
flag = false;
|
||||
questWork = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ internal sealed class DebugOverlay : Window
|
|||
{
|
||||
return;
|
||||
}
|
||||
IClientState clientState = _clientState;
|
||||
if (clientState != null && clientState.IsLoggedIn && clientState.LocalPlayer != null && !clientState.IsPvPExcludingDen && _questController.IsQuestWindowOpen)
|
||||
IClientState clipboardItems = _clientState;
|
||||
if (clipboardItems != null && clipboardItems.IsLoggedIn && clipboardItems.LocalPlayer != null && !clipboardItems.IsPvPExcludingDen && _questController.IsQuestWindowOpen)
|
||||
{
|
||||
DrawCurrentQuest();
|
||||
DrawHighlightedQuest();
|
||||
|
|
@ -88,22 +88,22 @@ internal sealed class DebugOverlay : Window
|
|||
|
||||
private void DrawCurrentQuest()
|
||||
{
|
||||
QuestController.QuestProgress currentQuest = _questController.CurrentQuest;
|
||||
if (currentQuest == null)
|
||||
QuestController.QuestProgress priorityQuests = _questController.CurrentQuest;
|
||||
if (priorityQuests == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
QuestSequence questSequence = currentQuest.Quest.FindSequence(currentQuest.Sequence);
|
||||
if (questSequence == null)
|
||||
QuestSequence itemToRemove = priorityQuests.Quest.FindSequence(priorityQuests.Sequence);
|
||||
if (itemToRemove == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (int i = currentQuest.Step; i <= questSequence.Steps.Count; i++)
|
||||
for (int itemToAdd = priorityQuests.Step; itemToAdd <= itemToRemove.Steps.Count; itemToAdd++)
|
||||
{
|
||||
QuestStep questStep = questSequence.FindStep(i);
|
||||
if (questStep != null && TryGetPosition(questStep, out var position))
|
||||
QuestStep indexToAdd = itemToRemove.FindStep(itemToAdd);
|
||||
if (indexToAdd != null && TryGetPosition(indexToAdd, out var width))
|
||||
{
|
||||
DrawStep(i.ToString(CultureInfo.InvariantCulture), questStep, position.Value, (Vector3.Distance(_clientState.LocalPlayer.Position, position.Value) < questStep.CalculateActualStopDistance()) ? 4278255360u : 4278190335u);
|
||||
DrawStep(itemToAdd.ToString(CultureInfo.InvariantCulture), indexToAdd, width.Value, (Vector3.Distance(_clientState.LocalPlayer.Position, width.Value) < indexToAdd.CalculateActualStopDistance()) ? 4278255360u : 4278190335u);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -129,11 +129,11 @@ internal sealed class DebugOverlay : Window
|
|||
|
||||
private void DrawStep(string counter, QuestStep step, Vector3 position, uint color)
|
||||
{
|
||||
if (!step.Disabled && step.TerritoryId == _clientState.TerritoryType && _gameGui.WorldToScreen(position, out var screenPos))
|
||||
if (!step.Disabled && step.TerritoryId == _clientState.TerritoryType && _gameGui.WorldToScreen(position, out var clipboardItems))
|
||||
{
|
||||
ImGui.GetWindowDrawList().AddCircleFilled(screenPos, 3f, color);
|
||||
ImDrawListPtr windowDrawList = ImGui.GetWindowDrawList();
|
||||
Vector2 pos = screenPos + new Vector2(10f, -8f);
|
||||
ImGui.GetWindowDrawList().AddCircleFilled(clipboardItems, 3f, color);
|
||||
ImDrawListPtr prefixToRemove = ImGui.GetWindowDrawList();
|
||||
Vector2 pos = clipboardItems + new Vector2(10f, -8f);
|
||||
ImU8String text = new ImU8String(7, 5);
|
||||
text.AppendFormatted(counter);
|
||||
text.AppendLiteral(": ");
|
||||
|
|
@ -144,7 +144,7 @@ internal sealed class DebugOverlay : Window
|
|||
text.AppendFormatted((position - _clientState.LocalPlayer.Position).Length(), "N2");
|
||||
text.AppendLiteral("]\n");
|
||||
text.AppendFormatted(step.Comment);
|
||||
windowDrawList.AddText(pos, color, text);
|
||||
prefixToRemove.AddText(pos, color, text);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,20 +44,20 @@ internal sealed class PriorityWindow : LWindow
|
|||
|
||||
public override void DrawContent()
|
||||
{
|
||||
using ImRaii.IEndObject endObject = ImRaii.TabBar("PriorityTabs");
|
||||
if (!endObject)
|
||||
using ImRaii.IEndObject table = ImRaii.TabBar("PriorityTabs");
|
||||
if (!table)
|
||||
{
|
||||
return;
|
||||
}
|
||||
using (ImRaii.IEndObject endObject2 = ImRaii.TabItem("Manual Priority"))
|
||||
using (ImRaii.IEndObject statusIconSize = ImRaii.TabItem("Manual Priority"))
|
||||
{
|
||||
if (endObject2)
|
||||
if (statusIconSize)
|
||||
{
|
||||
_manualPriorityComponent.Draw();
|
||||
}
|
||||
}
|
||||
using ImRaii.IEndObject endObject3 = ImRaii.TabItem("Quest Presets");
|
||||
if (endObject3)
|
||||
using ImRaii.IEndObject actionIconSize = ImRaii.TabItem("Quest Presets");
|
||||
if (actionIconSize)
|
||||
{
|
||||
_presetBuilderComponent.Draw();
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ internal sealed class PriorityWindow : LWindow
|
|||
|
||||
public static List<ElementId> DecodeQuestPriority(string clipboardText)
|
||||
{
|
||||
List<ElementId> list = new List<ElementId>();
|
||||
List<ElementId> fileName = new List<ElementId>();
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(clipboardText))
|
||||
|
|
@ -86,15 +86,15 @@ internal sealed class PriorityWindow : LWindow
|
|||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
ElementId item = ElementId.FromString(array[i]);
|
||||
list.Add(item);
|
||||
fileName.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
list.Clear();
|
||||
fileName.Clear();
|
||||
}
|
||||
return list;
|
||||
return fileName;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,13 +82,13 @@ internal sealed class QuestSelectionWindow : LWindow
|
|||
{
|
||||
if (gameObject != null)
|
||||
{
|
||||
uint baseId = gameObject.BaseId;
|
||||
uint table = gameObject.BaseId;
|
||||
string value = gameObject.Name.ToString();
|
||||
base.WindowName = $"Quests starting with {value} [{baseId}]{"###QuestionableQuestSelection"}";
|
||||
_quests = _questData.GetAllByIssuerDataId(baseId);
|
||||
if (_gameGui.TryGetAddonByName<AddonSelectIconString>("SelectIconString", out var addonPtr))
|
||||
base.WindowName = $"Quests starting with {value} [{table}]{"###QuestionableQuestSelection"}";
|
||||
_quests = _questData.GetAllByIssuerDataId(table);
|
||||
if (_gameGui.TryGetAddonByName<AddonSelectIconString>("SelectIconString", out var validationIssue))
|
||||
{
|
||||
List<string?> answers = InteractionUiController.GetChoices(addonPtr);
|
||||
List<string?> answers = InteractionUiController.GetChoices(validationIssue);
|
||||
_offeredQuests = _quests.Where((IQuestInfo x) => answers.Any((string y) => GameFunctions.GameStringEquals(x.Name, y))).ToList();
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue