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
|
|
@ -4,15 +4,11 @@ namespace Server.Items
|
|||
{
|
||||
public class SlayerEntry
|
||||
{
|
||||
private SlayerGroup m_Group;
|
||||
private SlayerName m_Name;
|
||||
private Type[] m_Types;
|
||||
public SlayerGroup Group { get; set; }
|
||||
|
||||
public SlayerGroup Group{ get => m_Group;
|
||||
set => m_Group = value;
|
||||
}
|
||||
public SlayerName Name => m_Name;
|
||||
public Type[] Types => m_Types;
|
||||
public SlayerName Name { get; }
|
||||
|
||||
public Type[] Types { get; }
|
||||
|
||||
private static int[] m_AosTitles = {
|
||||
1060479, // undead slayer
|
||||
|
|
@ -80,23 +76,23 @@ namespace Server.Items
|
|||
{
|
||||
int[] titles = ( Core.AOS ? m_AosTitles : m_OldTitles );
|
||||
|
||||
return titles[(int)m_Name - 1];
|
||||
return titles[(int)Name - 1];
|
||||
}
|
||||
}
|
||||
|
||||
public SlayerEntry( SlayerName name, params Type[] types )
|
||||
{
|
||||
m_Name = name;
|
||||
m_Types = types;
|
||||
Name = name;
|
||||
Types = types;
|
||||
}
|
||||
|
||||
public bool Slays( Mobile m )
|
||||
{
|
||||
Type t = m.GetType();
|
||||
|
||||
for ( int i = 0; i < m_Types.Length; ++i )
|
||||
for ( int i = 0; i < Types.Length; ++i )
|
||||
{
|
||||
if ( m_Types[i].IsAssignableFrom( t ) )
|
||||
if ( Types[i].IsAssignableFrom( t ) )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue