Fixes casting checks

This commit is contained in:
Kamron Batman 2018-08-19 01:38:55 +08:00
parent 7ea00fbf4f
commit 03dd5f1926
431 changed files with 5616 additions and 6250 deletions

View file

@ -30,14 +30,10 @@ namespace Server.Factions
if ( m.AccessLevel >= AccessLevel.Counselor || Contains( oldLocation ) )
return true;
if ( m is PlayerMobile ) {
PlayerMobile pm = (PlayerMobile)m;
if ( pm.DuelContext != null ) {
m.SendMessage( "You may not enter this area while participating in a duel or a tournament." );
return false;
}
if ( m is PlayerMobile pm && pm.DuelContext != null) {
pm.SendMessage( "You may not enter this area while participating in a duel or a tournament." );
return false;
}
return ( Faction.Find( m, true, true ) != null );
@ -48,4 +44,4 @@ namespace Server.Factions
return false;
}
}
}
}