Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)
This commit is contained in:
parent
e748af4430
commit
513e54f70e
1094 changed files with 15913 additions and 21892 deletions
|
|
@ -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
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue