Skip to content

Commit

Permalink
fix exception for creatures with unknown species
Browse files Browse the repository at this point in the history
  • Loading branch information
cadon committed Sep 8, 2024
1 parent 2ca60f8 commit 453c39f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ARKBreedingStats/Form1.library.cs
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ private void CalculateTopStats(List<Creature> creatures, Species onlySpecies = n
var considerTopStats = new Dictionary<Species, bool[]>();
foreach (Creature c in creatures)
{
if (c.Species == null) continue;
if (!considerTopStats.TryGetValue(c.Species, out var consideredTopStats))
{
consideredTopStats = StatsTopStats.GetStatsOptions(c.Species).StatOptions.Select(si => si.ConsiderStat).ToArray();
Expand Down

0 comments on commit 453c39f

Please sign in to comment.