1
0
Fork 0
forked from aly/qstbak

muffin v7.4.11

This commit is contained in:
alydev 2026-02-03 08:57:51 +10:00
parent b8dd142c23
commit e3e5a401c3
5 changed files with 3335 additions and 3063 deletions

File diff suppressed because it is too large Load diff

View file

@ -62,8 +62,6 @@ internal sealed class DutyUnlockData
private readonly ILogger<DutyUnlockData> _logger;
private static readonly HashSet<uint> VariantDungeonCfcIds = new HashSet<uint> { 868u, 945u, 961u };
public DutyUnlockData(IDataManager dataManager, ILogger<DutyUnlockData> logger)
{
_logger = logger;
@ -107,16 +105,20 @@ internal sealed class DutyUnlockData
continue;
}
uint rowId2 = valueNullable.Value.RowId;
if (rowId2 - 6 > 1)
if (rowId2 - 6 <= 1)
{
string text = FixName(item2.Name.ToDalamudString().ToString(), dataManager.Language);
if (!string.IsNullOrWhiteSpace(text) && !IsExcludedContent(text, item2.RowId))
continue;
}
string text = FixName(item2.Name.ToDalamudString().ToString(), dataManager.Language);
if (!string.IsNullOrWhiteSpace(text) && !IsExcludedContent(text, item2.RowId))
{
List<QuestId> value2;
ImmutableList<QuestId> unlockQuests = (dictionary2.TryGetValue(item2.RowId, out value2) ? value2.ToImmutableList() : ImmutableList<QuestId>.Empty);
uint rowId3 = item2.ContentMemberType.RowId;
EDutyCategory? eDutyCategory = DetermineDutyCategory(rowId2, text, item2.HighEndDuty, item2.RowId, (byte)rowId3, item2.ContentLinkType);
if (eDutyCategory.HasValue)
{
List<QuestId> value2;
ImmutableList<QuestId> unlockQuests = (dictionary2.TryGetValue(item2.RowId, out value2) ? value2.ToImmutableList() : ImmutableList<QuestId>.Empty);
uint rowId3 = item2.ContentMemberType.RowId;
EDutyCategory dutyCategory = DetermineDutyCategory(rowId2, text, item2.HighEndDuty, item2.RowId, (byte)rowId3);
DutyInfo value3 = new DutyInfo(item2.RowId, item2.Content.RowId, text, rowId2, valueNullable.Value.Name.ToDalamudString().ToString(), item2.ClassJobLevelRequired, item2.ItemLevelRequired, unlockQuests, item2.HighEndDuty, dutyCategory);
DutyInfo value3 = new DutyInfo(item2.RowId, item2.Content.RowId, text, rowId2, valueNullable.Value.Name.ToDalamudString().ToString(), item2.ClassJobLevelRequired, item2.ItemLevelRequired, unlockQuests, item2.HighEndDuty, eDutyCategory.Value);
dictionary3[item2.RowId] = value3;
}
}
@ -134,11 +136,11 @@ internal sealed class DutyUnlockData
return false;
}
private static EDutyCategory DetermineDutyCategory(uint contentTypeId, string name, bool isHighEndDuty, uint cfcId, byte contentMemberType)
private static EDutyCategory? DetermineDutyCategory(uint contentTypeId, string name, bool isHighEndDuty, uint cfcId, byte contentMemberType, byte contentLinkType)
{
if (VariantDungeonCfcIds.Contains(cfcId))
if (name.EndsWith("(Chaotic)", StringComparison.OrdinalIgnoreCase))
{
return EDutyCategory.VariantDungeon;
return EDutyCategory.ChaoticAllianceRaid;
}
switch (contentTypeId)
{
@ -179,6 +181,10 @@ internal sealed class DutyUnlockData
}
return EDutyCategory.NormalRaid;
case 21u:
if (name.Contains("Quantum", StringComparison.OrdinalIgnoreCase))
{
return EDutyCategory.QuantumBattle;
}
return EDutyCategory.DeepDungeon;
case 26u:
if (isHighEndDuty)
@ -189,17 +195,16 @@ internal sealed class DutyUnlockData
case 28u:
return EDutyCategory.Ultimate;
case 29u:
if (name.EndsWith("(Savage)", StringComparison.OrdinalIgnoreCase) || isHighEndDuty)
{
return EDutyCategory.CriterionSavage;
}
return EDutyCategory.CriterionDungeon;
case 30u:
if (name.EndsWith("(Savage)", StringComparison.OrdinalIgnoreCase) || isHighEndDuty)
if (name.EndsWith("(Savage)", StringComparison.OrdinalIgnoreCase))
{
return EDutyCategory.CriterionSavage;
}
return EDutyCategory.CriterionDungeon;
if (name.StartsWith("Another", StringComparison.OrdinalIgnoreCase))
{
return EDutyCategory.CriterionDungeon;
}
return EDutyCategory.VariantDungeon;
case 31u:
return EDutyCategory.CriterionSavage;
default:
@ -211,7 +216,7 @@ internal sealed class DutyUnlockData
{
return EDutyCategory.ExtremeTrial;
}
return EDutyCategory.Other;
return null;
}
}
@ -319,6 +324,11 @@ internal sealed class DutyUnlockData
return GetDutiesByCategory(EDutyCategory.CriterionSavage);
}
public IEnumerable<DutyInfo> GetQuantumBattles()
{
return GetDutiesByCategory(EDutyCategory.QuantumBattle);
}
public IEnumerable<DutyInfo> GetDutiesUnlockedByQuest(QuestId questId)
{
if (!_questToDuties.TryGetValue(questId, out ImmutableList<uint> value))

View file

@ -18,5 +18,5 @@ public enum EDutyCategory
VariantDungeon,
CriterionDungeon,
CriterionSavage,
Other
QuantumBattle
}