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

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

View file

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

View file

@ -16,8 +16,8 @@ internal sealed class AutomatonIpc : IDisposable
{ {
private static readonly ImmutableHashSet<string> ConflictingTweaks = new HashSet<string> private static readonly ImmutableHashSet<string> ConflictingTweaks = new HashSet<string>
{ {
"DateWithDestiny", "AutoFollow", "AutoPillion", "AutoInvite", "AutoBusy", "AutoEquipXPBoosts", "FateToolKit", "AutoMerge", "AutoQueue", "EnhancedDutyStartEnd", "DateWithDestiny", "AutoFollow", "AutoPillion", "AutoInvite", "AutoBusy", "FateToolKit", "AutoQueue", "EnhancedDutyStartEnd", "EnhancedLoginLogout", "GettingTooAttached",
"EnhancedLoginLogout", "GettingTooAttached", "RetrieveMateria" "RetrieveMateria"
}.ToImmutableHashSet(); }.ToImmutableHashSet();
private const string AutoSnipeTweak = "AutoSnipeQuests"; private const string AutoSnipeTweak = "AutoSnipeQuests";