forked from Shardstone/trail-into-darkness
updated linq calls to zero allocation zlinq
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using ZLinq;
|
||||
|
||||
namespace Nox.Game {
|
||||
public interface ICharacterFactory {
|
||||
@@ -118,7 +118,7 @@ namespace Nox.Game {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach(var perkId in perkData.perks.Distinct()) {
|
||||
foreach(var perkId in perkData.perks.AsValueEnumerable().Distinct()) {
|
||||
perkFactory.TryAddPerk(character, perkId.Id);
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ namespace Nox.Game {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach(var modifierId in modifiersData.modifiers.Distinct()) {
|
||||
foreach(var modifierId in modifiersData.modifiers.AsValueEnumerable().Distinct()) {
|
||||
modifiersFactory.TryAddModifier(character, modifierId.Id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user