This reverts commit 179cb50557.
This commit is contained in:
parent
179cb50557
commit
c2ecc76457
588 changed files with 16260 additions and 10926 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue