Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- bug fix: combat job "auto/highest ilvl" wasn't working with the new automatic class switching thing, because i wasn't aware of it. wired that in. -alydev
- Feature: added functionality for special quest prerequisites, e.g legendary mount quest -alydev
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup Condition="$(MSBuildProjectName) != 'GatheringPathRenderer'">
<Version>15.306.1.27</Version>
<Version>15.306.1.28</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
17 changes: 17 additions & 0 deletions Questionable/Functions/QuestFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Lumina.Excel.Sheets;
using Questionable.Model.Common;
using Questionable.Model.Questing;
using static FFXIVClientStructs.FFXIV.Client.Game.BGMSystem;
using static Questionable.Domain.QuestInfo;
using static Questionable.Utils.CacheUtils;
using GrandCompany = FFXIVClientStructs.FFXIV.Client.UI.Agent.GrandCompany;
Expand Down Expand Up @@ -751,9 +752,25 @@ public bool IsQuestComplete(ElementId elementId)
if (firstLockedAetheryte != null)
lockedReason.Add(_LF("Aetheryte locked: {0}", firstLockedAetheryte ?? EAetheryteLocation.None), value: true);
}

bool prerequisites = questId.Value switch
{
432 => AllMountsUnlocked(new ushort[] { 28, 29, 30, 31, 40, 43 }),
1550 => AllMountsUnlocked(new ushort[] { 75, 76, 77, 78, 90, 98, 104 }),
3200 => AllMountsUnlocked(new ushort[] { 115, 116, 133, 144, 158, 172, 182 }),
4057 => AllMountsUnlocked(new ushort[] { 189, 192, 205, 217, 226, 238, 249 }),
4795 => AllMountsUnlocked(new ushort[] { 261, 262, 293, 306, 315, 325, 332 }),
5469 => AllMountsUnlocked(new ushort[] { 345, 346, 363, 389, 407, 422, 444 }),
_ => false
};

if (!prerequisites)
lockedReason.Add(_LF("Prerequisites not met"), value: true);
return (lockedReason.Values.Any(x => x), lockedReason.Keys.ToArray());
}

private unsafe bool AllMountsUnlocked(ushort[] mounts) => mounts.All(x => PlayerState.Instance()->IsMountUnlocked(x));

private bool IsQuestLocked(SatisfactionSupplyNpcId satisfactionSupplyNpcId)
{
SatisfactionSupplyInfo questInfo = (SatisfactionSupplyInfo)questData.GetQuestInfo(satisfactionSupplyNpcId);
Expand Down
Loading