Only mark 'Close to Home' as unobtainable once one of them has been picked up or completed

pull/43/head v3.1
Liza 2024-09-10 22:11:52 +02:00
parent 3a7c877a68
commit c49a388d53
Signed by: liza
GPG Key ID: 7199F8D727D55F67
2 changed files with 32 additions and 26 deletions

View File

@ -1,5 +1,5 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Version>3.0</Version> <Version>3.1</Version>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -476,8 +476,6 @@ internal sealed unsafe class QuestFunctions
if (_questData.GetLockedClassQuests().Contains(questId)) if (_questData.GetLockedClassQuests().Contains(questId))
return true; return true;
unsafe
{
var startingCity = PlayerState.Instance()->StartTown; var startingCity = PlayerState.Instance()->StartTown;
if (questInfo.StartingCity > 0 && questInfo.StartingCity != startingCity) if (questInfo.StartingCity > 0 && questInfo.StartingCity != startingCity)
return true; return true;
@ -498,13 +496,21 @@ internal sealed unsafe class QuestFunctions
{ 569, EClassJob.Pugilist }, { 569, EClassJob.Pugilist },
{ 570, EClassJob.Thaumaturge } { 570, EClassJob.Thaumaturge }
}; };
if (closeToHomeQuests.TryGetValue(questId.Value, out EClassJob neededStartingClass))
// The starting class experience is a bit confusing. If you start in Gridania, the MSQ next quest data will
// always select 'Close to Home (Lancer)' even if starting as Conjurer/Archer. However, if we always mark the
// Lancer quest as unobtainable, it'll not get picked up as Conjurer/Archer, and thus will stop questing.
//
// While the NPC offers all 3 quests, there's no manual selection, and interacting will automatically select the
// quest for your current class, then switch you from a dead-ish intro zone to the actual starting city
// (so that you can't come back later to pick up another quest).
if (closeToHomeQuests.TryGetValue(questId.Value, out EClassJob neededStartingClass) &&
closeToHomeQuests.Any(x => IsQuestAcceptedOrComplete(new QuestId(x.Key))))
{ {
EClassJob actualStartingClass = (EClassJob)PlayerState.Instance()->FirstClass; EClassJob actualStartingClass = (EClassJob)PlayerState.Instance()->FirstClass;
if (actualStartingClass != neededStartingClass) if (actualStartingClass != neededStartingClass)
return true; return true;
} }
}
return false; return false;
} }