Fixes casting, default parameters and null propogation in more files.
This commit is contained in:
parent
067dca8393
commit
403e2a8b9d
21 changed files with 328 additions and 523 deletions
|
|
@ -36,7 +36,7 @@ namespace Server
|
|||
{
|
||||
Poison newPoison = ( oldPoison == null ? null : GetPoison( oldPoison.Level + 1 ) );
|
||||
|
||||
return ( newPoison == null ? oldPoison : newPoison );
|
||||
return newPoison ?? oldPoison;
|
||||
}
|
||||
|
||||
// Info
|
||||
|
|
@ -131,12 +131,10 @@ namespace Server
|
|||
m_LastDamage = damage;
|
||||
}
|
||||
|
||||
if ( m_From != null )
|
||||
m_From.DoHarmful( m_Mobile, true );
|
||||
m_From?.DoHarmful( m_Mobile, true );
|
||||
|
||||
IHonorTarget honorTarget = m_Mobile as IHonorTarget;
|
||||
if ( honorTarget != null && honorTarget.ReceivedHonorContext != null )
|
||||
honorTarget.ReceivedHonorContext.OnTargetPoisoned();
|
||||
if ( m_Mobile is IHonorTarget honorTarget )
|
||||
honorTarget.ReceivedHonorContext?.OnTargetPoisoned();
|
||||
|
||||
AOS.Damage( m_Mobile, m_From, damage, 0, 0, 0, 100, 0 );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue