Fixes null propogation
This commit is contained in:
parent
22ab83ea9e
commit
3c9842ee5a
218 changed files with 799 additions and 1458 deletions
|
|
@ -64,8 +64,7 @@ namespace Server.Spells.Sixth
|
|||
m_Defender = defender;
|
||||
m_Target = target;
|
||||
|
||||
if ( m_Spell != null )
|
||||
m_Spell.StartDelayedDamageContext( attacker, this );
|
||||
m_Spell?.StartDelayedDamageContext( attacker, this );
|
||||
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
|
@ -99,8 +98,7 @@ namespace Server.Spells.Sixth
|
|||
|
||||
SpellHelper.Damage( m_Spell, m_Target, damage, 0, 100, 0, 0, 0 );
|
||||
|
||||
if ( m_Spell != null )
|
||||
m_Spell.RemoveDelayedDamageContext( m_Attacker );
|
||||
m_Spell?.RemoveDelayedDamageContext( m_Attacker );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,8 +118,7 @@ namespace Server.Spells.Sixth
|
|||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
m_Timer?.Stop();
|
||||
}
|
||||
|
||||
public InternalItem( Serial serial ) : base( serial )
|
||||
|
|
@ -188,8 +187,7 @@ namespace Server.Spells.Sixth
|
|||
m.PlaySound( 0x204 );
|
||||
m.FixedEffect( 0x376A, 10, 16 );
|
||||
|
||||
if ( m is BaseCreature )
|
||||
((BaseCreature) m).OnHarmfulSpell( m_Caster );
|
||||
(m as BaseCreature)?.OnHarmfulSpell( m_Caster );
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue