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:
Kamron Batman 2021-01-18 21:05:11 -08:00 • committed by GitHub
parent 52356866ed
commit b921c38879
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 1006 additions and 507 deletions

View file

@ -1,5 +1,4 @@
using System;
using System.Linq;
using Server.Engines.CannedEvil;
using Server.Engines.PartySystem;
using Server.Factions;
@ -95,12 +94,13 @@ namespace Server.Spells.Necromancy
if (map != null)
{
var targets = r.ChampionSpawn.GetMobilesInRange(Range).Where(IsValidTarget);
foreach (var m in targets)
// Surprisingly, no sparkle type effects
// Surprisingly, no sparkle type effects
foreach (var m in r.ChampionSpawn.GetMobilesInRange(Range))
{
m.Location = GetNearestShrine(m);
if (IsValidTarget(m))
{
m.Location = GetNearestShrine(m);
}
}
}
}