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,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using Server.Items;
|
||||
|
|
@ -230,7 +229,14 @@ namespace Server.Commands
|
|||
|
||||
// Handle optional constructors
|
||||
var paramList = ctor.GetParameters();
|
||||
var totalParams = paramList.Count(t => !t.HasDefaultValue);
|
||||
var totalParams = 0;
|
||||
for (var j = 0; j < paramList.Length; j++)
|
||||
{
|
||||
if (!paramList[j].HasDefaultValue)
|
||||
{
|
||||
totalParams++;
|
||||
}
|
||||
}
|
||||
|
||||
if (args.Length >= totalParams && args.Length <= paramList.Length)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue