More casting fixes

This commit is contained in:
Kamron Batman 2018-09-11 18:59:11 -07:00
parent f211efc3bd
commit 20a80ea2f3
40 changed files with 125 additions and 211 deletions

View file

@ -172,8 +172,8 @@ namespace Server.Mobiles
if ( mount != null )
{
if ( mount is SwampDragon )
((SwampDragon)mount).HasBarding = false;
if ( mount is SwampDragon dragon )
dragon.HasBarding = false;
mount.Rider = null;
}

View file

@ -111,9 +111,9 @@ namespace Server.Mobiles
foreach ( Mobile m in this.GetMobilesInRange( 8 ) )
{
if ( m is JukaLord && IsFriend( m ) && m.Combatant != null && CanBeBeneficial( m ) && m.CanBeginAction( typeof( JukaMage ) ) && InLOS( m ) )
if ( m is JukaLord lord && IsFriend( lord ) && lord.Combatant != null && CanBeBeneficial( lord ) && lord.CanBeginAction( typeof( JukaMage ) ) && InLOS( lord ) )
{
toBuff = (JukaLord)m;
toBuff = lord;
break;
}
}