Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)

This commit is contained in:
Kamron Batman 2019-03-11 14:29:59 -07:00 • committed by GitHub
parent e748af4430
commit 513e54f70e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1094 changed files with 15913 additions and 21892 deletions

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Network;
using Server.Spells;
using Server.Targeting;
@ -14,12 +15,7 @@ namespace Server.Items
private List<Mobile> m_Users;
[Constructible]
public Firebomb() : this(0x99B)
{
}
[Constructible]
public Firebomb(int itemID) : base(itemID)
public Firebomb(int itemID = 0x99B) : base(itemID)
{
//Name = "a firebomb";
Weight = 2.0;
@ -128,11 +124,8 @@ namespace Server.Items
}
else if (RootParent == null)
{
List<Mobile> toDamage = new List<Mobile>();
IPooledEnumerable<Mobile> eable = Map.GetMobilesInRange(Location, 1);
foreach (Mobile m in eable)
toDamage.Add(m);
List<Mobile> toDamage = eable.ToList();
eable.Free();
@ -290,4 +283,4 @@ namespace Server.Items
}
}
}
}
}