Added resolver

This commit is contained in:
Sebastian Bularca
2026-03-30 01:17:25 +02:00
parent e7d5acac7c
commit cfac76ed25
9 changed files with 147 additions and 45 deletions

View File

@@ -100,7 +100,8 @@ namespace Nox.Game {
public Stat[] stats;
public int GetValue(StatType statType) {
return stats.First(stat => stat.stat == statType).value;
var match = stats?.FirstOrDefault(stat => stat.stat == statType);
return match?.value ?? 0;
}
}