Removes redundant returns

This commit is contained in:
Kamron Batman 2018-09-14 15:40:02 -07:00
parent 06fa31a7bf
commit eeabc3d0e8
16 changed files with 77 additions and 106 deletions

View file

@ -33,7 +33,6 @@ namespace Server
op.WriteLine( "{0}\tPast IP limit threshold\t{1}", ip, DateTime.UtcNow );
e.AllowConnection = false;
return;
}
}
catch

View file

@ -41,10 +41,7 @@ namespace Server.Commands
{
BatchCommand bc = (BatchCommand)BatchCommands[i];
string commandString, argString;
string[] args;
bc.GetDetails( out commandString, out argString, out args );
bc.GetDetails( out string commandString, out string argString, out string[] args );
BaseCommand command = Scope.Commands[commandString];
@ -174,9 +171,7 @@ namespace Server.Commands
[Description( "Allows multiple commands to be run at the same time." )]
public static void Batch_OnCommand( CommandEventArgs e )
{
Batch batch = new Batch();
e.Mobile.SendGump( new BatchGump( e.Mobile, batch ) );
e.Mobile.SendGump( new BatchGump( e.Mobile, new Batch() ) );
}
}
@ -305,9 +300,7 @@ namespace Server.Commands
public override void OnResponse( NetState sender, RelayInfo info )
{
int type, index;
if ( !SplitButtonID( info.ButtonID, 1, out type, out index ) )
if ( !SplitButtonID( info.ButtonID, 1, out int type, out int index ) )
return;
TextRelay entry = info.GetTextEntry( 0 );
@ -405,9 +398,7 @@ namespace Server.Commands
public override void OnResponse( NetState sender, RelayInfo info )
{
int type, index;
if ( SplitButtonID( info.ButtonID, 1, out type, out index ) )
if ( SplitButtonID( info.ButtonID, 1, out int type, out int index ) )
{
switch ( type )
{

View file

@ -151,7 +151,6 @@ namespace Server.Engines.Quests.Samurai
player.AddToBackpack( armor );
obj.Complete();
return;
}
}
}

View file

@ -49,7 +49,6 @@ namespace Server.Items
{
Stop();
stew.Visible = true;
return;
}
}
}

View file

@ -335,7 +335,6 @@ namespace Server
public void OnSourceKilled()
{
return;
}
public void OnTargetKilled()

View file

@ -166,7 +166,6 @@ namespace Server.Guilds
{
guild.Charter = charter;
from.SendLocalizedMessage( 1070775 ); // You submit a new guild charter.
return;
}
}
@ -183,7 +182,6 @@ namespace Server.Guilds
{
guild.Website = site;
from.SendLocalizedMessage( 1070778 ); // You submit a new guild website.
return;
}
}
}

View file

@ -25,7 +25,6 @@ honor points on yourself?", true, false);
}
else
{
return;
}
}
}

View file

@ -325,7 +325,6 @@ namespace Server.Items
else if ( m_Map.m_Decoder != from && !m_Map.HasRequiredSkill( from ) )
{
from.SendLocalizedMessage( 503031 ); // You did not decode this map and have no clue where to look for the treasure.
return;
}
else if ( !from.CanBeginAction( typeof( TreasureMap ) ) )
{

View file

@ -1099,7 +1099,6 @@ namespace Server.Items
else
{
from.SendLocalizedMessage( 500446 ); // That is too far away.
return;
}
}

View file

@ -90,7 +90,6 @@ namespace Server.Items
public override void OnChop( Mobile from )
{
from.SendLocalizedMessage( 500489 ); // You can't use an axe on that.
return;
}
public override void GetProperties( ObjectPropertyList list )

View file

@ -2659,7 +2659,6 @@ namespace Server.Mobiles
if (loc != Point3D.Zero)
{
m_Mobile.MoveToWorld(loc, se.Region.Map);
return;
}
}
}

View file

@ -130,7 +130,6 @@ namespace Server.Mobiles
SendLocalizedMessage(1112456);
break; // You cannot fly while recovering from a dismount maneuver.
}
return;
}
else if (Hits < 25) // TODO confirm
{

View file

@ -3519,7 +3519,6 @@ namespace Server.Multis
}
else if ( targeted is StaticTarget )
{
return;
}
else
{