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
|
|
@ -1,4 +1,3 @@
|
|||
using System.Linq;
|
||||
using Server.Ethics.Evil;
|
||||
using Server.Ethics.Hero;
|
||||
using Server.Items;
|
||||
|
|
@ -156,7 +155,21 @@ namespace Server.Ethics
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!e.Mobile.GetItemsInRange(2).Any(item => item is AnkhNorth || item is AnkhWest))
|
||||
var eable = e.Mobile.GetItemsInRange(2);
|
||||
var found = false;
|
||||
|
||||
foreach (var item in eable)
|
||||
{
|
||||
if (item is AnkhNorth || item is AnkhWest)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
if (!found)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue