Compare commits
No commits in common. "2726c4873d79f1031ab77c5c7134dcba72af88e1" and "5885c72e0ffc7c4314aec9d387a76f066c08fe60" have entirely different histories.
2726c4873d
...
5885c72e0f
4 changed files with 6 additions and 105 deletions
|
|
@ -463217,8 +463217,7 @@ public static class AssemblyQuestLoader
|
||||||
ref QuestStep reference221 = ref span3[num2];
|
ref QuestStep reference221 = ref span3[num2];
|
||||||
QuestStep obj199 = new QuestStep(EInteractionType.Interact, 1054640u, new Vector3(496.11658f, 142.24991f, 801.6022f), 1187)
|
QuestStep obj199 = new QuestStep(EInteractionType.Interact, 1054640u, new Vector3(496.11658f, 142.24991f, 801.6022f), 1187)
|
||||||
{
|
{
|
||||||
TargetTerritoryId = (ushort)1297,
|
TargetTerritoryId = (ushort)1297
|
||||||
Fly = true
|
|
||||||
};
|
};
|
||||||
SkipConditions skipConditions21 = new SkipConditions();
|
SkipConditions skipConditions21 = new SkipConditions();
|
||||||
SkipStepConditions skipStepConditions20 = new SkipStepConditions();
|
SkipStepConditions skipStepConditions20 = new SkipStepConditions();
|
||||||
|
|
|
||||||
|
|
@ -1131,47 +1131,8 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
||||||
if (_questRegistry.TryGetQuest(elementId, out Quest quest) && !ManualPriorityQuests.Contains(quest))
|
if (_questRegistry.TryGetQuest(elementId, out Quest quest) && !ManualPriorityQuests.Contains(quest))
|
||||||
{
|
{
|
||||||
ManualPriorityQuests.Add(quest);
|
ManualPriorityQuests.Add(quest);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
public int AddAllAvailableQuests()
|
|
||||||
{
|
|
||||||
List<ElementId> list = (from q in _questRegistry.AllQuests.Where(delegate(Quest quest)
|
|
||||||
{
|
|
||||||
if (quest.Root.Disabled || _questFunctions.IsQuestRemoved(quest.Id) || _questFunctions.IsQuestComplete(quest.Id) || _questFunctions.IsQuestAccepted(quest.Id) || quest.Info.IsRepeatable)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (quest.Info.AlliedSociety != EAlliedSociety.None)
|
|
||||||
{
|
|
||||||
_logger.LogDebug("Excluding allied society quest {QuestId} from bulk add", quest.Id);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (quest.Info is QuestInfo { MoogleDeliveryLevel: >0 })
|
|
||||||
{
|
|
||||||
_logger.LogDebug("Excluding moogle delivery quest {QuestId} from bulk add", quest.Id);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!_questFunctions.IsReadyToAcceptQuest(quest.Id))
|
|
||||||
{
|
|
||||||
_logger.LogTrace("Quest {QuestId} not ready to accept", quest.Id);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
})
|
|
||||||
select q.Id).ToList();
|
|
||||||
_logger.LogInformation("Adding {Count} available quests to priority queue", list.Count);
|
|
||||||
int num = 0;
|
|
||||||
foreach (ElementId item in list)
|
|
||||||
{
|
|
||||||
if (AddQuestPriority(item))
|
|
||||||
{
|
|
||||||
num++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return num;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool InsertQuestPriority(int index, ElementId elementId)
|
public bool InsertQuestPriority(int index, ElementId elementId)
|
||||||
|
|
|
||||||
|
|
@ -145,8 +145,6 @@ internal sealed class QuestJournalComponent
|
||||||
}
|
}
|
||||||
QuestJournalUtils.ShowFilterContextMenu(this);
|
QuestJournalUtils.ShowFilterContextMenu(this);
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
_questJournalUtils.AddAllAvailableQuests();
|
|
||||||
ImGui.SameLine();
|
|
||||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.GlobeEurope))
|
if (ImGuiComponents.IconButton(FontAwesomeIcon.GlobeEurope))
|
||||||
{
|
{
|
||||||
Util.OpenLink("https://wigglymuffin.github.io/FFXIV-Tools/");
|
Util.OpenLink("https://wigglymuffin.github.io/FFXIV-Tools/");
|
||||||
|
|
|
||||||
|
|
@ -234,71 +234,14 @@ internal sealed class QuestJournalUtils
|
||||||
|
|
||||||
internal static void ShowFilterContextMenu(QuestJournalComponent journalUi)
|
internal static void ShowFilterContextMenu(QuestJournalComponent journalUi)
|
||||||
{
|
{
|
||||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Filter))
|
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Filter, "Filter"))
|
||||||
{
|
{
|
||||||
ImGui.OpenPopup("QuestFilters");
|
ImGui.OpenPopup("##QuestFilters");
|
||||||
}
|
}
|
||||||
if (ImGui.IsItemHovered())
|
using ImRaii.IEndObject endObject = ImRaii.Popup("##QuestFilters");
|
||||||
{
|
if (!(!endObject) && (ImGui.Checkbox("Show only Available Quests", ref journalUi.Filter.AvailableOnly) || ImGui.Checkbox("Hide Quests Without Path", ref journalUi.Filter.HideNoPaths) || ImGui.Checkbox("Hide Unobtainable Quests", ref journalUi.Filter.HideUnobtainable)))
|
||||||
ImGui.SetTooltip("Filter Options");
|
|
||||||
}
|
|
||||||
using ImRaii.IEndObject endObject = ImRaii.Popup("QuestFilters");
|
|
||||||
if (!ImRaii.IEndObject.op_True(endObject))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ((0u | (ImGui.Checkbox("Available Only", ref journalUi.Filter.AvailableOnly) ? 1u : 0u) | (ImGui.Checkbox("Hide Without Quest Paths", ref journalUi.Filter.HideNoPaths) ? 1u : 0u) | (ImGui.Checkbox("Hide Unobtainable", ref journalUi.Filter.HideUnobtainable) ? 1u : 0u)) != 0)
|
|
||||||
{
|
{
|
||||||
journalUi.UpdateFilter();
|
journalUi.UpdateFilter();
|
||||||
}
|
}
|
||||||
if (journalUi.Filter.AdvancedFiltersActive)
|
|
||||||
{
|
|
||||||
ImGui.Separator();
|
|
||||||
if (ImGui.Button("Clear Filters"))
|
|
||||||
{
|
|
||||||
journalUi.Filter.AvailableOnly = false;
|
|
||||||
journalUi.Filter.HideNoPaths = false;
|
|
||||||
journalUi.Filter.HideUnobtainable = false;
|
|
||||||
journalUi.UpdateFilter();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddAllAvailableQuests()
|
|
||||||
{
|
|
||||||
int num = _questRegistry.AllQuests.Count((Quest quest) => !quest.Root.Disabled && !_questFunctions.IsQuestRemoved(quest.Id) && _questFunctions.IsReadyToAcceptQuest(quest.Id) && !_questFunctions.IsQuestComplete(quest.Id) && !_questFunctions.IsQuestAccepted(quest.Id) && !quest.Info.IsRepeatable && quest.Info.AlliedSociety == EAlliedSociety.None && !(quest.Info is QuestInfo { MoogleDeliveryLevel: >0 }) && !_questController.ManualPriorityQuests.Any((Quest q) => q.Id.Equals(quest.Id)));
|
|
||||||
using (ImRaii.Disabled(num == 0))
|
|
||||||
{
|
|
||||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.ListOl))
|
|
||||||
{
|
|
||||||
int num2 = _questController.AddAllAvailableQuests();
|
|
||||||
string value = ((num2 == 1) ? "quest" : "quests");
|
|
||||||
_chatGui.Print($"Added {num2} {value} to priority queue.", "Questionable", 576);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
|
||||||
{
|
|
||||||
object obj;
|
|
||||||
switch (num)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
ImGui.SetTooltip("No available quests to add");
|
|
||||||
return;
|
|
||||||
default:
|
|
||||||
obj = "quests";
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
obj = "quest";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
string value2 = (string)obj;
|
|
||||||
ImU8String tooltip = new ImU8String(27, 2);
|
|
||||||
tooltip.AppendLiteral("Add ");
|
|
||||||
tooltip.AppendFormatted(num);
|
|
||||||
tooltip.AppendLiteral(" available ");
|
|
||||||
tooltip.AppendFormatted(value2);
|
|
||||||
tooltip.AppendLiteral(" to priority");
|
|
||||||
ImGui.SetTooltip(tooltip);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue