C# 9 Cleanup (#325)

- [X] Removes EventArgs - not needed
- [X] Merges sequential checks
- [X] Removes redundant type declarations
This commit is contained in:
Kamron Batman 2020-11-27 00:29:21 -08:00 committed by GitHub
parent 351611a23a
commit 3551d962f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
417 changed files with 2209 additions and 2213 deletions

View file

@ -5,7 +5,7 @@ namespace Server.Multis
{
public class SmallOldHouse : BaseHouse
{
public static Rectangle2D[] AreaArray = { new Rectangle2D(-3, -3, 7, 7), new Rectangle2D(-1, 4, 3, 1) };
public static Rectangle2D[] AreaArray = { new(-3, -3, 7, 7), new(-1, 4, 3, 1) };
public SmallOldHouse(Mobile owner, int id) : base(id, owner, 425, 3)
{
@ -21,7 +21,7 @@ namespace Server.Multis
}
public override Rectangle2D[] Area => AreaArray;
public override Point3D BaseBanLocation => new Point3D(2, 4, 0);
public override Point3D BaseBanLocation => new(2, 4, 0);
public override int DefaultPrice => 43800;
@ -56,7 +56,7 @@ namespace Server.Multis
public class GuildHouse : BaseHouse
{
public static Rectangle2D[] AreaArray = { new Rectangle2D(-7, -7, 14, 14), new Rectangle2D(-2, 7, 4, 1) };
public static Rectangle2D[] AreaArray = { new(-7, -7, 14, 14), new(-2, 7, 4, 1) };
public GuildHouse(Mobile owner) : base(0x74, owner, 1100, 8)
{
@ -81,7 +81,7 @@ namespace Server.Multis
public override int ConvertOffsetY => -1;
public override Rectangle2D[] Area => AreaArray;
public override Point3D BaseBanLocation => new Point3D(4, 8, 0);
public override Point3D BaseBanLocation => new(4, 8, 0);
public override HouseDeed GetDeed() => new BrickHouseDeed();
@ -101,7 +101,7 @@ namespace Server.Multis
public class TwoStoryHouse : BaseHouse
{
public static Rectangle2D[] AreaArray =
{ new Rectangle2D(-7, 0, 14, 7), new Rectangle2D(-7, -7, 9, 7), new Rectangle2D(-4, 7, 4, 1) };
{ new(-7, 0, 14, 7), new(-7, -7, 9, 7), new(-4, 7, 4, 1) };
public TwoStoryHouse(Mobile owner, int id) : base(id, owner, 1370, 10)
{
@ -120,7 +120,7 @@ namespace Server.Multis
}
public override Rectangle2D[] Area => AreaArray;
public override Point3D BaseBanLocation => new Point3D(2, 8, 0);
public override Point3D BaseBanLocation => new(2, 8, 0);
public override int DefaultPrice => 192400;
@ -151,8 +151,8 @@ namespace Server.Multis
{
public static Rectangle2D[] AreaArray =
{
new Rectangle2D(-7, -7, 16, 14), new Rectangle2D(-1, 7, 4, 2), new Rectangle2D(-11, 0, 4, 7),
new Rectangle2D(9, 0, 4, 7)
new(-7, -7, 16, 14), new(-1, 7, 4, 2), new(-11, 0, 4, 7),
new(9, 0, 4, 7)
};
public Tower(Mobile owner) : base(0x7A, owner, 2119, 15)
@ -178,7 +178,7 @@ namespace Server.Multis
public override int ConvertOffsetY => -1;
public override Rectangle2D[] Area => AreaArray;
public override Point3D BaseBanLocation => new Point3D(5, 8, 0);
public override Point3D BaseBanLocation => new(5, 8, 0);
public override HouseDeed GetDeed() => new TowerDeed();
@ -199,9 +199,9 @@ namespace Server.Multis
{
public static Rectangle2D[] AreaArray =
{
new Rectangle2D(-11, -11, 7, 8), new Rectangle2D(-11, 5, 7, 8), new Rectangle2D(6, -11, 7, 8),
new Rectangle2D(6, 5, 7, 8), new Rectangle2D(-9, -3, 5, 8), new Rectangle2D(6, -3, 5, 8),
new Rectangle2D(-4, -9, 10, 20), new Rectangle2D(-1, 11, 4, 1)
new(-11, -11, 7, 8), new(-11, 5, 7, 8), new(6, -11, 7, 8),
new(6, 5, 7, 8), new(-9, -3, 5, 8), new(6, -3, 5, 8),
new(-4, -9, 10, 20), new(-1, 11, 4, 1)
};
public Keep(Mobile owner) : base(0x7C, owner, 2625, 18)
@ -220,7 +220,7 @@ namespace Server.Multis
public override int DefaultPrice => 665200;
public override Rectangle2D[] Area => AreaArray;
public override Point3D BaseBanLocation => new Point3D(5, 13, 0);
public override Point3D BaseBanLocation => new(5, 13, 0);
public override HouseDeed GetDeed() => new KeepDeed();
@ -239,7 +239,7 @@ namespace Server.Multis
public class Castle : BaseHouse
{
public static Rectangle2D[] AreaArray = { new Rectangle2D(-15, -15, 31, 31), new Rectangle2D(-1, 16, 4, 1) };
public static Rectangle2D[] AreaArray = { new(-15, -15, 31, 31), new(-1, 16, 4, 1) };
public Castle(Mobile owner) : base(0x7E, owner, 4076, 28)
{
@ -261,7 +261,7 @@ namespace Server.Multis
public override int DefaultPrice => 1022800;
public override Rectangle2D[] Area => AreaArray;
public override Point3D BaseBanLocation => new Point3D(5, 17, 0);
public override Point3D BaseBanLocation => new(5, 17, 0);
public override HouseDeed GetDeed() => new CastleDeed();
@ -280,7 +280,7 @@ namespace Server.Multis
public class LargePatioHouse : BaseHouse
{
public static Rectangle2D[] AreaArray = { new Rectangle2D(-7, -7, 15, 14), new Rectangle2D(-5, 7, 4, 1) };
public static Rectangle2D[] AreaArray = { new(-7, -7, 15, 14), new(-5, 7, 4, 1) };
public LargePatioHouse(Mobile owner) : base(0x8C, owner, 1100, 8)
{
@ -305,7 +305,7 @@ namespace Server.Multis
public override int ConvertOffsetY => -1;
public override Rectangle2D[] Area => AreaArray;
public override Point3D BaseBanLocation => new Point3D(1, 8, 0);
public override Point3D BaseBanLocation => new(1, 8, 0);
public override HouseDeed GetDeed() => new LargePatioDeed();
@ -324,7 +324,7 @@ namespace Server.Multis
public class LargeMarbleHouse : BaseHouse
{
public static Rectangle2D[] AreaArray = { new Rectangle2D(-7, -7, 15, 14), new Rectangle2D(-6, 7, 6, 1) };
public static Rectangle2D[] AreaArray = { new(-7, -7, 15, 14), new(-6, 7, 6, 1) };
public LargeMarbleHouse(Mobile owner) : base(0x96, owner, 1370, 10)
{
@ -345,7 +345,7 @@ namespace Server.Multis
public override int ConvertOffsetY => -1;
public override Rectangle2D[] Area => AreaArray;
public override Point3D BaseBanLocation => new Point3D(1, 8, 0);
public override Point3D BaseBanLocation => new(1, 8, 0);
public override HouseDeed GetDeed() => new LargeMarbleDeed();
@ -364,7 +364,7 @@ namespace Server.Multis
public class SmallTower : BaseHouse
{
public static Rectangle2D[] AreaArray = { new Rectangle2D(-3, -3, 8, 7), new Rectangle2D(2, 4, 3, 1) };
public static Rectangle2D[] AreaArray = { new(-3, -3, 8, 7), new(2, 4, 3, 1) };
public SmallTower(Mobile owner) : base(0x98, owner, 580, 4)
{
@ -384,7 +384,7 @@ namespace Server.Multis
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[6];
public override Rectangle2D[] Area => AreaArray;
public override Point3D BaseBanLocation => new Point3D(1, 4, 0);
public override Point3D BaseBanLocation => new(1, 4, 0);
public override HouseDeed GetDeed() => new SmallTowerDeed();
@ -403,7 +403,7 @@ namespace Server.Multis
public class LogCabin : BaseHouse
{
public static Rectangle2D[] AreaArray = { new Rectangle2D(-3, -6, 8, 13) };
public static Rectangle2D[] AreaArray = { new(-3, -6, 8, 13) };
public LogCabin(Mobile owner) : base(0x9A, owner, 1100, 8)
{
@ -425,7 +425,7 @@ namespace Server.Multis
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[12];
public override Rectangle2D[] Area => AreaArray;
public override Point3D BaseBanLocation => new Point3D(5, 8, 0);
public override Point3D BaseBanLocation => new(5, 8, 0);
public override HouseDeed GetDeed() => new LogCabinDeed();
@ -444,7 +444,7 @@ namespace Server.Multis
public class SandStonePatio : BaseHouse
{
public static Rectangle2D[] AreaArray = { new Rectangle2D(-5, -4, 12, 8), new Rectangle2D(-2, 4, 3, 1) };
public static Rectangle2D[] AreaArray = { new(-5, -4, 12, 8), new(-2, 4, 3, 1) };
public SandStonePatio(Mobile owner) : base(0x9C, owner, 850, 6)
{
@ -465,7 +465,7 @@ namespace Server.Multis
public override int ConvertOffsetY => -1;
public override Rectangle2D[] Area => AreaArray;
public override Point3D BaseBanLocation => new Point3D(4, 6, 0);
public override Point3D BaseBanLocation => new(4, 6, 0);
public override HouseDeed GetDeed() => new SandstonePatioDeed();
@ -484,7 +484,7 @@ namespace Server.Multis
public class TwoStoryVilla : BaseHouse
{
public static Rectangle2D[] AreaArray = { new Rectangle2D(-5, -5, 11, 11), new Rectangle2D(2, 6, 4, 1) };
public static Rectangle2D[] AreaArray = { new(-5, -5, 11, 11), new(2, 6, 4, 1) };
public TwoStoryVilla(Mobile owner) : base(0x9E, owner, 1100, 8)
{
@ -507,7 +507,7 @@ namespace Server.Multis
public override HousePlacementEntry ConvertEntry => HousePlacementEntry.TwoStoryFoundations[31];
public override Rectangle2D[] Area => AreaArray;
public override Point3D BaseBanLocation => new Point3D(3, 8, 0);
public override Point3D BaseBanLocation => new(3, 8, 0);
public override HouseDeed GetDeed() => new VillaDeed();
@ -526,8 +526,8 @@ namespace Server.Multis
public class SmallShop : BaseHouse
{
public static Rectangle2D[] AreaArray1 = { new Rectangle2D(-3, -3, 7, 7), new Rectangle2D(-1, 4, 4, 1) };
public static Rectangle2D[] AreaArray2 = { new Rectangle2D(-3, -3, 7, 7), new Rectangle2D(-2, 4, 3, 1) };
public static Rectangle2D[] AreaArray1 = { new(-3, -3, 7, 7), new(-1, 4, 4, 1) };
public static Rectangle2D[] AreaArray2 = { new(-3, -3, 7, 7), new(-2, 4, 3, 1) };
public SmallShop(Mobile owner, int id) : base(id, owner, 425, 3)
{
@ -555,7 +555,7 @@ namespace Server.Multis
}
public override Rectangle2D[] Area => ItemID == 0x40A2 ? AreaArray1 : AreaArray2;
public override Point3D BaseBanLocation => new Point3D(3, 4, 0);
public override Point3D BaseBanLocation => new(3, 4, 0);
public override int DefaultPrice => 63000;