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
|
|
@ -76,8 +76,8 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
protected override void OnTarget(Mobile from, object o)
|
||||
{
|
||||
if (o is IPoint3D)
|
||||
m_Owner.Target((IPoint3D)o);
|
||||
if (o is IPoint3D d)
|
||||
m_Owner.Target(d);
|
||||
}
|
||||
|
||||
protected override void OnTargetFinish(Mobile from)
|
||||
|
|
|
|||
|
|
@ -75,8 +75,8 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
protected override void OnTarget(Mobile from, object o)
|
||||
{
|
||||
if (o is Mobile)
|
||||
m_Owner.Target((Mobile)o);
|
||||
if (o is Mobile mobile)
|
||||
m_Owner.Target(mobile);
|
||||
}
|
||||
|
||||
protected override void OnTargetFinish(Mobile from)
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
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>();
|
||||
|
||||
|
|
@ -131,9 +131,7 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
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>();
|
||||
|
||||
|
|
@ -83,11 +83,7 @@ namespace Server.Spells.Mysticism
|
|||
foreach (Mobile m in targets)
|
||||
{
|
||||
Caster.DoHarmful(m);
|
||||
|
||||
int[] types = new int[4];
|
||||
types[Utility.Random(types.Length)] = 100;
|
||||
|
||||
SpellHelper.Damage(this, m, damage, 0, types[0], types[1], types[2], types[3]);
|
||||
SpellHelper.Damage(this, m, damage, 0, 0, 0, 0, 0, 100);
|
||||
|
||||
double resistedReduction = reduction - m.Skills[SkillName.MagicResist].Value / 800.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -63,11 +63,7 @@ namespace Server.Spells.Mysticism
|
|||
VisualEffect(targeted);
|
||||
|
||||
int damage = GetNewAosDamage(33, 1, 5, targeted);
|
||||
|
||||
int[] types = new int[4];
|
||||
types[Utility.Random(types.Length)] = 100;
|
||||
|
||||
SpellHelper.Damage(this, targeted, damage, 0, types[0], types[1], types[2], types[3]);
|
||||
SpellHelper.Damage(this, targeted, damage, 0, 0, 0, 0, 0);
|
||||
|
||||
SpellPlagueContext context = new SpellPlagueContext(this, targeted);
|
||||
|
||||
|
|
@ -176,10 +172,7 @@ namespace Server.Spells.Mysticism
|
|||
m_Explosions++;
|
||||
m_LastExploded = DateTime.Now;
|
||||
|
||||
int[] types = new int[4];
|
||||
types[Utility.Random(types.Length)] = 100;
|
||||
|
||||
SpellHelper.Damage(m_Owner, m_Target, damage, 0, types[0], types[1], types[2], types[3]);
|
||||
SpellHelper.Damage(m_Owner, m_Target, damage, 0, 0, 0, 0, 0, 100);
|
||||
|
||||
if (m_Explosions >= 3)
|
||||
EndPlague();
|
||||
|
|
@ -222,8 +215,8 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
protected override void OnTarget(Mobile from, object o)
|
||||
{
|
||||
if (o is Mobile)
|
||||
m_Owner.Target((Mobile)o);
|
||||
if (o is Mobile mobile)
|
||||
m_Owner.Target(mobile);
|
||||
}
|
||||
|
||||
protected override void OnTargetFinish(Mobile from)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue