forked from Shardstone/trail-into-darkness
Added resolver
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user