Fix some collectability thresholds
This commit is contained in:
@@ -77,20 +77,20 @@ public sealed record RecipeData
|
|||||||
{
|
{
|
||||||
if (item.ItemId.RowId == Recipe.ItemResult.RowId)
|
if (item.ItemId.RowId == Recipe.ItemResult.RowId)
|
||||||
{
|
{
|
||||||
thresholds = [0, item.CollectabilityMid, item.CollectabilityHigh];
|
thresholds = [item.CollectabilityMid, item.CollectabilityHigh];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Recipe.CollectableMetadata.GetValueOrDefault<CollectablesRefine>() is { } row6)
|
else if (Recipe.CollectableMetadata.GetValueOrDefault<CollectablesRefine>() is { } row6)
|
||||||
{
|
thresholds = [row6.CollectabilityLow, row6.CollectabilityMid, row6.CollectabilityHigh];
|
||||||
if (row6.CollectabilityHigh != 0)
|
|
||||||
thresholds = [row6.CollectabilityLow, row6.CollectabilityMid, row6.CollectabilityHigh];
|
|
||||||
else
|
|
||||||
thresholds = [0, row6.CollectabilityLow, row6.CollectabilityMid];
|
|
||||||
}
|
|
||||||
|
|
||||||
CollectableThresholds = thresholds?.Select<int, int?>(t => t == 0 ? null : t).ToArray();
|
if (thresholds != null)
|
||||||
|
{
|
||||||
|
var t = thresholds.Where(t => t != 0).Cast<int?>();
|
||||||
|
t = Enumerable.Concat(Enumerable.Repeat((int?)null, 3 - t.Count()), t);
|
||||||
|
CollectableThresholds = t.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
Ingredients = Recipe.Ingredient.Zip(Recipe.AmountIngredient)
|
Ingredients = Recipe.Ingredient.Zip(Recipe.AmountIngredient)
|
||||||
.Take(6)
|
.Take(6)
|
||||||
|
|||||||
Reference in New Issue
Block a user