Fixes bad expressions, bad bool checks in loops, a few null pointer exceptions, and optimizes constructors.
This commit is contained in:
parent
8da55d6043
commit
f93c3b992e
62 changed files with 318 additions and 634 deletions
|
|
@ -75,17 +75,15 @@ namespace Server.Spells.Third
|
|||
|
||||
double total = Caster.Skills[SkillName.Magery].Value;
|
||||
|
||||
if (Caster is PlayerMobile)
|
||||
if (Caster is PlayerMobile pm)
|
||||
{
|
||||
PlayerMobile pm = (PlayerMobile)Caster;
|
||||
|
||||
if (pm.DuelContext != null && pm.DuelContext.Started && !pm.DuelContext.Finished &&
|
||||
!pm.DuelContext.Ruleset.GetOption("Skills", "Poisoning"))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
total += Caster.Skills[SkillName.Poisoning].Value;
|
||||
total += pm.Skills[SkillName.Poisoning].Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -133,7 +131,7 @@ namespace Server.Spells.Third
|
|||
|
||||
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