Fixes implicit ternary expressions

This commit is contained in:
Kamron Batman 2018-09-14 14:56:48 -07:00
parent c85b0a740c
commit ff26dfa375
345 changed files with 1905 additions and 2336 deletions

View file

@ -60,8 +60,7 @@ namespace Server.Engines.Quests.Collector
int index = (int)image;
if ( index >= 0 && index < m_Table.Length )
return m_Table[index];
else
return m_Table[0];
return m_Table[0];
}
public static ImageType[] RandomList( int count )

View file

@ -75,8 +75,7 @@ namespace Server.Engines.Quests.Collector
int index = Utility.Random( m_Names.Length );
if ( m_Names[index] == null )
return from.Name;
else
return m_Names[index];
return m_Names[index];
}
private const int m_Partial = 2;

View file

@ -217,11 +217,9 @@ namespace Server.Engines.Quests.Collector
{
return true;
}
else
{
bag.Delete();
return false;
}
bag.Delete();
return false;
}
public override void Serialize( GenericWriter writer )

View file

@ -321,14 +321,12 @@ namespace Server.Engines.Quests.Collector
{
return CaptureResponse.AlreadyDone;
}
else
{
m_Done[i] = true;
CheckCompletionStatus();
m_Done[i] = true;
return CaptureResponse.Valid;
}
CheckCompletionStatus();
return CaptureResponse.Valid;
}
}