fix(core): Removes some uses of Linq (#421)
- [X] Removes some uses of linq - [X] Creates struct based enumerator for Skills - [X] Creates a struct based enumerator for TypeCache - [X] Changes HarvestDefinition to an init array instead of List - [X] Changes HeritageTokenGump Response from List to Array
This commit is contained in:
parent
52356866ed
commit
b921c38879
50 changed files with 1006 additions and 507 deletions
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Serialization;
|
||||
using Microsoft.Toolkit.HighPerformance.Extensions;
|
||||
|
|
@ -6012,7 +6011,15 @@ namespace Server
|
|||
de.Responsible = list = new List<DamageEntry>();
|
||||
}
|
||||
|
||||
var resp = list.FirstOrDefault(check => check.Damager == master);
|
||||
DamageEntry resp = null;
|
||||
foreach (var check in list)
|
||||
{
|
||||
if (check.Damager == master)
|
||||
{
|
||||
resp = check;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (resp == null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue