Revert "Updates Packets & Randomizer (#43)" (#61)

This reverts commit 179cb50557.
This commit is contained in:
Kamron Batman 2019-11-11 08:46:11 -08:00 committed by GitHub
parent 179cb50557
commit c2ecc76457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
588 changed files with 16260 additions and 10926 deletions

View file

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Mobiles;
namespace Server.Items
@ -96,7 +95,14 @@ namespace Server.Items
}
}
public int GetItemsCount() => Items.Sum(item => item.Amount);
public int GetItemsCount()
{
int count = 0;
foreach (Item item in Items) count += item.Amount;
return count;
}
public void CheckRespawn()
{
@ -1501,9 +1507,7 @@ namespace Server.Items
Mobile nearest = null;
FillableContent content = null;
IPooledEnumerable eable = map.GetMobilesInRange(loc, 20);
foreach (Mobile mob in eable)
foreach (Mobile mob in map.GetMobilesInRange(loc, 20))
{
if (nearest != null && mob.GetDistanceToSqrt(loc) > nearest.GetDistanceToSqrt(loc) &&
!(nearest is Cobbler && mob is Provisioner))
@ -1516,8 +1520,6 @@ namespace Server.Items
}
}
eable.Free();
return content;
}
}