Changes properties to use automatic property initializers

This commit is contained in:
Kamron Batman 2018-09-14 15:23:29 -07:00
parent f0a48ad431
commit 06fa31a7bf
623 changed files with 13072 additions and 19304 deletions

View file

@ -28,66 +28,35 @@ namespace Server.ContextMenus
/// </summary>
public class ContextMenuEntry
{
private int m_Number;
private int m_Color;
private bool m_Enabled;
private int m_Range;
private CMEFlags m_Flags;
private ContextMenu m_Owner;
/// <summary>
/// Gets or sets additional <see cref="CMEFlags">flags</see> used in client communication.
/// </summary>
public CMEFlags Flags
{
get => m_Flags;
set => m_Flags = value;
}
public CMEFlags Flags { get; set; }
/// <summary>
/// Gets or sets the <see cref="ContextMenu" /> that owns this entry.
/// </summary>
public ContextMenu Owner
{
get => m_Owner;
set => m_Owner = value;
}
public ContextMenu Owner { get; set; }
/// <summary>
/// Gets or sets the localization number containing the name of this entry.
/// </summary>
public int Number
{
get => m_Number;
set => m_Number = value;
}
public int Number { get; set; }
/// <summary>
/// Gets or sets the maximum range at which this entry may be used, in tiles. A value of -1 signifies no maximum range.
/// </summary>
public int Range
{
get => m_Range;
set => m_Range = value;
}
public int Range { get; set; }
/// <summary>
/// Gets or sets the color for this entry. Format is A1-R5-G5-B5.
/// </summary>
public int Color
{
get => m_Color;
set => m_Color = value;
}
public int Color { get; set; }
/// <summary>
/// Gets or sets whether this entry is enabled. When false, the entry will appear in a gray hue and <see cref="OnClick" /> will never be invoked.
/// </summary>
public bool Enabled
{
get => m_Enabled;
set => m_Enabled = value;
}
public bool Enabled { get; set; }
/// <summary>
/// Gets a value indicating if non local use of this entry is permitted.
@ -119,13 +88,13 @@ namespace Server.ContextMenus
public ContextMenuEntry( int number, int range )
{
if ( number <= 0x7FFF ) // Legacy code support
m_Number = 3000000 + number;
Number = 3000000 + number;
else
m_Number = number;
Number = number;
m_Range = range;
m_Enabled = true;
m_Color = 0xFFFF;
Range = range;
Enabled = true;
Color = 0xFFFF;
}
/// <summary>