Code cleanup (#195)

This commit is contained in:
Kamron Batman 2020-08-16 21:46:54 -07:00 • committed by GitHub
parent b476bcfd24
commit 0926b5abaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
86 changed files with 740 additions and 1635 deletions

View file

@ -606,12 +606,7 @@ namespace Server.Multis
return;
}
newName = newName.Trim();
if (newName.Length == 0)
newName = null;
Rename(newName);
Rename(newName.Trim().IsNullOrDefault(null));
}
public DryDockResult CheckDryDock(Mobile from)
@ -723,14 +718,7 @@ namespace Server.Multis
}
if (e.Speech.Length > 8)
{
string newName = e.Speech.Substring(8).Trim();
if (newName.Length == 0)
newName = null;
Rename(newName);
}
Rename(e.Speech.Substring(8).Trim().IsNullOrDefault(null));
}
public void Rename(string newName)
@ -1234,8 +1222,8 @@ namespace Server.Multis
int x = item.X - p.X + newComponents.Min.X;
int y = item.Y - p.Y + newComponents.Min.Y;
return (x >= 0 && x < newComponents.Width && y >= 0 && y < newComponents.Height &&
newComponents.Tiles[x][y].Length == 0) || Contains(item);
return x >= 0 && x < newComponents.Width && y >= 0 && y < newComponents.Height &&
newComponents.Tiles[x][y].Length == 0 || Contains(item);
});
eable.Free();