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
|
|
@ -26,8 +26,7 @@ namespace Server.Misc
|
|||
{
|
||||
case 0x002A: // *i resign from my guild*
|
||||
{
|
||||
if ( from.Guild != null )
|
||||
((Guild)from.Guild).RemoveMember( from );
|
||||
((Guild)@from.Guild)?.RemoveMember( @from );
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -46,9 +45,9 @@ namespace Server.Misc
|
|||
}
|
||||
case 0x0035: // i renounce my young player status*
|
||||
{
|
||||
if ( from is PlayerMobile && ((PlayerMobile)from).Young && !from.HasGump( typeof( RenounceYoungGump ) ) )
|
||||
if ( @from is PlayerMobile mobile && mobile.Young && !mobile.HasGump( typeof( RenounceYoungGump ) ) )
|
||||
{
|
||||
from.SendGump( new RenounceYoungGump() );
|
||||
mobile.SendGump( new RenounceYoungGump() );
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue