fix(bugs): some gacha and visual issues
This commit is contained in:
1 parent
116ea108f9
commit
138b5a9484
5 files changed
+57
-2
No files matched your search
@@ -175,6 +175,13 @@ public sealed class TutorialGuideGroupExcel
|
||||
public uint GroupID { get; set; }
|
||||
}
|
||||
|
||||
public sealed class GachaCeilingExcel
|
||||
{
|
||||
public string GachaType { get; set; } = string.Empty;
|
||||
|
||||
public List<uint> CeilingItemList { get; set; } = [];
|
||||
}
|
||||
|
||||
// maps an item id to its main/sub type. the client NPEs on an item it cannot type.
|
||||
public sealed class ItemConfigExcel
|
||||
{
|
||||
|
||||
@@ -114,4 +114,9 @@ public sealed partial class GameData
|
||||
row.TryGetPropertyValue(name, out var node) && node is not null && node.GetValueKind() is JsonValueKind.Number
|
||||
? node.GetValue<uint>()
|
||||
: null;
|
||||
|
||||
private static string? Str(JsonObject row, string name) =>
|
||||
row.TryGetPropertyValue(name, out var node) && node is not null && node.GetValueKind() is JsonValueKind.String
|
||||
? node.GetValue<string>()
|
||||
: null;
|
||||
}
|
||||
@@ -120,6 +120,9 @@ public sealed partial class GameData
|
||||
|
||||
public IReadOnlyList<uint> TutorialGuideIds { get; private set; } = [];
|
||||
|
||||
// the standard banner's guaranteed 5* pool
|
||||
public IReadOnlyList<uint> GachaCeilingAvatars { get; private set; } = [];
|
||||
|
||||
// every relic / lightcone id the client can resolve a type for
|
||||
public IReadOnlySet<uint> KnownRelicIds { get; private set; } = new HashSet<uint>();
|
||||
|
||||
@@ -207,6 +210,9 @@ public sealed partial class GameData
|
||||
data.MainMissions = data.Merge<MainMissionExcel>("MainMission.json", r => UInt(r, "MainMissionID"), required: false);
|
||||
data.TutorialIds = [.. data.Merge<TutorialExcel>("TutorialData.json", r => UInt(r, "TutorialID"), required: false).Keys];
|
||||
data.TutorialGuideIds = [.. data.Merge<TutorialGuideGroupExcel>("TutorialGuideGroup.json", r => UInt(r, "GroupID"), required: false).Keys];
|
||||
data.GachaCeilingAvatars = [.. data
|
||||
.Merge<GachaCeilingExcel>("GachaCeiling.json", r => Str(r, "GachaType") == "Normal" ? 0u : null, required: false)
|
||||
.Values.SelectMany(r => r.CeilingItemList)];
|
||||
data.KnownRelicIds = data.Merge<ItemConfigExcel>("ItemConfigRelic.json", r => UInt(r, "ID"), required: false).Keys.ToHashSet();
|
||||
data.KnownLightconeIds = data.Merge<ItemConfigExcel>("ItemConfigEquipment.json", r => UInt(r, "ID"), required: false).Keys.ToHashSet();
|
||||
|
||||
|
||||
Reference in new issue
Block a user