fix(core): Converts to ref struct enumerators (#426)
- [X] Converts boat moving entities to ref struct enumerator - [X] Converts skills to a ref struct enumerator - [X] Converts type cache to ref struct enumerator
This commit is contained in:
parent
c6ef6ff80a
commit
9ef7752beb
13 changed files with 352 additions and 198 deletions
|
|
@ -394,8 +394,17 @@ namespace Server.Commands
|
|||
{
|
||||
public int Compare(KeyValuePair<Type, int[]> x, KeyValuePair<Type, int[]> y)
|
||||
{
|
||||
var aCount = x.Value.Aggregate(0, (t, val) => t + val);
|
||||
var bCount = y.Value.Aggregate(0, (t, val) => t + val);
|
||||
var aCount = 0;
|
||||
foreach (var val in x.Value)
|
||||
{
|
||||
aCount += val;
|
||||
}
|
||||
|
||||
var bCount = 0;
|
||||
foreach (var val in y.Value)
|
||||
{
|
||||
bCount += val;
|
||||
}
|
||||
|
||||
var v = -aCount.CompareTo(bCount);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue