Adds testing (#118)

This commit is contained in:
Kamron Batman 2020-04-27 19:27:05 -07:00 committed by GitHub
parent e200f37e75
commit 60ee5eadd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 143 additions and 13 deletions

View file

@ -1130,13 +1130,8 @@ namespace Server
public bool CanSpawnMobile(Point2D p, int z) => CanSpawnMobile(p.m_X, p.m_Y, z);
public bool CanSpawnMobile(int x, int y, int z)
{
if (!Region.Find(new Point3D(x, y, z), this).AllowSpawn())
return false;
return CanFit(x, y, z, 16);
}
public bool CanSpawnMobile(int x, int y, int z) =>
Region.Find(new Point3D(x, y, z), this).AllowSpawn() && CanFit(x, y, z, 16);
public Sector GetSector(Point3D p) => InternalGetSector(p.m_X >> SectorShift, p.m_Y >> SectorShift);

View file

@ -35,7 +35,7 @@ namespace Server
{
get
{
while (World.FindMobile(LastMobile = LastMobile + 1) != null)
while (World.FindMobile(LastMobile += 1) != null)
{
}