Changes properties to use automatic property initializers
This commit is contained in:
parent
f0a48ad431
commit
06fa31a7bf
623 changed files with 13072 additions and 19304 deletions
|
|
@ -61,9 +61,7 @@ namespace Server.Items
|
|||
[AttributeUsage( AttributeTargets.Class )]
|
||||
public class FlippableAttribute : Attribute
|
||||
{
|
||||
private int[] m_ItemIDs;
|
||||
|
||||
public int[] ItemIDs => m_ItemIDs;
|
||||
public int[] ItemIDs { get; }
|
||||
|
||||
public FlippableAttribute()
|
||||
: this( null )
|
||||
|
|
@ -72,12 +70,12 @@ namespace Server.Items
|
|||
|
||||
public FlippableAttribute( params int[] itemIDs )
|
||||
{
|
||||
m_ItemIDs = itemIDs;
|
||||
ItemIDs = itemIDs;
|
||||
}
|
||||
|
||||
public virtual void Flip( Item item )
|
||||
{
|
||||
if ( m_ItemIDs == null )
|
||||
if ( ItemIDs == null )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -93,19 +91,19 @@ namespace Server.Items
|
|||
else
|
||||
{
|
||||
int index = 0;
|
||||
for( int i = 0; i < m_ItemIDs.Length; i++ )
|
||||
for( int i = 0; i < ItemIDs.Length; i++ )
|
||||
{
|
||||
if ( item.ItemID == m_ItemIDs[i] )
|
||||
if ( item.ItemID == ItemIDs[i] )
|
||||
{
|
||||
index = i + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( index > m_ItemIDs.Length - 1 )
|
||||
if ( index > ItemIDs.Length - 1 )
|
||||
index = 0;
|
||||
|
||||
item.ItemID = m_ItemIDs[index];
|
||||
item.ItemID = ItemIDs[index];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue