Fixes chaos damage bug with the spell system. Fixes various small other bugs. Fixes more merge cast type checks and uses default values.
This commit is contained in:
parent
9542c79ea4
commit
c155c82325
115 changed files with 644 additions and 1041 deletions
|
|
@ -39,8 +39,8 @@ namespace Server.Spells.Seventh
|
|||
{
|
||||
SpellHelper.Turn(Caster, p);
|
||||
|
||||
if (p is Item)
|
||||
p = ((Item)p).GetWorldLocation();
|
||||
if (p is Item item)
|
||||
p = item.GetWorldLocation();
|
||||
|
||||
List<Mobile> targets = new List<Mobile>();
|
||||
|
||||
|
|
@ -86,10 +86,9 @@ namespace Server.Spells.Seventh
|
|||
else if (!Core.AOS)
|
||||
damage /= targets.Count;
|
||||
|
||||
double toDeal;
|
||||
for (int i = 0; i < targets.Count; ++i)
|
||||
{
|
||||
toDeal = damage;
|
||||
double toDeal = damage;
|
||||
Mobile m = targets[i];
|
||||
|
||||
if (!Core.AOS && CheckResisted(m))
|
||||
|
|
@ -126,9 +125,7 @@ namespace Server.Spells.Seventh
|
|||
|
||||
protected override void OnTarget(Mobile from, object o)
|
||||
{
|
||||
IPoint3D p = o as IPoint3D;
|
||||
|
||||
if (p != null)
|
||||
if (o is IPoint3D p)
|
||||
m_Owner.Target(p);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue