Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -1,46 +1,45 @@
|
|||
using System.Collections;
|
||||
|
||||
namespace Server.Engines.Craft
|
||||
{
|
||||
public class CraftGroupCol : System.Collections.CollectionBase
|
||||
{
|
||||
public CraftGroupCol()
|
||||
{
|
||||
}
|
||||
public class CraftGroupCol : CollectionBase
|
||||
{
|
||||
public int Add(CraftGroup craftGroup)
|
||||
{
|
||||
return List.Add(craftGroup);
|
||||
}
|
||||
|
||||
public int Add( CraftGroup craftGroup )
|
||||
{
|
||||
return List.Add( craftGroup );
|
||||
}
|
||||
public void Remove(int index)
|
||||
{
|
||||
if (index > Count - 1 || index < 0)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
List.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
public void Remove( int index )
|
||||
{
|
||||
if ( index > Count - 1 || index < 0 )
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
List.RemoveAt( index );
|
||||
}
|
||||
}
|
||||
public CraftGroup GetAt(int index)
|
||||
{
|
||||
return (CraftGroup)List[index];
|
||||
}
|
||||
|
||||
public CraftGroup GetAt( int index )
|
||||
{
|
||||
return ( CraftGroup ) List[index];
|
||||
}
|
||||
public int SearchFor(TextDefinition groupName)
|
||||
{
|
||||
for (int i = 0; i < List.Count; i++)
|
||||
{
|
||||
CraftGroup craftGroup = (CraftGroup)List[i];
|
||||
|
||||
public int SearchFor( TextDefinition groupName )
|
||||
{
|
||||
for ( int i = 0; i < List.Count; i++ )
|
||||
{
|
||||
CraftGroup craftGroup = (CraftGroup)List[i];
|
||||
int nameNumber = craftGroup.NameNumber;
|
||||
string nameString = craftGroup.NameString;
|
||||
|
||||
int nameNumber = craftGroup.NameNumber;
|
||||
string nameString = craftGroup.NameString;
|
||||
if (nameNumber != 0 && nameNumber == groupName.Number ||
|
||||
nameString != null && nameString == groupName.String)
|
||||
return i;
|
||||
}
|
||||
|
||||
if ( ( nameNumber != 0 && nameNumber == groupName.Number ) || ( nameString != null && nameString == groupName.String ) )
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue