More casting fixes
This commit is contained in:
parent
f211efc3bd
commit
20a80ea2f3
40 changed files with 125 additions and 211 deletions
|
|
@ -112,8 +112,7 @@ namespace Server.Mobiles
|
|||
this.PlaySound( 0xEE );
|
||||
defender.LocalOverheadMessage( MessageType.Regular, 0x3B2, false, "You have been stunned by a colossal blow!" );
|
||||
|
||||
BaseWeapon weapon = this.Weapon as BaseWeapon;
|
||||
if ( weapon != null )
|
||||
if ( this.Weapon is BaseWeapon weapon )
|
||||
weapon.OnHit( this, defender );
|
||||
|
||||
if ( defender.Alive )
|
||||
|
|
@ -126,9 +125,7 @@ namespace Server.Mobiles
|
|||
|
||||
private void Recover_Callback( object state )
|
||||
{
|
||||
Mobile defender = state as Mobile;
|
||||
|
||||
if ( defender != null )
|
||||
if ( state is Mobile defender )
|
||||
{
|
||||
defender.Frozen = false;
|
||||
defender.Combatant = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue