Fixes body expression style.
This commit is contained in:
parent
3f0a72a62f
commit
33f5e77a24
957 changed files with 7424 additions and 15973 deletions
|
|
@ -86,8 +86,8 @@ namespace Server
|
|||
|
||||
public static TimeSpan ExpireDelay
|
||||
{
|
||||
get{ return m_ExpireDelay; }
|
||||
set{ m_ExpireDelay = value; }
|
||||
get => m_ExpireDelay;
|
||||
set => m_ExpireDelay = value;
|
||||
}
|
||||
|
||||
public static void DumpAccess()
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ namespace Server
|
|||
|
||||
public int Priority
|
||||
{
|
||||
get{ return m_Priority; }
|
||||
set{ m_Priority = value; }
|
||||
get => m_Priority;
|
||||
set => m_Priority = value;
|
||||
}
|
||||
|
||||
public CallPriorityAttribute( int priority )
|
||||
|
|
@ -117,13 +117,7 @@ namespace Server
|
|||
{
|
||||
private string[] m_Aliases;
|
||||
|
||||
public string[] Aliases
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Aliases;
|
||||
}
|
||||
}
|
||||
public string[] Aliases => m_Aliases;
|
||||
|
||||
public TypeAliasAttribute( params string[] aliases )
|
||||
{
|
||||
|
|
@ -144,13 +138,7 @@ namespace Server
|
|||
{
|
||||
private string[] m_Names;
|
||||
|
||||
public string[] Names
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Names;
|
||||
}
|
||||
}
|
||||
public string[] Names => m_Names;
|
||||
|
||||
public CustomEnumAttribute( string[] names )
|
||||
{
|
||||
|
|
@ -165,8 +153,8 @@ namespace Server
|
|||
|
||||
public AccessLevel AccessLevel
|
||||
{
|
||||
get { return m_AccessLevel; }
|
||||
set { m_AccessLevel = value; }
|
||||
get => m_AccessLevel;
|
||||
set => m_AccessLevel = value;
|
||||
}
|
||||
|
||||
public ConstructibleAttribute() : this( AccessLevel.Player ) //Lowest accesslevel for current functionality (Level determined by access to [add)
|
||||
|
|
@ -185,29 +173,11 @@ namespace Server
|
|||
private AccessLevel m_ReadLevel, m_WriteLevel;
|
||||
private bool m_ReadOnly;
|
||||
|
||||
public AccessLevel ReadLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ReadLevel;
|
||||
}
|
||||
}
|
||||
public AccessLevel ReadLevel => m_ReadLevel;
|
||||
|
||||
public AccessLevel WriteLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_WriteLevel;
|
||||
}
|
||||
}
|
||||
public AccessLevel WriteLevel => m_WriteLevel;
|
||||
|
||||
public bool ReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ReadOnly;
|
||||
}
|
||||
}
|
||||
public bool ReadOnly => m_ReadOnly;
|
||||
|
||||
public CommandPropertyAttribute( AccessLevel level, bool readOnly )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,21 +45,9 @@ namespace Server.Mobiles
|
|||
m_Amount = amount;
|
||||
}
|
||||
|
||||
public Serial Serial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Serial;
|
||||
}
|
||||
}
|
||||
public Serial Serial => m_Serial;
|
||||
|
||||
public int Amount
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Amount;
|
||||
}
|
||||
}
|
||||
public int Amount => m_Amount;
|
||||
}
|
||||
|
||||
public class SellItemResponse
|
||||
|
|
@ -73,21 +61,9 @@ namespace Server.Mobiles
|
|||
m_Amount = amount;
|
||||
}
|
||||
|
||||
public Item Item
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Item;
|
||||
}
|
||||
}
|
||||
public Item Item => m_Item;
|
||||
|
||||
public int Amount
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Amount;
|
||||
}
|
||||
}
|
||||
public int Amount => m_Amount;
|
||||
}
|
||||
|
||||
public class SellItemState
|
||||
|
|
@ -103,29 +79,11 @@ namespace Server.Mobiles
|
|||
m_Name = name;
|
||||
}
|
||||
|
||||
public Item Item
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Item;
|
||||
}
|
||||
}
|
||||
public Item Item => m_Item;
|
||||
|
||||
public int Price
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Price;
|
||||
}
|
||||
}
|
||||
public int Price => m_Price;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
}
|
||||
public string Name => m_Name;
|
||||
}
|
||||
|
||||
public class BuyItemState
|
||||
|
|
@ -149,60 +107,18 @@ namespace Server.Mobiles
|
|||
m_Hue = hue;
|
||||
}
|
||||
|
||||
public int Price
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Price;
|
||||
}
|
||||
}
|
||||
public int Price => m_Price;
|
||||
|
||||
public Serial MySerial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_MySer;
|
||||
}
|
||||
}
|
||||
public Serial MySerial => m_MySer;
|
||||
|
||||
public Serial ContainerSerial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ContSer;
|
||||
}
|
||||
}
|
||||
public Serial ContainerSerial => m_ContSer;
|
||||
|
||||
public int ItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ItemID;
|
||||
}
|
||||
}
|
||||
public int ItemID => m_ItemID;
|
||||
|
||||
public int Amount
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Amount;
|
||||
}
|
||||
}
|
||||
public int Amount => m_Amount;
|
||||
|
||||
public int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Hue;
|
||||
}
|
||||
}
|
||||
public int Hue => m_Hue;
|
||||
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Desc;
|
||||
}
|
||||
}
|
||||
public string Description => m_Desc;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
176
Server/Body.cs
176
Server/Body.cs
|
|
@ -95,137 +95,71 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsHuman
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BodyID >= 0
|
||||
&& m_BodyID < m_Types.Length
|
||||
&& m_Types[m_BodyID] == BodyType.Human
|
||||
&& m_BodyID != 402
|
||||
&& m_BodyID != 403
|
||||
&& m_BodyID != 607
|
||||
&& m_BodyID != 608
|
||||
&& m_BodyID != 694
|
||||
&& m_BodyID != 695
|
||||
&& m_BodyID != 970;
|
||||
}
|
||||
}
|
||||
public bool IsHuman => m_BodyID >= 0
|
||||
&& m_BodyID < m_Types.Length
|
||||
&& m_Types[m_BodyID] == BodyType.Human
|
||||
&& m_BodyID != 402
|
||||
&& m_BodyID != 403
|
||||
&& m_BodyID != 607
|
||||
&& m_BodyID != 608
|
||||
&& m_BodyID != 694
|
||||
&& m_BodyID != 695
|
||||
&& m_BodyID != 970;
|
||||
|
||||
public bool IsGargoyle
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BodyID == 666
|
||||
|| m_BodyID == 667
|
||||
|| m_BodyID == 694
|
||||
|| m_BodyID == 695;
|
||||
}
|
||||
}
|
||||
public bool IsGargoyle => m_BodyID == 666
|
||||
|| m_BodyID == 667
|
||||
|| m_BodyID == 694
|
||||
|| m_BodyID == 695;
|
||||
|
||||
public bool IsMale
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BodyID == 183
|
||||
|| m_BodyID == 185
|
||||
|| m_BodyID == 400
|
||||
|| m_BodyID == 402
|
||||
|| m_BodyID == 605
|
||||
|| m_BodyID == 607
|
||||
|| m_BodyID == 666
|
||||
|| m_BodyID == 694
|
||||
|| m_BodyID == 750;
|
||||
}
|
||||
}
|
||||
public bool IsMale => m_BodyID == 183
|
||||
|| m_BodyID == 185
|
||||
|| m_BodyID == 400
|
||||
|| m_BodyID == 402
|
||||
|| m_BodyID == 605
|
||||
|| m_BodyID == 607
|
||||
|| m_BodyID == 666
|
||||
|| m_BodyID == 694
|
||||
|| m_BodyID == 750;
|
||||
|
||||
public bool IsFemale
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BodyID == 184
|
||||
|| m_BodyID == 186
|
||||
|| m_BodyID == 401
|
||||
|| m_BodyID == 403
|
||||
|| m_BodyID == 606
|
||||
|| m_BodyID == 608
|
||||
|| m_BodyID == 667
|
||||
|| m_BodyID == 695
|
||||
|| m_BodyID == 751;
|
||||
}
|
||||
}
|
||||
public bool IsFemale => m_BodyID == 184
|
||||
|| m_BodyID == 186
|
||||
|| m_BodyID == 401
|
||||
|| m_BodyID == 403
|
||||
|| m_BodyID == 606
|
||||
|| m_BodyID == 608
|
||||
|| m_BodyID == 667
|
||||
|| m_BodyID == 695
|
||||
|| m_BodyID == 751;
|
||||
|
||||
public bool IsGhost
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BodyID == 402
|
||||
|| m_BodyID == 403
|
||||
|| m_BodyID == 607
|
||||
|| m_BodyID == 608
|
||||
|| m_BodyID == 694
|
||||
|| m_BodyID == 695
|
||||
|| m_BodyID == 970;
|
||||
}
|
||||
}
|
||||
public bool IsGhost => m_BodyID == 402
|
||||
|| m_BodyID == 403
|
||||
|| m_BodyID == 607
|
||||
|| m_BodyID == 608
|
||||
|| m_BodyID == 694
|
||||
|| m_BodyID == 695
|
||||
|| m_BodyID == 970;
|
||||
|
||||
public bool IsMonster
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BodyID >= 0
|
||||
&& m_BodyID < m_Types.Length
|
||||
&& m_Types[m_BodyID] == BodyType.Monster;
|
||||
}
|
||||
}
|
||||
public bool IsMonster => m_BodyID >= 0
|
||||
&& m_BodyID < m_Types.Length
|
||||
&& m_Types[m_BodyID] == BodyType.Monster;
|
||||
|
||||
public bool IsAnimal
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BodyID >= 0
|
||||
&& m_BodyID < m_Types.Length
|
||||
&& m_Types[m_BodyID] == BodyType.Animal;
|
||||
}
|
||||
}
|
||||
public bool IsAnimal => m_BodyID >= 0
|
||||
&& m_BodyID < m_Types.Length
|
||||
&& m_Types[m_BodyID] == BodyType.Animal;
|
||||
|
||||
public bool IsEmpty
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BodyID >= 0
|
||||
&& m_BodyID < m_Types.Length
|
||||
&& m_Types[m_BodyID] == BodyType.Empty;
|
||||
}
|
||||
}
|
||||
public bool IsEmpty => m_BodyID >= 0
|
||||
&& m_BodyID < m_Types.Length
|
||||
&& m_Types[m_BodyID] == BodyType.Empty;
|
||||
|
||||
public bool IsSea
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BodyID >= 0
|
||||
&& m_BodyID < m_Types.Length
|
||||
&& m_Types[m_BodyID] == BodyType.Sea;
|
||||
}
|
||||
}
|
||||
public bool IsSea => m_BodyID >= 0
|
||||
&& m_BodyID < m_Types.Length
|
||||
&& m_Types[m_BodyID] == BodyType.Sea;
|
||||
|
||||
public bool IsEquipment
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BodyID >= 0
|
||||
&& m_BodyID < m_Types.Length
|
||||
&& m_Types[m_BodyID] == BodyType.Equipment;
|
||||
}
|
||||
}
|
||||
public bool IsEquipment => m_BodyID >= 0
|
||||
&& m_BodyID < m_Types.Length
|
||||
&& m_Types[m_BodyID] == BodyType.Equipment;
|
||||
|
||||
public int BodyID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_BodyID;
|
||||
}
|
||||
}
|
||||
public int BodyID => m_BodyID;
|
||||
|
||||
public static implicit operator int( Body a )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,53 +38,17 @@ namespace Server
|
|||
private ClientType m_Type;
|
||||
private string m_SourceString;
|
||||
|
||||
public int Major
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Major;
|
||||
}
|
||||
}
|
||||
public int Major => m_Major;
|
||||
|
||||
public int Minor
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Minor;
|
||||
}
|
||||
}
|
||||
public int Minor => m_Minor;
|
||||
|
||||
public int Revision
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Revision;
|
||||
}
|
||||
}
|
||||
public int Revision => m_Revision;
|
||||
|
||||
public int Patch
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Patch;
|
||||
}
|
||||
}
|
||||
public int Patch => m_Patch;
|
||||
|
||||
public ClientType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Type;
|
||||
}
|
||||
}
|
||||
public ClientType Type => m_Type;
|
||||
|
||||
public string SourceString
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SourceString;
|
||||
}
|
||||
}
|
||||
public string SourceString => m_SourceString;
|
||||
|
||||
public ClientVersion( int maj, int min, int rev, int pat ) : this( maj, min, rev, pat, ClientType.Regular )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,45 +32,15 @@ namespace Server.Commands
|
|||
private string m_Command, m_ArgString;
|
||||
private string[] m_Arguments;
|
||||
|
||||
public Mobile Mobile
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Mobile;
|
||||
}
|
||||
}
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public string Command
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Command;
|
||||
}
|
||||
}
|
||||
public string Command => m_Command;
|
||||
|
||||
public string ArgString
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ArgString;
|
||||
}
|
||||
}
|
||||
public string ArgString => m_ArgString;
|
||||
|
||||
public string[] Arguments
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Arguments;
|
||||
}
|
||||
}
|
||||
public string[] Arguments => m_Arguments;
|
||||
|
||||
public int Length
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Arguments.Length;
|
||||
}
|
||||
}
|
||||
public int Length => m_Arguments.Length;
|
||||
|
||||
public string GetString( int index )
|
||||
{
|
||||
|
|
@ -127,29 +97,11 @@ namespace Server.Commands
|
|||
private CommandEventHandler m_Handler;
|
||||
private AccessLevel m_AccessLevel;
|
||||
|
||||
public string Command
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Command;
|
||||
}
|
||||
}
|
||||
public string Command => m_Command;
|
||||
|
||||
public CommandEventHandler Handler
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Handler;
|
||||
}
|
||||
}
|
||||
public CommandEventHandler Handler => m_Handler;
|
||||
|
||||
public AccessLevel AccessLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_AccessLevel;
|
||||
}
|
||||
}
|
||||
public AccessLevel AccessLevel => m_AccessLevel;
|
||||
|
||||
public CommandEntry( string command, CommandEventHandler handler, AccessLevel accessLevel )
|
||||
{
|
||||
|
|
@ -178,14 +130,8 @@ namespace Server.Commands
|
|||
|
||||
public static string Prefix
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Prefix;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Prefix = value;
|
||||
}
|
||||
get => m_Prefix;
|
||||
set => m_Prefix = value;
|
||||
}
|
||||
|
||||
public static string[] Split( string value )
|
||||
|
|
@ -243,13 +189,7 @@ namespace Server.Commands
|
|||
|
||||
private static Dictionary<string, CommandEntry> m_Entries;
|
||||
|
||||
public static Dictionary<string, CommandEntry> Entries
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Entries;
|
||||
}
|
||||
}
|
||||
public static Dictionary<string, CommandEntry> Entries => m_Entries;
|
||||
|
||||
static CommandSystem()
|
||||
{
|
||||
|
|
@ -263,7 +203,9 @@ namespace Server.Commands
|
|||
|
||||
private static AccessLevel m_BadCommandIngoreLevel = AccessLevel.Player;
|
||||
|
||||
public static AccessLevel BadCommandIgnoreLevel{ get{ return m_BadCommandIngoreLevel; } set{ m_BadCommandIngoreLevel = value; } }
|
||||
public static AccessLevel BadCommandIgnoreLevel{ get => m_BadCommandIngoreLevel;
|
||||
set => m_BadCommandIngoreLevel = value;
|
||||
}
|
||||
|
||||
public static bool Handle( Mobile from, string text )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,26 +35,17 @@ namespace Server.ContextMenus
|
|||
/// <summary>
|
||||
/// Gets the <see cref="Mobile" /> who opened this ContextMenu.
|
||||
/// </summary>
|
||||
public Mobile From
|
||||
{
|
||||
get{ return m_From; }
|
||||
}
|
||||
public Mobile From => m_From;
|
||||
|
||||
/// <summary>
|
||||
/// Gets an object of the <see cref="Mobile" /> or <see cref="Item" /> for which this ContextMenu is on.
|
||||
/// </summary>
|
||||
public object Target
|
||||
{
|
||||
get{ return m_Target; }
|
||||
}
|
||||
public object Target => m_Target;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of <see cref="ContextMenuEntry">entries</see> contained in this ContextMenu.
|
||||
/// </summary>
|
||||
public ContextMenuEntry[] Entries
|
||||
{
|
||||
get{ return m_Entries; }
|
||||
}
|
||||
public ContextMenuEntry[] Entries => m_Entries;
|
||||
|
||||
/// <summary>
|
||||
/// Instantiates a new ContextMenu instance.
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ namespace Server.ContextMenus
|
|||
/// </summary>
|
||||
public CMEFlags Flags
|
||||
{
|
||||
get{ return m_Flags; }
|
||||
set{ m_Flags = value; }
|
||||
get => m_Flags;
|
||||
set => m_Flags = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -49,8 +49,8 @@ namespace Server.ContextMenus
|
|||
/// </summary>
|
||||
public ContextMenu Owner
|
||||
{
|
||||
get{ return m_Owner; }
|
||||
set{ m_Owner = value; }
|
||||
get => m_Owner;
|
||||
set => m_Owner = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -58,8 +58,8 @@ namespace Server.ContextMenus
|
|||
/// </summary>
|
||||
public int Number
|
||||
{
|
||||
get{ return m_Number; }
|
||||
set{ m_Number = value; }
|
||||
get => m_Number;
|
||||
set => m_Number = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -67,8 +67,8 @@ namespace Server.ContextMenus
|
|||
/// </summary>
|
||||
public int Range
|
||||
{
|
||||
get{ return m_Range; }
|
||||
set{ m_Range = value; }
|
||||
get => m_Range;
|
||||
set => m_Range = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -76,8 +76,8 @@ namespace Server.ContextMenus
|
|||
/// </summary>
|
||||
public int Color
|
||||
{
|
||||
get{ return m_Color; }
|
||||
set{ m_Color = value; }
|
||||
get => m_Color;
|
||||
set => m_Color = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -85,17 +85,14 @@ namespace Server.ContextMenus
|
|||
/// </summary>
|
||||
public bool Enabled
|
||||
{
|
||||
get{ return m_Enabled; }
|
||||
set{ m_Enabled = value; }
|
||||
get => m_Enabled;
|
||||
set => m_Enabled = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating if non local use of this entry is permitted.
|
||||
/// </summary>
|
||||
public virtual bool NonLocalUse
|
||||
{
|
||||
get{ return false; }
|
||||
}
|
||||
public virtual bool NonLocalUse => false;
|
||||
|
||||
/// <summary>
|
||||
/// Instantiates a new ContextMenuEntry with a given <see cref="Number">localization number</see> (<paramref name="number" />). No <see cref="Range">maximum range</see> is used.
|
||||
|
|
|
|||
|
|
@ -47,35 +47,15 @@ namespace Server.Diagnostics {
|
|||
|
||||
private Stopwatch _stopwatch;
|
||||
|
||||
public string Name {
|
||||
get {
|
||||
return _name;
|
||||
}
|
||||
}
|
||||
public string Name => _name;
|
||||
|
||||
public long Count {
|
||||
get {
|
||||
return _count;
|
||||
}
|
||||
}
|
||||
public long Count => _count;
|
||||
|
||||
public TimeSpan AverageTime {
|
||||
get {
|
||||
return TimeSpan.FromTicks( _totalTime.Ticks / Math.Max( 1, _count ) );
|
||||
}
|
||||
}
|
||||
public TimeSpan AverageTime => TimeSpan.FromTicks( _totalTime.Ticks / Math.Max( 1, _count ) );
|
||||
|
||||
public TimeSpan PeakTime {
|
||||
get {
|
||||
return _peakTime;
|
||||
}
|
||||
}
|
||||
public TimeSpan PeakTime => _peakTime;
|
||||
|
||||
public TimeSpan TotalTime {
|
||||
get {
|
||||
return _totalTime;
|
||||
}
|
||||
}
|
||||
public TimeSpan TotalTime => _totalTime;
|
||||
|
||||
protected BaseProfile( string name ) {
|
||||
_name = name;
|
||||
|
|
|
|||
|
|
@ -25,11 +25,7 @@ namespace Server.Diagnostics {
|
|||
public class GumpProfile : BaseProfile {
|
||||
private static Dictionary<Type, GumpProfile> _profiles = new Dictionary<Type, GumpProfile>();
|
||||
|
||||
public static IEnumerable<GumpProfile> Profiles {
|
||||
get {
|
||||
return _profiles.Values;
|
||||
}
|
||||
}
|
||||
public static IEnumerable<GumpProfile> Profiles => _profiles.Values;
|
||||
|
||||
public static GumpProfile Acquire( Type type ) {
|
||||
if ( !Core.Profiling ) {
|
||||
|
|
|
|||
|
|
@ -28,17 +28,9 @@ namespace Server.Diagnostics {
|
|||
public abstract class BasePacketProfile : BaseProfile {
|
||||
private long _totalLength;
|
||||
|
||||
public long TotalLength {
|
||||
get {
|
||||
return _totalLength;
|
||||
}
|
||||
}
|
||||
public long TotalLength => _totalLength;
|
||||
|
||||
public double AverageLength {
|
||||
get {
|
||||
return ( double ) _totalLength / Math.Max( 1, this.Count );
|
||||
}
|
||||
}
|
||||
public double AverageLength => ( double ) _totalLength / Math.Max( 1, this.Count );
|
||||
|
||||
protected BasePacketProfile(string name)
|
||||
: base( name ) {
|
||||
|
|
@ -60,11 +52,7 @@ namespace Server.Diagnostics {
|
|||
public class PacketSendProfile : BasePacketProfile {
|
||||
private static Dictionary<Type, PacketSendProfile> _profiles = new Dictionary<Type, PacketSendProfile>();
|
||||
|
||||
public static IEnumerable<PacketSendProfile> Profiles {
|
||||
get {
|
||||
return _profiles.Values;
|
||||
}
|
||||
}
|
||||
public static IEnumerable<PacketSendProfile> Profiles => _profiles.Values;
|
||||
|
||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||
public static PacketSendProfile Acquire( Type type ) {
|
||||
|
|
@ -97,11 +85,7 @@ namespace Server.Diagnostics {
|
|||
public class PacketReceiveProfile : BasePacketProfile {
|
||||
private static Dictionary<int, PacketReceiveProfile> _profiles = new Dictionary<int, PacketReceiveProfile>();
|
||||
|
||||
public static IEnumerable<PacketReceiveProfile> Profiles {
|
||||
get {
|
||||
return _profiles.Values;
|
||||
}
|
||||
}
|
||||
public static IEnumerable<PacketReceiveProfile> Profiles => _profiles.Values;
|
||||
|
||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||
public static PacketReceiveProfile Acquire( int packetId ) {
|
||||
|
|
|
|||
|
|
@ -25,11 +25,7 @@ namespace Server.Diagnostics {
|
|||
public class TargetProfile : BaseProfile {
|
||||
private static Dictionary<Type, TargetProfile> _profiles = new Dictionary<Type, TargetProfile>();
|
||||
|
||||
public static IEnumerable<TargetProfile> Profiles {
|
||||
get {
|
||||
return _profiles.Values;
|
||||
}
|
||||
}
|
||||
public static IEnumerable<TargetProfile> Profiles => _profiles.Values;
|
||||
|
||||
public static TargetProfile Acquire( Type type ) {
|
||||
if ( !Core.Profiling ) {
|
||||
|
|
|
|||
|
|
@ -25,11 +25,7 @@ namespace Server.Diagnostics {
|
|||
public class TimerProfile : BaseProfile {
|
||||
private static Dictionary<string, TimerProfile> _profiles = new Dictionary<string, TimerProfile>();
|
||||
|
||||
public static IEnumerable<TimerProfile> Profiles {
|
||||
get {
|
||||
return _profiles.Values;
|
||||
}
|
||||
}
|
||||
public static IEnumerable<TimerProfile> Profiles => _profiles.Values;
|
||||
|
||||
public static TimerProfile Acquire( string name ) {
|
||||
if ( !Core.Profiling ) {
|
||||
|
|
@ -48,30 +44,18 @@ namespace Server.Diagnostics {
|
|||
private long _created, _started, _stopped;
|
||||
|
||||
public long Created {
|
||||
get {
|
||||
return _created;
|
||||
}
|
||||
set {
|
||||
_created = value;
|
||||
}
|
||||
get => _created;
|
||||
set => _created = value;
|
||||
}
|
||||
|
||||
public long Started {
|
||||
get {
|
||||
return _started;
|
||||
}
|
||||
set {
|
||||
_started = value;
|
||||
}
|
||||
get => _started;
|
||||
set => _started = value;
|
||||
}
|
||||
|
||||
public long Stopped {
|
||||
get {
|
||||
return _stopped;
|
||||
}
|
||||
set {
|
||||
_stopped = value;
|
||||
}
|
||||
get => _stopped;
|
||||
set => _stopped = value;
|
||||
}
|
||||
|
||||
public TimerProfile( string name )
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ namespace Server
|
|||
|
||||
public static ParticleSupportType ParticleSupportType
|
||||
{
|
||||
get{ return m_ParticleSupportType; }
|
||||
set{ m_ParticleSupportType = value; }
|
||||
get => m_ParticleSupportType;
|
||||
set => m_ParticleSupportType = value;
|
||||
}
|
||||
|
||||
public static bool SendParticlesTo( NetState state )
|
||||
|
|
|
|||
|
|
@ -77,8 +77,8 @@ namespace Server
|
|||
private NetState m_State;
|
||||
private ClientVersion m_Version;
|
||||
|
||||
public NetState State { get { return m_State; } }
|
||||
public ClientVersion Version { get { return m_Version; } }
|
||||
public NetState State => m_State;
|
||||
public ClientVersion Version => m_Version;
|
||||
|
||||
public ClientVersionReceivedArgs( NetState state, ClientVersion cv )
|
||||
{
|
||||
|
|
@ -90,10 +90,14 @@ namespace Server
|
|||
public class CreateGuildEventArgs : EventArgs
|
||||
{
|
||||
private int m_Id;
|
||||
public int Id { get { return m_Id; } set { m_Id = value; } }
|
||||
public int Id { get => m_Id;
|
||||
set => m_Id = value;
|
||||
}
|
||||
|
||||
private BaseGuild m_Guild;
|
||||
public BaseGuild Guild { get { return m_Guild; } set { m_Guild = value; } }
|
||||
public BaseGuild Guild { get => m_Guild;
|
||||
set => m_Guild = value;
|
||||
}
|
||||
|
||||
public CreateGuildEventArgs( int id )
|
||||
{
|
||||
|
|
@ -105,7 +109,7 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public GuildGumpRequestArgs( Mobile mobile )
|
||||
{
|
||||
|
|
@ -117,7 +121,7 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public Mobile Mobile { get { return m_Mobile; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public QuestGumpRequestArgs( Mobile mobile )
|
||||
{
|
||||
|
|
@ -130,8 +134,8 @@ namespace Server
|
|||
private Mobile m_Mobile;
|
||||
private int m_Index;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public int Index{ get{ return m_Index; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
public int Index => m_Index;
|
||||
|
||||
public SetAbilityEventArgs( Mobile mobile, int index )
|
||||
{
|
||||
|
|
@ -145,8 +149,8 @@ namespace Server
|
|||
private NetState m_State;
|
||||
private int m_Index;
|
||||
|
||||
public NetState State{ get{ return m_State; } }
|
||||
public int Index{ get{ return m_Index; } }
|
||||
public NetState State => m_State;
|
||||
public int Index => m_Index;
|
||||
|
||||
public DeleteRequestEventArgs( NetState state, int index )
|
||||
{
|
||||
|
|
@ -163,11 +167,15 @@ namespace Server
|
|||
private bool m_Accepted;
|
||||
private CityInfo[] m_CityInfo;
|
||||
|
||||
public NetState State{ get{ return m_State; } }
|
||||
public string Username{ get{ return m_Username; } }
|
||||
public string Password{ get{ return m_Password; } }
|
||||
public bool Accepted{ get{ return m_Accepted; } set{ m_Accepted = value; } }
|
||||
public CityInfo[] CityInfo{ get{ return m_CityInfo; } set{ m_CityInfo = value; } }
|
||||
public NetState State => m_State;
|
||||
public string Username => m_Username;
|
||||
public string Password => m_Password;
|
||||
public bool Accepted{ get => m_Accepted;
|
||||
set => m_Accepted = value;
|
||||
}
|
||||
public CityInfo[] CityInfo{ get => m_CityInfo;
|
||||
set => m_CityInfo = value;
|
||||
}
|
||||
|
||||
public GameLoginEventArgs( NetState state, string un, string pw )
|
||||
{
|
||||
|
|
@ -183,9 +191,9 @@ namespace Server
|
|||
private Mobile m_Aggressor;
|
||||
private bool m_Criminal;
|
||||
|
||||
public Mobile Aggressed{ get{ return m_Aggressed; } }
|
||||
public Mobile Aggressor{ get{ return m_Aggressor; } }
|
||||
public bool Criminal{ get{ return m_Criminal; } }
|
||||
public Mobile Aggressed => m_Aggressed;
|
||||
public Mobile Aggressor => m_Aggressor;
|
||||
public bool Criminal => m_Criminal;
|
||||
|
||||
private static Queue<AggressiveActionEventArgs> m_Pool = new Queue<AggressiveActionEventArgs>();
|
||||
|
||||
|
|
@ -227,8 +235,8 @@ namespace Server
|
|||
private Mobile m_Beholder;
|
||||
private Mobile m_Beheld;
|
||||
|
||||
public Mobile Beholder{ get{ return m_Beholder; } }
|
||||
public Mobile Beheld{ get{ return m_Beheld; } }
|
||||
public Mobile Beholder => m_Beholder;
|
||||
public Mobile Beheld => m_Beheld;
|
||||
|
||||
public ProfileRequestEventArgs( Mobile beholder, Mobile beheld )
|
||||
{
|
||||
|
|
@ -243,9 +251,9 @@ namespace Server
|
|||
private Mobile m_Beheld;
|
||||
private string m_Text;
|
||||
|
||||
public Mobile Beholder{ get{ return m_Beholder; } }
|
||||
public Mobile Beheld{ get{ return m_Beheld; } }
|
||||
public string Text{ get{ return m_Text; } }
|
||||
public Mobile Beholder => m_Beholder;
|
||||
public Mobile Beheld => m_Beheld;
|
||||
public string Text => m_Text;
|
||||
|
||||
public ChangeProfileRequestEventArgs( Mobile beholder, Mobile beheld, string text )
|
||||
{
|
||||
|
|
@ -260,8 +268,8 @@ namespace Server
|
|||
private Mobile m_Beholder;
|
||||
private Mobile m_Beheld;
|
||||
|
||||
public Mobile Beholder{ get{ return m_Beholder; } }
|
||||
public Mobile Beheld{ get{ return m_Beheld; } }
|
||||
public Mobile Beholder => m_Beholder;
|
||||
public Mobile Beheld => m_Beheld;
|
||||
|
||||
public PaperdollRequestEventArgs( Mobile beholder, Mobile beheld )
|
||||
{
|
||||
|
|
@ -279,11 +287,15 @@ namespace Server
|
|||
private bool m_Accepted;
|
||||
private ALRReason m_RejectReason;
|
||||
|
||||
public NetState State{ get{ return m_State; } }
|
||||
public string Username{ get{ return m_Username; } }
|
||||
public string Password{ get{ return m_Password; } }
|
||||
public bool Accepted{ get{ return m_Accepted; } set{ m_Accepted = value; } }
|
||||
public ALRReason RejectReason{ get{ return m_RejectReason; } set{ m_RejectReason = value; } }
|
||||
public NetState State => m_State;
|
||||
public string Username => m_Username;
|
||||
public string Password => m_Password;
|
||||
public bool Accepted{ get => m_Accepted;
|
||||
set => m_Accepted = value;
|
||||
}
|
||||
public ALRReason RejectReason{ get => m_RejectReason;
|
||||
set => m_RejectReason = value;
|
||||
}
|
||||
|
||||
public AccountLoginEventArgs( NetState state, string username, string password )
|
||||
{
|
||||
|
|
@ -299,9 +311,9 @@ namespace Server
|
|||
private Mobile m_Beheld;
|
||||
private int m_GumpID;
|
||||
|
||||
public Mobile Beholder{ get{ return m_Beholder; } }
|
||||
public Mobile Beheld{ get{ return m_Beheld; } }
|
||||
public int GumpID{ get{ return m_GumpID; } }
|
||||
public Mobile Beholder => m_Beholder;
|
||||
public Mobile Beheld => m_Beheld;
|
||||
public int GumpID => m_GumpID;
|
||||
|
||||
public VirtueItemRequestEventArgs( Mobile beholder, Mobile beheld, int gumpID )
|
||||
{
|
||||
|
|
@ -315,8 +327,8 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Beholder, m_Beheld;
|
||||
|
||||
public Mobile Beholder{ get{ return m_Beholder; } }
|
||||
public Mobile Beheld{ get{ return m_Beheld; } }
|
||||
public Mobile Beholder => m_Beholder;
|
||||
public Mobile Beheld => m_Beheld;
|
||||
|
||||
public VirtueGumpRequestEventArgs( Mobile beholder, Mobile beheld )
|
||||
{
|
||||
|
|
@ -330,8 +342,8 @@ namespace Server
|
|||
private Mobile m_Mobile;
|
||||
private int m_VirtueID;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public int VirtueID{ get{ return m_VirtueID; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
public int VirtueID => m_VirtueID;
|
||||
|
||||
public VirtueMacroRequestEventArgs( Mobile mobile, int virtueID )
|
||||
{
|
||||
|
|
@ -344,7 +356,7 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public ChatRequestEventArgs( Mobile mobile )
|
||||
{
|
||||
|
|
@ -356,7 +368,7 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public PlayerDeathEventArgs( Mobile mobile )
|
||||
{
|
||||
|
|
@ -369,9 +381,9 @@ namespace Server
|
|||
private Mobile m_From, m_Target;
|
||||
private string m_Name;
|
||||
|
||||
public Mobile From{ get{ return m_From; } }
|
||||
public Mobile Target{ get{ return m_Target; } }
|
||||
public string Name{ get{ return m_Name; } }
|
||||
public Mobile From => m_From;
|
||||
public Mobile Target => m_Target;
|
||||
public string Name => m_Name;
|
||||
|
||||
public RenameRequestEventArgs( Mobile from, Mobile target, string name )
|
||||
{
|
||||
|
|
@ -385,7 +397,7 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public LogoutEventArgs( Mobile m )
|
||||
{
|
||||
|
|
@ -398,8 +410,10 @@ namespace Server
|
|||
private Socket m_Socket;
|
||||
private bool m_AllowConnection;
|
||||
|
||||
public Socket Socket{ get{ return m_Socket; } }
|
||||
public bool AllowConnection{ get { return m_AllowConnection; } set { m_AllowConnection = value; } }
|
||||
public Socket Socket => m_Socket;
|
||||
public bool AllowConnection{ get => m_AllowConnection;
|
||||
set => m_AllowConnection = value;
|
||||
}
|
||||
|
||||
public SocketConnectEventArgs( Socket s )
|
||||
{
|
||||
|
|
@ -412,7 +426,7 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public ConnectedEventArgs( Mobile m )
|
||||
{
|
||||
|
|
@ -424,7 +438,7 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public DisconnectedEventArgs( Mobile m )
|
||||
{
|
||||
|
|
@ -437,8 +451,8 @@ namespace Server
|
|||
private Mobile m_Mobile;
|
||||
private string m_Action;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public string Action{ get{ return m_Action; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
public string Action => m_Action;
|
||||
|
||||
public AnimateRequestEventArgs( Mobile m, string action )
|
||||
{
|
||||
|
|
@ -453,9 +467,9 @@ namespace Server
|
|||
private Item m_Spellbook;
|
||||
private int m_SpellID;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Item Spellbook{ get{ return m_Spellbook; } }
|
||||
public int SpellID{ get{ return m_SpellID; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
public Item Spellbook => m_Spellbook;
|
||||
public int SpellID => m_SpellID;
|
||||
|
||||
public CastSpellRequestEventArgs( Mobile m, int spellID, Item book )
|
||||
{
|
||||
|
|
@ -471,9 +485,9 @@ namespace Server
|
|||
private Item m_Bandage;
|
||||
private Mobile m_Target;
|
||||
|
||||
public Mobile Mobile { get { return m_Mobile; } }
|
||||
public Item Bandage { get { return m_Bandage; } }
|
||||
public Mobile Target { get { return m_Target; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
public Item Bandage => m_Bandage;
|
||||
public Mobile Target => m_Target;
|
||||
|
||||
public BandageTargetRequestEventArgs(Mobile m, Item bandage, Mobile target)
|
||||
{
|
||||
|
|
@ -488,8 +502,8 @@ namespace Server
|
|||
private Mobile m_Mobile;
|
||||
private int m_Type;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public int Type{ get{ return m_Type; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
public int Type => m_Type;
|
||||
|
||||
public OpenSpellbookRequestEventArgs( Mobile m, int type )
|
||||
{
|
||||
|
|
@ -502,7 +516,7 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public StunRequestEventArgs( Mobile m )
|
||||
{
|
||||
|
|
@ -514,7 +528,7 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public DisarmRequestEventArgs( Mobile m )
|
||||
{
|
||||
|
|
@ -526,7 +540,7 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public HelpRequestEventArgs( Mobile m )
|
||||
{
|
||||
|
|
@ -546,8 +560,10 @@ namespace Server
|
|||
private Exception m_Exception;
|
||||
private bool m_Close;
|
||||
|
||||
public Exception Exception{ get{ return m_Exception; } }
|
||||
public bool Close{ get{ return m_Close; } set{ m_Close = value; } }
|
||||
public Exception Exception => m_Exception;
|
||||
public bool Close{ get => m_Close;
|
||||
set => m_Close = value;
|
||||
}
|
||||
|
||||
public CrashedEventArgs( Exception e )
|
||||
{
|
||||
|
|
@ -560,8 +576,8 @@ namespace Server
|
|||
private Mobile m_Mobile;
|
||||
private int m_OldValue;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public int OldValue{ get{ return m_OldValue; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
public int OldValue => m_OldValue;
|
||||
|
||||
public HungerChangedEventArgs( Mobile mobile, int oldValue )
|
||||
{
|
||||
|
|
@ -576,9 +592,11 @@ namespace Server
|
|||
private Direction m_Direction;
|
||||
private bool m_Blocked;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Direction Direction{ get{ return m_Direction; } }
|
||||
public bool Blocked{ get{ return m_Blocked; } set{ m_Blocked = value; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
public Direction Direction => m_Direction;
|
||||
public bool Blocked{ get => m_Blocked;
|
||||
set => m_Blocked = value;
|
||||
}
|
||||
|
||||
private static Queue<MovementEventArgs> m_Pool = new Queue<MovementEventArgs>();
|
||||
|
||||
|
|
@ -621,10 +639,12 @@ namespace Server
|
|||
private bool m_Rejected;
|
||||
private List<ServerInfo> m_Servers;
|
||||
|
||||
public NetState State{ get{ return m_State; } }
|
||||
public IAccount Account{ get{ return m_Account; } }
|
||||
public bool Rejected{ get{ return m_Rejected; } set{ m_Rejected = value; } }
|
||||
public List<ServerInfo> Servers{ get{ return m_Servers; } }
|
||||
public NetState State => m_State;
|
||||
public IAccount Account => m_Account;
|
||||
public bool Rejected{ get => m_Rejected;
|
||||
set => m_Rejected = value;
|
||||
}
|
||||
public List<ServerInfo> Servers => m_Servers;
|
||||
|
||||
public void AddServer( string name, IPEndPoint address )
|
||||
{
|
||||
|
|
@ -649,8 +669,8 @@ namespace Server
|
|||
private SkillName m_Name;
|
||||
private int m_Value;
|
||||
|
||||
public SkillName Name{ get{ return m_Name; } }
|
||||
public int Value{ get{ return m_Value; } }
|
||||
public SkillName Name => m_Name;
|
||||
public int Value => m_Value;
|
||||
|
||||
public SkillNameValue( SkillName name, int value )
|
||||
{
|
||||
|
|
@ -677,25 +697,29 @@ namespace Server
|
|||
|
||||
private Race m_Race;
|
||||
|
||||
public NetState State{ get{ return m_State; } }
|
||||
public IAccount Account{ get{ return m_Account; } }
|
||||
public Mobile Mobile{ get{ return m_Mobile; } set{ m_Mobile = value; } }
|
||||
public string Name{ get{ return m_Name; } }
|
||||
public bool Female{ get{ return m_Female; } }
|
||||
public int Hue{ get{ return m_Hue; } }
|
||||
public int Str{ get{ return m_Str; } }
|
||||
public int Dex{ get{ return m_Dex; } }
|
||||
public int Int{ get{ return m_Int; } }
|
||||
public CityInfo City{ get{ return m_City; } }
|
||||
public SkillNameValue[] Skills{ get{ return m_Skills; } }
|
||||
public int ShirtHue{ get{ return m_ShirtHue; } }
|
||||
public int PantsHue{ get{ return m_PantsHue; } }
|
||||
public int HairID{ get{ return m_HairID; } }
|
||||
public int HairHue{ get{ return m_HairHue; } }
|
||||
public int BeardID{ get{ return m_BeardID; } }
|
||||
public int BeardHue{ get{ return m_BeardHue; } }
|
||||
public int Profession{ get{ return m_Profession; } set{ m_Profession = value; }}
|
||||
public Race Race { get { return m_Race; } }
|
||||
public NetState State => m_State;
|
||||
public IAccount Account => m_Account;
|
||||
public Mobile Mobile{ get => m_Mobile;
|
||||
set => m_Mobile = value;
|
||||
}
|
||||
public string Name => m_Name;
|
||||
public bool Female => m_Female;
|
||||
public int Hue => m_Hue;
|
||||
public int Str => m_Str;
|
||||
public int Dex => m_Dex;
|
||||
public int Int => m_Int;
|
||||
public CityInfo City => m_City;
|
||||
public SkillNameValue[] Skills => m_Skills;
|
||||
public int ShirtHue => m_ShirtHue;
|
||||
public int PantsHue => m_PantsHue;
|
||||
public int HairID => m_HairID;
|
||||
public int HairHue => m_HairHue;
|
||||
public int BeardID => m_BeardID;
|
||||
public int BeardHue => m_BeardHue;
|
||||
public int Profession{ get => m_Profession;
|
||||
set => m_Profession = value;
|
||||
}
|
||||
public Race Race => m_Race;
|
||||
|
||||
public CharacterCreatedEventArgs( NetState state, IAccount a, string name, bool female, int hue, int str, int dex, int intel, CityInfo city, SkillNameValue[] skills, int shirtHue, int pantsHue, int hairID, int hairHue, int beardID, int beardHue, int profession, Race race )
|
||||
{
|
||||
|
|
@ -724,7 +748,7 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public OpenDoorMacroEventArgs( Mobile mobile )
|
||||
{
|
||||
|
|
@ -742,13 +766,19 @@ namespace Server
|
|||
private bool m_Handled;
|
||||
private bool m_Blocked;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public string Speech{ get{ return m_Speech; } set{ m_Speech = value; } }
|
||||
public MessageType Type{ get{ return m_Type; } }
|
||||
public int Hue{ get{ return m_Hue; } }
|
||||
public int[] Keywords{ get{ return m_Keywords; } }
|
||||
public bool Handled{ get{ return m_Handled; } set{ m_Handled = value; } }
|
||||
public bool Blocked{ get{ return m_Blocked; } set{ m_Blocked = value; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
public string Speech{ get => m_Speech;
|
||||
set => m_Speech = value;
|
||||
}
|
||||
public MessageType Type => m_Type;
|
||||
public int Hue => m_Hue;
|
||||
public int[] Keywords => m_Keywords;
|
||||
public bool Handled{ get => m_Handled;
|
||||
set => m_Handled = value;
|
||||
}
|
||||
public bool Blocked{ get => m_Blocked;
|
||||
set => m_Blocked = value;
|
||||
}
|
||||
|
||||
public bool HasKeyword( int keyword )
|
||||
{
|
||||
|
|
@ -773,7 +803,7 @@ namespace Server
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public Mobile Mobile{ get{ return m_Mobile; } }
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public LoginEventArgs( Mobile mobile )
|
||||
{
|
||||
|
|
@ -785,7 +815,7 @@ namespace Server
|
|||
{
|
||||
private bool m_Msg;
|
||||
|
||||
public bool Message{ get{ return m_Msg; } }
|
||||
public bool Message => m_Msg;
|
||||
|
||||
public WorldSaveEventArgs( bool msg )
|
||||
{
|
||||
|
|
@ -804,8 +834,10 @@ namespace Server
|
|||
m_Blocked = false;
|
||||
}
|
||||
|
||||
public NetState NetState{ get{ return m_State; } }
|
||||
public bool Blocked{ get{ return m_Blocked; } set{ m_Blocked = value; } }
|
||||
public NetState NetState => m_State;
|
||||
public bool Blocked{ get => m_Blocked;
|
||||
set => m_Blocked = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static class EventSink
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ namespace Server
|
|||
|
||||
public class ExpansionInfo
|
||||
{
|
||||
public static ExpansionInfo CoreExpansion { get { return GetInfo(Core.Expansion); } }
|
||||
public static ExpansionInfo CoreExpansion => GetInfo(Core.Expansion);
|
||||
|
||||
public static ExpansionInfo[] Table { get; private set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -43,27 +43,15 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_X = value;
|
||||
}
|
||||
get => m_X;
|
||||
set => m_X = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Y = value;
|
||||
}
|
||||
get => m_Y;
|
||||
set => m_Y = value;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
|
@ -248,40 +236,22 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_X = value;
|
||||
}
|
||||
get => m_X;
|
||||
set => m_X = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Y = value;
|
||||
}
|
||||
get => m_Y;
|
||||
set => m_Y = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Z
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Z;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Z = value;
|
||||
}
|
||||
get => m_Z;
|
||||
set => m_Z = value;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
|
@ -430,79 +400,43 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Point2D Start
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Start;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Start = value;
|
||||
}
|
||||
get => m_Start;
|
||||
set => m_Start = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Point2D End
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_End;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_End = value;
|
||||
}
|
||||
get => m_End;
|
||||
set => m_End = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Start.m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Start.m_X = value;
|
||||
}
|
||||
get => m_Start.m_X;
|
||||
set => m_Start.m_X = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Start.m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Start.m_Y = value;
|
||||
}
|
||||
get => m_Start.m_Y;
|
||||
set => m_Start.m_Y = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_End.m_X - m_Start.m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_End.m_X = m_Start.m_X + value;
|
||||
}
|
||||
get => m_End.m_X - m_Start.m_X;
|
||||
set => m_End.m_X = m_Start.m_X + value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_End.m_Y - m_Start.m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_End.m_Y = m_Start.m_Y + value;
|
||||
}
|
||||
get => m_End.m_Y - m_Start.m_Y;
|
||||
set => m_End.m_Y = m_Start.m_Y + value;
|
||||
}
|
||||
|
||||
public void MakeHold( Rectangle2D r )
|
||||
|
|
@ -565,55 +499,25 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Point3D Start
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Start;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Start = value;
|
||||
}
|
||||
get => m_Start;
|
||||
set => m_Start = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Point3D End
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_End;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_End = value;
|
||||
}
|
||||
get => m_End;
|
||||
set => m_End = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_End.X - m_Start.X;
|
||||
}
|
||||
}
|
||||
public int Width => m_End.X - m_Start.X;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_End.Y - m_Start.Y;
|
||||
}
|
||||
}
|
||||
public int Height => m_End.Y - m_Start.Y;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Depth
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_End.Z - m_Start.Z;
|
||||
}
|
||||
}
|
||||
public int Depth => m_End.Z - m_Start.Z;
|
||||
|
||||
public bool Contains( Point3D p )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,15 +49,11 @@ namespace Server.Guilds
|
|||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Id { get { return m_Id; } }
|
||||
public int Id => m_Id;
|
||||
|
||||
int ISerializable.TypeReference {
|
||||
get { return 0; }
|
||||
}
|
||||
int ISerializable.TypeReference => 0;
|
||||
|
||||
int ISerializable.SerialIdentity {
|
||||
get { return m_Id; }
|
||||
}
|
||||
int ISerializable.SerialIdentity => m_Id;
|
||||
|
||||
public abstract void Deserialize( GenericReader reader );
|
||||
public abstract void Serialize( GenericWriter writer );
|
||||
|
|
@ -71,13 +67,7 @@ namespace Server.Guilds
|
|||
private static Dictionary<int, BaseGuild> m_GuildList = new Dictionary<int, BaseGuild>();
|
||||
private static int m_NextID = 1;
|
||||
|
||||
public static Dictionary<int, BaseGuild> List
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_GuildList;
|
||||
}
|
||||
}
|
||||
public static Dictionary<int, BaseGuild> List => m_GuildList;
|
||||
|
||||
public static BaseGuild Find( int id )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -70,25 +70,13 @@ namespace Server.Gumps
|
|||
// m_Strings.Clear();
|
||||
}
|
||||
|
||||
public int TypeID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_TypeID;
|
||||
}
|
||||
}
|
||||
public int TypeID => m_TypeID;
|
||||
|
||||
public List<GumpEntry> Entries
|
||||
{
|
||||
get{ return m_Entries; }
|
||||
}
|
||||
public List<GumpEntry> Entries => m_Entries;
|
||||
|
||||
public int Serial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Serial;
|
||||
}
|
||||
get => m_Serial;
|
||||
set
|
||||
{
|
||||
if ( m_Serial != value )
|
||||
|
|
@ -101,10 +89,7 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
get => m_X;
|
||||
set
|
||||
{
|
||||
if ( m_X != value )
|
||||
|
|
@ -117,10 +102,7 @@ namespace Server.Gumps
|
|||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
get => m_Y;
|
||||
set
|
||||
{
|
||||
if ( m_Y != value )
|
||||
|
|
@ -133,10 +115,7 @@ namespace Server.Gumps
|
|||
|
||||
public bool Disposable
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Disposable;
|
||||
}
|
||||
get => m_Disposable;
|
||||
set
|
||||
{
|
||||
if ( m_Disposable != value )
|
||||
|
|
@ -149,10 +128,7 @@ namespace Server.Gumps
|
|||
|
||||
public bool Resizable
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Resizable;
|
||||
}
|
||||
get => m_Resizable;
|
||||
set
|
||||
{
|
||||
if ( m_Resizable != value )
|
||||
|
|
@ -165,10 +141,7 @@ namespace Server.Gumps
|
|||
|
||||
public bool Dragable
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Dragable;
|
||||
}
|
||||
get => m_Dragable;
|
||||
set
|
||||
{
|
||||
if ( m_Dragable != value )
|
||||
|
|
@ -181,10 +154,7 @@ namespace Server.Gumps
|
|||
|
||||
public bool Closable
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Closable;
|
||||
}
|
||||
get => m_Closable;
|
||||
set
|
||||
{
|
||||
if ( m_Closable != value )
|
||||
|
|
|
|||
|
|
@ -30,50 +30,26 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Width;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Width, value );
|
||||
}
|
||||
get => m_Width;
|
||||
set => Delta( ref m_Width, value );
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Height;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Height, value );
|
||||
}
|
||||
get => m_Height;
|
||||
set => Delta( ref m_Height, value );
|
||||
}
|
||||
|
||||
public GumpAlphaRegion( int x, int y, int width, int height )
|
||||
|
|
|
|||
|
|
@ -31,62 +31,32 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Width;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Width, value );
|
||||
}
|
||||
get => m_Width;
|
||||
set => Delta( ref m_Width, value );
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Height;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Height, value );
|
||||
}
|
||||
get => m_Height;
|
||||
set => Delta( ref m_Height, value );
|
||||
}
|
||||
|
||||
public int GumpID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_GumpID;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_GumpID, value );
|
||||
}
|
||||
get => m_GumpID;
|
||||
set => Delta( ref m_GumpID, value );
|
||||
}
|
||||
|
||||
public GumpBackground( int x, int y, int width, int height, int gumpID )
|
||||
|
|
|
|||
|
|
@ -50,70 +50,37 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int NormalID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ID1;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_ID1, value );
|
||||
}
|
||||
get => m_ID1;
|
||||
set => Delta( ref m_ID1, value );
|
||||
}
|
||||
|
||||
public int PressedID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ID2;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_ID2, value );
|
||||
}
|
||||
get => m_ID2;
|
||||
set => Delta( ref m_ID2, value );
|
||||
}
|
||||
|
||||
public int ButtonID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ButtonID;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_ButtonID, value );
|
||||
}
|
||||
get => m_ButtonID;
|
||||
set => Delta( ref m_ButtonID, value );
|
||||
}
|
||||
|
||||
public GumpButtonType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Type;
|
||||
}
|
||||
get => m_Type;
|
||||
set
|
||||
{
|
||||
if ( m_Type != value )
|
||||
|
|
@ -132,14 +99,8 @@ namespace Server.Gumps
|
|||
|
||||
public int Param
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Param;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Param, value );
|
||||
}
|
||||
get => m_Param;
|
||||
set => Delta( ref m_Param, value );
|
||||
}
|
||||
|
||||
public override string Compile( NetState ns )
|
||||
|
|
|
|||
|
|
@ -32,74 +32,38 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int InactiveID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ID1;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_ID1, value );
|
||||
}
|
||||
get => m_ID1;
|
||||
set => Delta( ref m_ID1, value );
|
||||
}
|
||||
|
||||
public int ActiveID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ID2;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_ID2, value );
|
||||
}
|
||||
get => m_ID2;
|
||||
set => Delta( ref m_ID2, value );
|
||||
}
|
||||
|
||||
public bool InitialState
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_InitialState;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_InitialState, value );
|
||||
}
|
||||
get => m_InitialState;
|
||||
set => Delta( ref m_InitialState, value );
|
||||
}
|
||||
|
||||
public int SwitchID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SwitchID;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_SwitchID, value );
|
||||
}
|
||||
get => m_SwitchID;
|
||||
set => Delta( ref m_SwitchID, value );
|
||||
}
|
||||
|
||||
public GumpCheck( int x, int y, int inactiveID, int activeID, bool initialState, int switchID )
|
||||
|
|
|
|||
|
|
@ -64,10 +64,7 @@ namespace Server.Gumps
|
|||
|
||||
public Gump Parent
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Parent;
|
||||
}
|
||||
get => m_Parent;
|
||||
set
|
||||
{
|
||||
if ( m_Parent != value )
|
||||
|
|
|
|||
|
|
@ -34,14 +34,8 @@ namespace Server.Gumps
|
|||
|
||||
public int Group
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Group;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Group, value );
|
||||
}
|
||||
get => m_Group;
|
||||
set => Delta( ref m_Group, value );
|
||||
}
|
||||
|
||||
public override string Compile( NetState ns )
|
||||
|
|
|
|||
|
|
@ -32,86 +32,44 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Width;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Width, value );
|
||||
}
|
||||
get => m_Width;
|
||||
set => Delta( ref m_Width, value );
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Height;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Height, value );
|
||||
}
|
||||
get => m_Height;
|
||||
set => Delta( ref m_Height, value );
|
||||
}
|
||||
|
||||
public string Text
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Text, value );
|
||||
}
|
||||
get => m_Text;
|
||||
set => Delta( ref m_Text, value );
|
||||
}
|
||||
|
||||
public bool Background
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Background;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Background, value );
|
||||
}
|
||||
get => m_Background;
|
||||
set => Delta( ref m_Background, value );
|
||||
}
|
||||
|
||||
public bool Scrollbar
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Scrollbar;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Scrollbar, value );
|
||||
}
|
||||
get => m_Scrollbar;
|
||||
set => Delta( ref m_Scrollbar, value );
|
||||
}
|
||||
|
||||
public GumpHtml( int x, int y, int width, int height, string text, bool background, bool scrollbar )
|
||||
|
|
|
|||
|
|
@ -43,118 +43,61 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Width;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Width, value );
|
||||
}
|
||||
get => m_Width;
|
||||
set => Delta( ref m_Width, value );
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Height;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Height, value );
|
||||
}
|
||||
get => m_Height;
|
||||
set => Delta( ref m_Height, value );
|
||||
}
|
||||
|
||||
public int Number
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Number;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Number, value );
|
||||
}
|
||||
get => m_Number;
|
||||
set => Delta( ref m_Number, value );
|
||||
}
|
||||
|
||||
public string Args
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Args;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Args, value );
|
||||
}
|
||||
get => m_Args;
|
||||
set => Delta( ref m_Args, value );
|
||||
}
|
||||
|
||||
public int Color
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Color;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Color, value );
|
||||
}
|
||||
get => m_Color;
|
||||
set => Delta( ref m_Color, value );
|
||||
}
|
||||
|
||||
public bool Background
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Background;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Background, value );
|
||||
}
|
||||
get => m_Background;
|
||||
set => Delta( ref m_Background, value );
|
||||
}
|
||||
|
||||
public bool Scrollbar
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Scrollbar;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Scrollbar, value );
|
||||
}
|
||||
get => m_Scrollbar;
|
||||
set => Delta( ref m_Scrollbar, value );
|
||||
}
|
||||
|
||||
public GumpHtmlLocalizedType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Type;
|
||||
}
|
||||
get => m_Type;
|
||||
set
|
||||
{
|
||||
if ( m_Type != value )
|
||||
|
|
|
|||
|
|
@ -43,50 +43,26 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int GumpID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_GumpID;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_GumpID, value );
|
||||
}
|
||||
get => m_GumpID;
|
||||
set => Delta( ref m_GumpID, value );
|
||||
}
|
||||
|
||||
public int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Hue;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Hue, value );
|
||||
}
|
||||
get => m_Hue;
|
||||
set => Delta( ref m_Hue, value );
|
||||
}
|
||||
|
||||
public override string Compile( NetState ns )
|
||||
|
|
|
|||
|
|
@ -62,70 +62,37 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int NormalID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ID1;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_ID1, value );
|
||||
}
|
||||
get => m_ID1;
|
||||
set => Delta( ref m_ID1, value );
|
||||
}
|
||||
|
||||
public int PressedID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ID2;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_ID2, value );
|
||||
}
|
||||
get => m_ID2;
|
||||
set => Delta( ref m_ID2, value );
|
||||
}
|
||||
|
||||
public int ButtonID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ButtonID;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_ButtonID, value );
|
||||
}
|
||||
get => m_ButtonID;
|
||||
set => Delta( ref m_ButtonID, value );
|
||||
}
|
||||
|
||||
public GumpButtonType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Type;
|
||||
}
|
||||
get => m_Type;
|
||||
set
|
||||
{
|
||||
if ( m_Type != value )
|
||||
|
|
@ -144,74 +111,38 @@ namespace Server.Gumps
|
|||
|
||||
public int Param
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Param;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Param, value );
|
||||
}
|
||||
get => m_Param;
|
||||
set => Delta( ref m_Param, value );
|
||||
}
|
||||
|
||||
public int ItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ItemID;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_ItemID, value );
|
||||
}
|
||||
get => m_ItemID;
|
||||
set => Delta( ref m_ItemID, value );
|
||||
}
|
||||
|
||||
public int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Hue;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Hue, value );
|
||||
}
|
||||
get => m_Hue;
|
||||
set => Delta( ref m_Hue, value );
|
||||
}
|
||||
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Width;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Width, value );
|
||||
}
|
||||
get => m_Width;
|
||||
set => Delta( ref m_Width, value );
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Height;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Height, value );
|
||||
}
|
||||
get => m_Height;
|
||||
set => Delta( ref m_Height, value );
|
||||
}
|
||||
|
||||
public int LocalizedTooltip
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_LocalizedTooltip;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_LocalizedTooltip = value;
|
||||
}
|
||||
get => m_LocalizedTooltip;
|
||||
set => m_LocalizedTooltip = value;
|
||||
}
|
||||
|
||||
public override string Compile( NetState ns )
|
||||
|
|
|
|||
|
|
@ -40,62 +40,32 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Width;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Width, value );
|
||||
}
|
||||
get => m_Width;
|
||||
set => Delta( ref m_Width, value );
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Height;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Height, value );
|
||||
}
|
||||
get => m_Height;
|
||||
set => Delta( ref m_Height, value );
|
||||
}
|
||||
|
||||
public int GumpID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_GumpID;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_GumpID, value );
|
||||
}
|
||||
get => m_GumpID;
|
||||
set => Delta( ref m_GumpID, value );
|
||||
}
|
||||
|
||||
public override string Compile( NetState ns )
|
||||
|
|
|
|||
|
|
@ -43,50 +43,26 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int ItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ItemID;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_ItemID, value );
|
||||
}
|
||||
get => m_ItemID;
|
||||
set => Delta( ref m_ItemID, value );
|
||||
}
|
||||
|
||||
public int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Hue;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Hue, value );
|
||||
}
|
||||
get => m_Hue;
|
||||
set => Delta( ref m_Hue, value );
|
||||
}
|
||||
|
||||
public override string Compile( NetState ns )
|
||||
|
|
|
|||
|
|
@ -34,14 +34,8 @@ namespace Server.Gumps
|
|||
|
||||
public int Serial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Serial;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Serial, value );
|
||||
}
|
||||
get => m_Serial;
|
||||
set => Delta( ref m_Serial, value );
|
||||
}
|
||||
|
||||
public override string Compile( NetState ns )
|
||||
|
|
|
|||
|
|
@ -39,50 +39,26 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Hue;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Hue, value );
|
||||
}
|
||||
get => m_Hue;
|
||||
set => Delta( ref m_Hue, value );
|
||||
}
|
||||
|
||||
public string Text
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Text, value );
|
||||
}
|
||||
get => m_Text;
|
||||
set => Delta( ref m_Text, value );
|
||||
}
|
||||
|
||||
public override string Compile( NetState ns )
|
||||
|
|
|
|||
|
|
@ -32,74 +32,38 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Width;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Width, value );
|
||||
}
|
||||
get => m_Width;
|
||||
set => Delta( ref m_Width, value );
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Height;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Height, value );
|
||||
}
|
||||
get => m_Height;
|
||||
set => Delta( ref m_Height, value );
|
||||
}
|
||||
|
||||
public int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Hue;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Hue, value );
|
||||
}
|
||||
get => m_Hue;
|
||||
set => Delta( ref m_Hue, value );
|
||||
}
|
||||
|
||||
public string Text
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Text, value );
|
||||
}
|
||||
get => m_Text;
|
||||
set => Delta( ref m_Text, value );
|
||||
}
|
||||
|
||||
public GumpLabelCropped( int x, int y, int width, int height, int hue, string text )
|
||||
|
|
|
|||
|
|
@ -34,14 +34,8 @@ namespace Server.Gumps
|
|||
|
||||
public int Page
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Page;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Page, value );
|
||||
}
|
||||
get => m_Page;
|
||||
set => Delta( ref m_Page, value );
|
||||
}
|
||||
|
||||
public override string Compile( NetState ns )
|
||||
|
|
|
|||
|
|
@ -32,74 +32,38 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int InactiveID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ID1;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_ID1, value );
|
||||
}
|
||||
get => m_ID1;
|
||||
set => Delta( ref m_ID1, value );
|
||||
}
|
||||
|
||||
public int ActiveID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ID2;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_ID2, value );
|
||||
}
|
||||
get => m_ID2;
|
||||
set => Delta( ref m_ID2, value );
|
||||
}
|
||||
|
||||
public bool InitialState
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_InitialState;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_InitialState, value );
|
||||
}
|
||||
get => m_InitialState;
|
||||
set => Delta( ref m_InitialState, value );
|
||||
}
|
||||
|
||||
public int SwitchID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SwitchID;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_SwitchID, value );
|
||||
}
|
||||
get => m_SwitchID;
|
||||
set => Delta( ref m_SwitchID, value );
|
||||
}
|
||||
|
||||
public GumpRadio( int x, int y, int inactiveID, int activeID, bool initialState, int switchID )
|
||||
|
|
|
|||
|
|
@ -33,86 +33,44 @@ namespace Server.Gumps
|
|||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_X;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Width;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Width, value );
|
||||
}
|
||||
get => m_Width;
|
||||
set => Delta( ref m_Width, value );
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Height;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Height, value );
|
||||
}
|
||||
get => m_Height;
|
||||
set => Delta( ref m_Height, value );
|
||||
}
|
||||
|
||||
public int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Hue;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Hue, value );
|
||||
}
|
||||
get => m_Hue;
|
||||
set => Delta( ref m_Hue, value );
|
||||
}
|
||||
|
||||
public int EntryID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_EntryID;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_EntryID, value );
|
||||
}
|
||||
get => m_EntryID;
|
||||
set => Delta( ref m_EntryID, value );
|
||||
}
|
||||
|
||||
public string InitialText
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_InitialText;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_InitialText, value );
|
||||
}
|
||||
get => m_InitialText;
|
||||
set => Delta( ref m_InitialText, value );
|
||||
}
|
||||
|
||||
public GumpTextEntry( int x, int y, int width, int height, int hue, int entryID, string initialText )
|
||||
|
|
|
|||
|
|
@ -31,75 +31,43 @@ namespace Server.Gumps {
|
|||
private int m_Size;
|
||||
|
||||
public int X {
|
||||
get {
|
||||
return m_X;
|
||||
}
|
||||
set {
|
||||
Delta( ref m_X, value );
|
||||
}
|
||||
get => m_X;
|
||||
set => Delta( ref m_X, value );
|
||||
}
|
||||
|
||||
public int Y {
|
||||
get {
|
||||
return m_Y;
|
||||
}
|
||||
set {
|
||||
Delta( ref m_Y, value );
|
||||
}
|
||||
get => m_Y;
|
||||
set => Delta( ref m_Y, value );
|
||||
}
|
||||
|
||||
public int Width {
|
||||
get {
|
||||
return m_Width;
|
||||
}
|
||||
set {
|
||||
Delta( ref m_Width, value );
|
||||
}
|
||||
get => m_Width;
|
||||
set => Delta( ref m_Width, value );
|
||||
}
|
||||
|
||||
public int Height {
|
||||
get {
|
||||
return m_Height;
|
||||
}
|
||||
set {
|
||||
Delta( ref m_Height, value );
|
||||
}
|
||||
get => m_Height;
|
||||
set => Delta( ref m_Height, value );
|
||||
}
|
||||
|
||||
public int Hue {
|
||||
get {
|
||||
return m_Hue;
|
||||
}
|
||||
set {
|
||||
Delta( ref m_Hue, value );
|
||||
}
|
||||
get => m_Hue;
|
||||
set => Delta( ref m_Hue, value );
|
||||
}
|
||||
|
||||
public int EntryID {
|
||||
get {
|
||||
return m_EntryID;
|
||||
}
|
||||
set {
|
||||
Delta( ref m_EntryID, value );
|
||||
}
|
||||
get => m_EntryID;
|
||||
set => Delta( ref m_EntryID, value );
|
||||
}
|
||||
|
||||
public string InitialText {
|
||||
get {
|
||||
return m_InitialText;
|
||||
}
|
||||
set {
|
||||
Delta( ref m_InitialText, value );
|
||||
}
|
||||
get => m_InitialText;
|
||||
set => Delta( ref m_InitialText, value );
|
||||
}
|
||||
|
||||
public int Size {
|
||||
get {
|
||||
return m_Size;
|
||||
}
|
||||
set {
|
||||
Delta( ref m_Size, value );
|
||||
}
|
||||
get => m_Size;
|
||||
set => Delta( ref m_Size, value );
|
||||
}
|
||||
|
||||
public GumpTextEntryLimited( int x, int y, int width, int height, int hue, int entryID, string initialText, int size ) {
|
||||
|
|
|
|||
|
|
@ -34,14 +34,8 @@ namespace Server.Gumps
|
|||
|
||||
public int Number
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Number;
|
||||
}
|
||||
set
|
||||
{
|
||||
Delta( ref m_Number, value );
|
||||
}
|
||||
get => m_Number;
|
||||
set => Delta( ref m_Number, value );
|
||||
}
|
||||
|
||||
public override string Compile( NetState ns )
|
||||
|
|
|
|||
|
|
@ -31,21 +31,9 @@ namespace Server.Gumps
|
|||
m_Text = text;
|
||||
}
|
||||
|
||||
public int EntryID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_EntryID;
|
||||
}
|
||||
}
|
||||
public int EntryID => m_EntryID;
|
||||
|
||||
public string Text
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Text;
|
||||
}
|
||||
}
|
||||
public string Text => m_Text;
|
||||
}
|
||||
|
||||
public class RelayInfo
|
||||
|
|
@ -61,29 +49,11 @@ namespace Server.Gumps
|
|||
m_TextEntries = textEntries;
|
||||
}
|
||||
|
||||
public int ButtonID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ButtonID;
|
||||
}
|
||||
}
|
||||
public int ButtonID => m_ButtonID;
|
||||
|
||||
public int[] Switches
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Switches;
|
||||
}
|
||||
}
|
||||
public int[] Switches => m_Switches;
|
||||
|
||||
public TextRelay[] TextEntries
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_TextEntries;
|
||||
}
|
||||
}
|
||||
public TextRelay[] TextEntries => m_TextEntries;
|
||||
|
||||
public bool IsSwitched( int switchID )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,21 +29,9 @@ namespace Server.HuePickers
|
|||
private int m_Serial;
|
||||
private int m_ItemID;
|
||||
|
||||
public int Serial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Serial;
|
||||
}
|
||||
}
|
||||
public int Serial => m_Serial;
|
||||
|
||||
public int ItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ItemID;
|
||||
}
|
||||
}
|
||||
public int ItemID => m_ItemID;
|
||||
|
||||
public HuePicker( int itemID )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -70,41 +70,17 @@ namespace Server
|
|||
m_Deleted = false;
|
||||
}
|
||||
|
||||
public Serial Serial {
|
||||
get {
|
||||
return m_Serial;
|
||||
}
|
||||
}
|
||||
public Serial Serial => m_Serial;
|
||||
|
||||
public Point3D Location {
|
||||
get {
|
||||
return m_Location;
|
||||
}
|
||||
}
|
||||
public Point3D Location => m_Location;
|
||||
|
||||
public int X {
|
||||
get {
|
||||
return m_Location.X;
|
||||
}
|
||||
}
|
||||
public int X => m_Location.X;
|
||||
|
||||
public int Y {
|
||||
get {
|
||||
return m_Location.Y;
|
||||
}
|
||||
}
|
||||
public int Y => m_Location.Y;
|
||||
|
||||
public int Z {
|
||||
get {
|
||||
return m_Location.Z;
|
||||
}
|
||||
}
|
||||
public int Z => m_Location.Z;
|
||||
|
||||
public Map Map {
|
||||
get {
|
||||
return m_Map;
|
||||
}
|
||||
}
|
||||
public Map Map => m_Map;
|
||||
|
||||
public virtual void MoveToWorld(Point3D newLocation, Map map)
|
||||
{
|
||||
|
|
@ -112,11 +88,7 @@ namespace Server
|
|||
m_Map = map;
|
||||
}
|
||||
|
||||
public bool Deleted {
|
||||
get {
|
||||
return m_Deleted;
|
||||
}
|
||||
}
|
||||
public bool Deleted => m_Deleted;
|
||||
|
||||
public void Delete()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,10 +26,7 @@ namespace Server
|
|||
{
|
||||
private static IComparer m_Comparer = CaseInsensitiveComparer.Default;
|
||||
|
||||
public static IComparer Comparer
|
||||
{
|
||||
get{ return m_Comparer; }
|
||||
}
|
||||
public static IComparer Comparer => m_Comparer;
|
||||
|
||||
public static int Compare( string a, string b )
|
||||
{
|
||||
|
|
|
|||
230
Server/Item.cs
230
Server/Item.cs
|
|
@ -1438,15 +1438,12 @@ namespace Server
|
|||
/// <summary>
|
||||
/// Has the item been deleted?
|
||||
/// </summary>
|
||||
public bool Deleted{ get{ return GetFlag( ImplFlag.Deleted ); } }
|
||||
public bool Deleted => GetFlag( ImplFlag.Deleted );
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public LootType LootType
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_LootType;
|
||||
}
|
||||
get => m_LootType;
|
||||
set
|
||||
{
|
||||
if ( m_LootType != value )
|
||||
|
|
@ -1461,26 +1458,15 @@ namespace Server
|
|||
|
||||
private static TimeSpan m_DDT = TimeSpan.FromHours( 1.0 );
|
||||
|
||||
public static TimeSpan DefaultDecayTime{ get{ return m_DDT; } set{ m_DDT = value; } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual TimeSpan DecayTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_DDT;
|
||||
}
|
||||
public static TimeSpan DefaultDecayTime{ get => m_DDT;
|
||||
set => m_DDT = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual bool Decays
|
||||
{
|
||||
get
|
||||
{
|
||||
// TODO: Make item decay an option on the spawner
|
||||
return (Movable && Visible/* && Spawner == null*/);
|
||||
}
|
||||
}
|
||||
public virtual TimeSpan DecayTime => m_DDT;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual bool Decays => (Movable && Visible/* && Spawner == null*/);
|
||||
|
||||
public virtual bool OnDecay()
|
||||
{
|
||||
|
|
@ -1494,14 +1480,8 @@ namespace Server
|
|||
|
||||
public DateTime LastMoved
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_LastMovedTime;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_LastMovedTime = value;
|
||||
}
|
||||
get => m_LastMovedTime;
|
||||
set => m_LastMovedTime = value;
|
||||
}
|
||||
|
||||
public virtual bool CanStackWith( Item dropped )
|
||||
|
|
@ -1597,8 +1577,8 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Stackable
|
||||
{
|
||||
get{ return GetFlag( ImplFlag.Stackable ); }
|
||||
set{ SetFlag( ImplFlag.Stackable, value ); }
|
||||
get => GetFlag( ImplFlag.Stackable );
|
||||
set => SetFlag( ImplFlag.Stackable, value );
|
||||
}
|
||||
|
||||
private object _rpl = new object();
|
||||
|
|
@ -1807,7 +1787,7 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Visible
|
||||
{
|
||||
get{ return GetFlag( ImplFlag.Visible ); }
|
||||
get => GetFlag( ImplFlag.Visible );
|
||||
set
|
||||
{
|
||||
if ( GetFlag( ImplFlag.Visible ) != value )
|
||||
|
|
@ -1840,7 +1820,7 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Movable
|
||||
{
|
||||
get{ return GetFlag( ImplFlag.Movable ); }
|
||||
get => GetFlag( ImplFlag.Movable );
|
||||
set
|
||||
{
|
||||
if ( GetFlag( ImplFlag.Movable ) != value )
|
||||
|
|
@ -1852,7 +1832,7 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
public virtual bool ForceShowProperties{ get{ return false; } }
|
||||
public virtual bool ForceShowProperties => false;
|
||||
|
||||
public virtual int GetPacketFlags()
|
||||
{
|
||||
|
|
@ -1877,7 +1857,7 @@ namespace Server
|
|||
return true;
|
||||
}
|
||||
|
||||
public virtual bool HandlesOnMovement{ get{ return false; } }
|
||||
public virtual bool HandlesOnMovement => false;
|
||||
|
||||
public virtual void OnMovement( Mobile m, Point3D oldLocation )
|
||||
{
|
||||
|
|
@ -1903,10 +1883,7 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public Map Map
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Map;
|
||||
}
|
||||
get => m_Map;
|
||||
set
|
||||
{
|
||||
if ( m_Map != value )
|
||||
|
|
@ -1986,13 +1963,9 @@ namespace Server
|
|||
return ( (flags & toGet) != 0 );
|
||||
}
|
||||
|
||||
int ISerializable.TypeReference {
|
||||
get { return m_TypeRef; }
|
||||
}
|
||||
int ISerializable.TypeReference => m_TypeRef;
|
||||
|
||||
int ISerializable.SerialIdentity {
|
||||
get { return m_Serial; }
|
||||
}
|
||||
int ISerializable.SerialIdentity => m_Serial;
|
||||
|
||||
public virtual void Serialize( GenericWriter writer )
|
||||
{
|
||||
|
|
@ -2245,25 +2218,25 @@ namespace Server
|
|||
|
||||
public static int LockedDownFlag
|
||||
{
|
||||
get{ return m_LockedDownFlag; }
|
||||
set{ m_LockedDownFlag = value; }
|
||||
get => m_LockedDownFlag;
|
||||
set => m_LockedDownFlag = value;
|
||||
}
|
||||
|
||||
public static int SecureFlag
|
||||
{
|
||||
get{ return m_SecureFlag; }
|
||||
set{ m_SecureFlag = value; }
|
||||
get => m_SecureFlag;
|
||||
set => m_SecureFlag = value;
|
||||
}
|
||||
|
||||
public bool IsLockedDown
|
||||
{
|
||||
get{ return GetTempFlag( m_LockedDownFlag ); }
|
||||
get => GetTempFlag( m_LockedDownFlag );
|
||||
set{ SetTempFlag( m_LockedDownFlag, value ); InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public bool IsSecure
|
||||
{
|
||||
get{ return GetTempFlag( m_SecureFlag ); }
|
||||
get => GetTempFlag( m_SecureFlag );
|
||||
set{ SetTempFlag( m_SecureFlag, value ); InvalidateProperties(); }
|
||||
}
|
||||
|
||||
|
|
@ -2730,7 +2703,7 @@ namespace Server
|
|||
return this.WorldPacket;
|
||||
}
|
||||
|
||||
public virtual bool IsVirtualItem{ get{ return false; } }
|
||||
public virtual bool IsVirtualItem => false;
|
||||
|
||||
public virtual int GetTotal( TotalType type )
|
||||
{
|
||||
|
|
@ -2768,22 +2741,13 @@ namespace Server
|
|||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int TotalGold
|
||||
{
|
||||
get { return GetTotal( TotalType.Gold ); }
|
||||
}
|
||||
public int TotalGold => GetTotal( TotalType.Gold );
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int TotalItems
|
||||
{
|
||||
get { return GetTotal( TotalType.Items ); }
|
||||
}
|
||||
public int TotalItems => GetTotal( TotalType.Items );
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int TotalWeight
|
||||
{
|
||||
get { return GetTotal( TotalType.Weight ); }
|
||||
}
|
||||
public int TotalWeight => GetTotal( TotalType.Weight );
|
||||
|
||||
public virtual double DefaultWeight
|
||||
{
|
||||
|
|
@ -2836,29 +2800,14 @@ namespace Server
|
|||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public int PileWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)Math.Ceiling( this.Weight * this.Amount );
|
||||
}
|
||||
}
|
||||
public int PileWeight => (int)Math.Ceiling( this.Weight * this.Amount );
|
||||
|
||||
public virtual int HuedItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ItemID;
|
||||
}
|
||||
}
|
||||
public virtual int HuedItemID => m_ItemID;
|
||||
|
||||
[Hue, CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Hue;
|
||||
}
|
||||
get => m_Hue;
|
||||
set
|
||||
{
|
||||
if ( m_Hue != value )
|
||||
|
|
@ -2873,10 +2822,7 @@ namespace Server
|
|||
|
||||
public const int QuestItemHue = 0x4EA; // Hmmmm... "for EA"?
|
||||
|
||||
public virtual bool Nontransferable
|
||||
{
|
||||
get { return QuestItem; }
|
||||
}
|
||||
public virtual bool Nontransferable => QuestItem;
|
||||
|
||||
public virtual void HandleInvalidTransfer( Mobile from )
|
||||
{
|
||||
|
|
@ -2888,10 +2834,7 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual Layer Layer
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Layer;
|
||||
}
|
||||
get => m_Layer;
|
||||
set
|
||||
{
|
||||
if ( m_Layer != value )
|
||||
|
|
@ -3072,8 +3015,8 @@ namespace Server
|
|||
|
||||
public bool NoMoveHS
|
||||
{
|
||||
get { return m_NoMoveHS; }
|
||||
set { m_NoMoveHS = value; }
|
||||
get => m_NoMoveHS;
|
||||
set => m_NoMoveHS = value;
|
||||
}
|
||||
|
||||
public void ProcessDelta()
|
||||
|
|
@ -3513,20 +3456,14 @@ namespace Server
|
|||
{
|
||||
}
|
||||
|
||||
public virtual int PhysicalResistance{ get{ return 0; } }
|
||||
public virtual int FireResistance{ get{ return 0; } }
|
||||
public virtual int ColdResistance{ get{ return 0; } }
|
||||
public virtual int PoisonResistance{ get{ return 0; } }
|
||||
public virtual int EnergyResistance{ get{ return 0; } }
|
||||
public virtual int PhysicalResistance => 0;
|
||||
public virtual int FireResistance => 0;
|
||||
public virtual int ColdResistance => 0;
|
||||
public virtual int PoisonResistance => 0;
|
||||
public virtual int EnergyResistance => 0;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Serial Serial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Serial;
|
||||
}
|
||||
}
|
||||
public Serial Serial => m_Serial;
|
||||
|
||||
#region Location Location Location!
|
||||
|
||||
|
|
@ -3537,10 +3474,7 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public virtual Point3D Location
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location;
|
||||
}
|
||||
get => m_Location;
|
||||
set
|
||||
{
|
||||
Point3D oldLocation = m_Location;
|
||||
|
|
@ -3617,32 +3551,29 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public int X
|
||||
{
|
||||
get{ return m_Location.m_X; }
|
||||
set{ Location = new Point3D( value, m_Location.m_Y, m_Location.m_Z ); }
|
||||
get => m_Location.m_X;
|
||||
set => Location = new Point3D( value, m_Location.m_Y, m_Location.m_Z );
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public int Y
|
||||
{
|
||||
get{ return m_Location.m_Y; }
|
||||
set{ Location = new Point3D( m_Location.m_X, value, m_Location.m_Z ); }
|
||||
get => m_Location.m_Y;
|
||||
set => Location = new Point3D( m_Location.m_X, value, m_Location.m_Z );
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public int Z
|
||||
{
|
||||
get{ return m_Location.m_Z; }
|
||||
set{ Location = new Point3D( m_Location.m_X, m_Location.m_Y, value ); }
|
||||
get => m_Location.m_Z;
|
||||
set => Location = new Point3D( m_Location.m_X, m_Location.m_Y, value );
|
||||
}
|
||||
#endregion
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual int ItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ItemID;
|
||||
}
|
||||
get => m_ItemID;
|
||||
set
|
||||
{
|
||||
if ( m_ItemID != value )
|
||||
|
|
@ -3662,10 +3593,7 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
public virtual string DefaultName
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
public virtual string DefaultName => null;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string Name
|
||||
|
|
@ -3698,10 +3626,7 @@ namespace Server
|
|||
[CommandProperty(AccessLevel.GameMaster, AccessLevel.Developer)]
|
||||
public IEntity Parent
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Parent;
|
||||
}
|
||||
get => m_Parent;
|
||||
set
|
||||
{
|
||||
if ( m_Parent == value )
|
||||
|
|
@ -3724,10 +3649,7 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public LightType Light
|
||||
{
|
||||
get
|
||||
{
|
||||
return (LightType)m_Direction;
|
||||
}
|
||||
get => (LightType)m_Direction;
|
||||
set
|
||||
{
|
||||
if ( (LightType)m_Direction != value )
|
||||
|
|
@ -3743,10 +3665,7 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Direction Direction
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Direction;
|
||||
}
|
||||
get => m_Direction;
|
||||
set
|
||||
{
|
||||
if ( m_Direction != value )
|
||||
|
|
@ -3762,10 +3681,7 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Amount
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Amount;
|
||||
}
|
||||
get => m_Amount;
|
||||
set
|
||||
{
|
||||
int oldValue = m_Amount;
|
||||
|
|
@ -3798,7 +3714,7 @@ namespace Server
|
|||
{
|
||||
}
|
||||
|
||||
public virtual bool HandlesOnSpeech{ get{ return false; } }
|
||||
public virtual bool HandlesOnSpeech => false;
|
||||
|
||||
public virtual void OnSpeech( SpeechEventArgs e )
|
||||
{
|
||||
|
|
@ -4172,7 +4088,7 @@ namespace Server
|
|||
//return root == null ? m_Location : new Point3D( (IPoint3D) root );
|
||||
}
|
||||
|
||||
public virtual bool BlocksFit{ get{ return false; } }
|
||||
public virtual bool BlocksFit => false;
|
||||
|
||||
public Point3D GetSurfaceTop()
|
||||
{
|
||||
|
|
@ -4252,13 +4168,7 @@ namespace Server
|
|||
{
|
||||
}
|
||||
|
||||
public bool InSecureTrade
|
||||
{
|
||||
get
|
||||
{
|
||||
return ( GetSecureTradeCont() != null );
|
||||
}
|
||||
}
|
||||
public bool InSecureTrade => ( GetSecureTradeCont() != null );
|
||||
|
||||
public SecureTradeContainer GetSecureTradeCont()
|
||||
{
|
||||
|
|
@ -4381,13 +4291,7 @@ namespace Server
|
|||
return false;
|
||||
}
|
||||
|
||||
public ItemData ItemData
|
||||
{
|
||||
get
|
||||
{
|
||||
return TileData.ItemTable[m_ItemID & TileData.MaxItemValue];
|
||||
}
|
||||
}
|
||||
public ItemData ItemData => TileData.ItemTable[m_ItemID & TileData.MaxItemValue];
|
||||
|
||||
public virtual void OnItemUsed( Mobile from, Item item )
|
||||
{
|
||||
|
|
@ -4437,8 +4341,8 @@ namespace Server
|
|||
return true;
|
||||
}
|
||||
|
||||
public virtual bool CanTarget{ get{ return true; } }
|
||||
public virtual bool DisplayLootType{ get{ return true; } }
|
||||
public virtual bool CanTarget => true;
|
||||
public virtual bool DisplayLootType => true;
|
||||
|
||||
public virtual void OnSingleClickContained( Mobile from, Item item )
|
||||
{
|
||||
|
|
@ -4484,8 +4388,8 @@ namespace Server
|
|||
|
||||
public static bool ScissorCopyLootType
|
||||
{
|
||||
get{ return m_ScissorCopyLootType; }
|
||||
set{ m_ScissorCopyLootType = value; }
|
||||
get => m_ScissorCopyLootType;
|
||||
set => m_ScissorCopyLootType = value;
|
||||
}
|
||||
|
||||
public virtual void ScissorHelper( Mobile from, Item newItem, int amountPerOldItem )
|
||||
|
|
@ -4554,7 +4458,7 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool QuestItem
|
||||
{
|
||||
get { return GetFlag( ImplFlag.QuestItem ); }
|
||||
get => GetFlag( ImplFlag.QuestItem );
|
||||
set
|
||||
{
|
||||
SetFlag( ImplFlag.QuestItem, value );
|
||||
|
|
@ -4569,14 +4473,14 @@ namespace Server
|
|||
|
||||
public bool Insured
|
||||
{
|
||||
get{ return GetFlag( ImplFlag.Insured ); }
|
||||
get => GetFlag( ImplFlag.Insured );
|
||||
set{ SetFlag( ImplFlag.Insured, value ); InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public bool PaidInsurance
|
||||
{
|
||||
get{ return GetFlag( ImplFlag.PaidInsurance ); }
|
||||
set{ SetFlag( ImplFlag.PaidInsurance, value ); }
|
||||
get => GetFlag( ImplFlag.PaidInsurance );
|
||||
set => SetFlag( ImplFlag.PaidInsurance, value );
|
||||
}
|
||||
|
||||
public Mobile BlessedFor
|
||||
|
|
|
|||
|
|
@ -27,13 +27,7 @@ namespace Server
|
|||
{
|
||||
private static Rectangle2D[] m_Bounds;
|
||||
|
||||
public static Rectangle2D[] Table
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Bounds;
|
||||
}
|
||||
}
|
||||
public static Rectangle2D[] Table => m_Bounds;
|
||||
|
||||
static ItemBounds()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,9 +36,7 @@ namespace Server.Items
|
|||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public override int ItemID {
|
||||
get {
|
||||
return base.ItemID;
|
||||
}
|
||||
get => base.ItemID;
|
||||
set {
|
||||
if ( base.ItemID != value ) {
|
||||
Map facet = ( this.Parent == null ? this.Map : null );
|
||||
|
|
@ -88,10 +86,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public virtual bool AllowsRelativeDrop
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
public virtual bool AllowsRelativeDrop => false;
|
||||
|
||||
public override int GetMaxUpdateRange()
|
||||
{
|
||||
|
|
@ -103,13 +98,7 @@ namespace Server.Items
|
|||
return 22;
|
||||
}
|
||||
|
||||
public virtual MultiComponentList Components
|
||||
{
|
||||
get
|
||||
{
|
||||
return MultiData.GetComponents( ItemID );
|
||||
}
|
||||
}
|
||||
public virtual MultiComponentList Components => MultiData.GetComponents( ItemID );
|
||||
|
||||
public virtual bool Contains( Point2D p )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ namespace Server.Items
|
|||
|
||||
public static ContainerSnoopHandler SnoopHandler
|
||||
{
|
||||
get{ return m_SnoopHandler; }
|
||||
set{ m_SnoopHandler = value; }
|
||||
get => m_SnoopHandler;
|
||||
set => m_SnoopHandler = value;
|
||||
}
|
||||
|
||||
private ContainerData m_ContainerData;
|
||||
|
|
@ -64,13 +64,13 @@ namespace Server.Items
|
|||
|
||||
return m_ContainerData;
|
||||
}
|
||||
set{ m_ContainerData = value; }
|
||||
set => m_ContainerData = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public override int ItemID
|
||||
{
|
||||
get{ return base.ItemID; }
|
||||
get => base.ItemID;
|
||||
set
|
||||
{
|
||||
int oldID = this.ItemID;
|
||||
|
|
@ -85,21 +85,21 @@ namespace Server.Items
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int GumpID
|
||||
{
|
||||
get{ return ( m_GumpID == -1 ? DefaultGumpID : m_GumpID ); }
|
||||
set{ m_GumpID = value; }
|
||||
get => ( m_GumpID == -1 ? DefaultGumpID : m_GumpID );
|
||||
set => m_GumpID = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int DropSound
|
||||
{
|
||||
get{ return ( m_DropSound == -1 ? DefaultDropSound : m_DropSound ); }
|
||||
set{ m_DropSound = value; }
|
||||
get => ( m_DropSound == -1 ? DefaultDropSound : m_DropSound );
|
||||
set => m_DropSound = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int MaxItems
|
||||
{
|
||||
get{ return ( m_MaxItems == -1 ? DefaultMaxItems : m_MaxItems ); }
|
||||
get => ( m_MaxItems == -1 ? DefaultMaxItems : m_MaxItems );
|
||||
set{ m_MaxItems = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
|
|
@ -120,8 +120,8 @@ namespace Server.Items
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool LiftOverride
|
||||
{
|
||||
get{ return m_LiftOverride; }
|
||||
set{ m_LiftOverride = value; }
|
||||
get => m_LiftOverride;
|
||||
set => m_LiftOverride = value;
|
||||
}
|
||||
|
||||
public virtual void UpdateContainerData()
|
||||
|
|
@ -129,19 +129,18 @@ namespace Server.Items
|
|||
this.ContainerData = ContainerData.GetData( this.ItemID );
|
||||
}
|
||||
|
||||
public virtual Rectangle2D Bounds{ get{ return ContainerData.Bounds; } }
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual int DefaultGumpID{ get{ return ContainerData.GumpID; } }
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual int DefaultDropSound{ get{ return ContainerData.DropSound; } }
|
||||
public virtual Rectangle2D Bounds => ContainerData.Bounds;
|
||||
|
||||
public virtual int DefaultMaxItems{ get{ return m_GlobalMaxItems; } }
|
||||
public virtual int DefaultMaxWeight{ get{ return m_GlobalMaxWeight; } }
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual int DefaultGumpID => ContainerData.GumpID;
|
||||
|
||||
public virtual bool IsDecoContainer
|
||||
{
|
||||
get{ return !Movable && !IsLockedDown && !IsSecure && Parent == null && !m_LiftOverride; }
|
||||
}
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual int DefaultDropSound => ContainerData.DropSound;
|
||||
|
||||
public virtual int DefaultMaxItems => m_GlobalMaxItems;
|
||||
public virtual int DefaultMaxWeight => m_GlobalMaxWeight;
|
||||
|
||||
public virtual bool IsDecoContainer => !Movable && !IsLockedDown && !IsSecure && Parent == null && !m_LiftOverride;
|
||||
|
||||
public virtual int GetDroppedSound( Item item )
|
||||
{
|
||||
|
|
@ -1377,8 +1376,12 @@ namespace Server.Items
|
|||
private static int m_GlobalMaxItems = 125;
|
||||
private static int m_GlobalMaxWeight = 400;
|
||||
|
||||
public static int GlobalMaxItems{ get{ return m_GlobalMaxItems; } set{ m_GlobalMaxItems = value; } }
|
||||
public static int GlobalMaxWeight{ get{ return m_GlobalMaxWeight; } set{ m_GlobalMaxWeight = value; } }
|
||||
public static int GlobalMaxItems{ get => m_GlobalMaxItems;
|
||||
set => m_GlobalMaxItems = value;
|
||||
}
|
||||
public static int GlobalMaxWeight{ get => m_GlobalMaxWeight;
|
||||
set => m_GlobalMaxWeight = value;
|
||||
}
|
||||
|
||||
public Container( int itemID ) : base( itemID )
|
||||
{
|
||||
|
|
@ -1644,7 +1647,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public virtual bool DisplaysContent{ get{ return true; } }
|
||||
public virtual bool DisplaysContent => true;
|
||||
|
||||
public virtual bool CheckContentDisplay( Mobile from )
|
||||
{
|
||||
|
|
@ -1672,11 +1675,11 @@ namespace Server.Items
|
|||
|
||||
public List<Mobile> Openers
|
||||
{
|
||||
get{ return m_Openers; }
|
||||
set{ m_Openers = value; }
|
||||
get => m_Openers;
|
||||
set => m_Openers = value;
|
||||
}
|
||||
|
||||
public virtual bool IsPublicContainer{ get{ return false; } }
|
||||
public virtual bool IsPublicContainer => false;
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
|
|
@ -1872,8 +1875,8 @@ namespace Server.Items
|
|||
|
||||
public static ContainerData Default
|
||||
{
|
||||
get{ return m_Default; }
|
||||
set{ m_Default = value; }
|
||||
get => m_Default;
|
||||
set => m_Default = value;
|
||||
}
|
||||
|
||||
public static ContainerData GetData( int itemID )
|
||||
|
|
@ -1891,9 +1894,9 @@ namespace Server.Items
|
|||
private Rectangle2D m_Bounds;
|
||||
private int m_DropSound;
|
||||
|
||||
public int GumpID{ get{ return m_GumpID; } }
|
||||
public Rectangle2D Bounds{ get{ return m_Bounds; } }
|
||||
public int DropSound{ get{ return m_DropSound; } }
|
||||
public int GumpID => m_GumpID;
|
||||
public Rectangle2D Bounds => m_Bounds;
|
||||
public int DropSound => m_DropSound;
|
||||
|
||||
public ContainerData( int gumpID, Rectangle2D bounds, int dropSound )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,38 +30,17 @@ namespace Server.Items
|
|||
private Mobile m_Owner;
|
||||
private bool m_Open;
|
||||
|
||||
public override int DefaultMaxWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
public override int DefaultMaxWeight => 0;
|
||||
|
||||
public override bool IsVirtualItem
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
public override bool IsVirtualItem => true;
|
||||
|
||||
public BankBox( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public Mobile Owner
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Owner;
|
||||
}
|
||||
}
|
||||
public Mobile Owner => m_Owner;
|
||||
|
||||
public bool Opened
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Open;
|
||||
}
|
||||
}
|
||||
public bool Opened => m_Open;
|
||||
|
||||
public void Open()
|
||||
{
|
||||
|
|
@ -111,7 +90,9 @@ namespace Server.Items
|
|||
|
||||
private static bool m_SendRemovePacket;
|
||||
|
||||
public static bool SendDeleteOnClose{ get{ return m_SendRemovePacket; } set{ m_SendRemovePacket = value; } }
|
||||
public static bool SendDeleteOnClose{ get => m_SendRemovePacket;
|
||||
set => m_SendRemovePacket = value;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,13 +27,7 @@ namespace Server.Items
|
|||
{
|
||||
private SecureTrade m_Trade;
|
||||
|
||||
public SecureTrade Trade
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Trade;
|
||||
}
|
||||
}
|
||||
public SecureTrade Trade => m_Trade;
|
||||
|
||||
public SecureTradeContainer( SecureTrade trade ) : base( 0x1E5E )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Server
|
|||
[CommandProperty(AccessLevel.Administrator)]
|
||||
public int Plat
|
||||
{
|
||||
get { return _Plat; }
|
||||
get => _Plat;
|
||||
set
|
||||
{
|
||||
_Plat = value;
|
||||
|
|
@ -46,7 +46,7 @@ namespace Server
|
|||
[CommandProperty(AccessLevel.Administrator)]
|
||||
public int Gold
|
||||
{
|
||||
get { return _Gold; }
|
||||
get => _Gold;
|
||||
set
|
||||
{
|
||||
_Gold = value;
|
||||
|
|
|
|||
|
|
@ -28,10 +28,14 @@ namespace Server
|
|||
private int m_Hue;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int ItemID { get { return m_ItemID; } set { m_ItemID = value; } }
|
||||
public int ItemID { get => m_ItemID;
|
||||
set => m_ItemID = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Hue { get { return m_Hue; } set { m_Hue = value; } }
|
||||
public int Hue { get => m_Hue;
|
||||
set => m_Hue = value;
|
||||
}
|
||||
|
||||
protected BaseHairInfo( int itemid )
|
||||
: this( itemid, 0 )
|
||||
|
|
|
|||
|
|
@ -31,13 +31,7 @@ namespace Server
|
|||
m_Count = 0;
|
||||
}
|
||||
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Count;
|
||||
}
|
||||
}
|
||||
public int Count => m_Count;
|
||||
|
||||
public bool Contains( int keyword )
|
||||
{
|
||||
|
|
|
|||
115
Server/Main.cs
115
Server/Main.cs
|
|
@ -62,15 +62,15 @@ namespace Server
|
|||
|
||||
public static MessagePump MessagePump
|
||||
{
|
||||
get { return m_MessagePump; }
|
||||
set { m_MessagePump = value; }
|
||||
get => m_MessagePump;
|
||||
set => m_MessagePump = value;
|
||||
}
|
||||
|
||||
public static Slice Slice;
|
||||
|
||||
public static bool Profiling
|
||||
{
|
||||
get { return m_Profiling; }
|
||||
get => m_Profiling;
|
||||
set
|
||||
{
|
||||
if ( m_Profiling == value )
|
||||
|
|
@ -96,16 +96,18 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
public static bool Service { get { return m_Service; } }
|
||||
public static bool Debug { get { return m_Debug; } }
|
||||
internal static bool HaltOnWarning { get { return m_HaltOnWarning; } }
|
||||
internal static bool VBdotNet { get { return m_VBdotNET; } }
|
||||
public static List<string> DataDirectories { get { return m_DataDirectories; } }
|
||||
public static Assembly Assembly { get { return m_Assembly; } set { m_Assembly = value; } }
|
||||
public static Version Version { get { return m_Assembly.GetName().Version; } }
|
||||
public static Process Process { get { return m_Process; } }
|
||||
public static Thread Thread { get { return m_Thread; } }
|
||||
public static MultiTextWriter MultiConsoleOut { get { return m_MultiConOut; } }
|
||||
public static bool Service => m_Service;
|
||||
public static bool Debug => m_Debug;
|
||||
internal static bool HaltOnWarning => m_HaltOnWarning;
|
||||
internal static bool VBdotNet => m_VBdotNET;
|
||||
public static List<string> DataDirectories => m_DataDirectories;
|
||||
public static Assembly Assembly { get => m_Assembly;
|
||||
set => m_Assembly = value;
|
||||
}
|
||||
public static Version Version => m_Assembly.GetName().Version;
|
||||
public static Process Process => m_Process;
|
||||
public static Thread Thread => m_Thread;
|
||||
public static MultiTextWriter MultiConsoleOut => m_MultiConOut;
|
||||
|
||||
/*
|
||||
* DateTime.Now and DateTime.UtcNow are based on actual system clock time.
|
||||
|
|
@ -125,9 +127,9 @@ namespace Server
|
|||
|
||||
private static bool _UseHRT;
|
||||
|
||||
public static bool UsingHighResolutionTiming { get { return _UseHRT && _HighRes && !Unix; } }
|
||||
public static bool UsingHighResolutionTiming => _UseHRT && _HighRes && !Unix;
|
||||
|
||||
public static long TickCount { get { return (long)Ticks; } }
|
||||
public static long TickCount => (long)Ticks;
|
||||
|
||||
public static double Ticks
|
||||
{
|
||||
|
|
@ -147,12 +149,12 @@ namespace Server
|
|||
private static bool m_MultiProcessor;
|
||||
private static int m_ProcessorCount;
|
||||
|
||||
public static bool MultiProcessor { get { return m_MultiProcessor; } }
|
||||
public static int ProcessorCount { get { return m_ProcessorCount; } }
|
||||
public static bool MultiProcessor => m_MultiProcessor;
|
||||
public static int ProcessorCount => m_ProcessorCount;
|
||||
|
||||
private static bool m_Unix;
|
||||
|
||||
public static bool Unix { get { return m_Unix; } }
|
||||
public static bool Unix => m_Unix;
|
||||
|
||||
public static string FindDataFile( string path )
|
||||
{
|
||||
|
|
@ -184,66 +186,33 @@ namespace Server
|
|||
private static Expansion m_Expansion;
|
||||
public static Expansion Expansion
|
||||
{
|
||||
get { return m_Expansion; }
|
||||
set { m_Expansion = value; }
|
||||
get => m_Expansion;
|
||||
set => m_Expansion = value;
|
||||
}
|
||||
|
||||
public static bool T2A
|
||||
{
|
||||
get { return m_Expansion >= Expansion.T2A; }
|
||||
}
|
||||
public static bool T2A => m_Expansion >= Expansion.T2A;
|
||||
|
||||
public static bool UOR
|
||||
{
|
||||
get { return m_Expansion >= Expansion.UOR; }
|
||||
}
|
||||
public static bool UOR => m_Expansion >= Expansion.UOR;
|
||||
|
||||
public static bool UOTD
|
||||
{
|
||||
get { return m_Expansion >= Expansion.UOTD; }
|
||||
}
|
||||
public static bool UOTD => m_Expansion >= Expansion.UOTD;
|
||||
|
||||
public static bool LBR
|
||||
{
|
||||
get { return m_Expansion >= Expansion.LBR; }
|
||||
}
|
||||
public static bool LBR => m_Expansion >= Expansion.LBR;
|
||||
|
||||
public static bool AOS
|
||||
{
|
||||
get { return m_Expansion >= Expansion.AOS; }
|
||||
}
|
||||
public static bool AOS => m_Expansion >= Expansion.AOS;
|
||||
|
||||
public static bool SE
|
||||
{
|
||||
get { return m_Expansion >= Expansion.SE; }
|
||||
}
|
||||
public static bool SE => m_Expansion >= Expansion.SE;
|
||||
|
||||
public static bool ML
|
||||
{
|
||||
get { return m_Expansion >= Expansion.ML; }
|
||||
}
|
||||
public static bool ML => m_Expansion >= Expansion.ML;
|
||||
|
||||
public static bool SA
|
||||
{
|
||||
get { return m_Expansion >= Expansion.SA; }
|
||||
}
|
||||
public static bool SA => m_Expansion >= Expansion.SA;
|
||||
|
||||
public static bool HS
|
||||
{
|
||||
get { return m_Expansion >= Expansion.HS; }
|
||||
}
|
||||
public static bool HS => m_Expansion >= Expansion.HS;
|
||||
|
||||
public static bool TOL
|
||||
{
|
||||
get { return m_Expansion >= Expansion.TOL; }
|
||||
}
|
||||
public static bool TOL => m_Expansion >= Expansion.TOL;
|
||||
|
||||
#endregion
|
||||
|
||||
public static string ExePath
|
||||
{
|
||||
get { return m_ExePath ?? (m_ExePath = Assembly.Location); }
|
||||
}
|
||||
public static string ExePath => m_ExePath ?? (m_ExePath = Assembly.Location);
|
||||
|
||||
public static string BaseDirectory
|
||||
{
|
||||
|
|
@ -345,14 +314,14 @@ namespace Server
|
|||
}
|
||||
|
||||
private static bool m_Closing;
|
||||
public static bool Closing { get { return m_Closing; } }
|
||||
public static bool Closing => m_Closing;
|
||||
|
||||
private static int m_CycleIndex = 1;
|
||||
private static readonly float[] m_CyclesPerSecond = new float[100];
|
||||
|
||||
public static float CyclesPerSecond { get { return m_CyclesPerSecond[(m_CycleIndex - 1) % m_CyclesPerSecond.Length]; } }
|
||||
public static float CyclesPerSecond => m_CyclesPerSecond[(m_CycleIndex - 1) % m_CyclesPerSecond.Length];
|
||||
|
||||
public static float AverageCPS { get { return m_CyclesPerSecond.Take(m_CycleIndex).Average(); } }
|
||||
public static float AverageCPS => m_CyclesPerSecond.Take(m_CycleIndex).Average();
|
||||
|
||||
public static void Kill()
|
||||
{
|
||||
|
|
@ -594,22 +563,22 @@ namespace Server
|
|||
|
||||
public static int GlobalUpdateRange
|
||||
{
|
||||
get { return m_GlobalUpdateRange; }
|
||||
set { m_GlobalUpdateRange = value; }
|
||||
get => m_GlobalUpdateRange;
|
||||
set => m_GlobalUpdateRange = value;
|
||||
}
|
||||
|
||||
private static int m_GlobalMaxUpdateRange = 24;
|
||||
|
||||
public static int GlobalMaxUpdateRange
|
||||
{
|
||||
get { return m_GlobalMaxUpdateRange; }
|
||||
set { m_GlobalMaxUpdateRange = value; }
|
||||
get => m_GlobalMaxUpdateRange;
|
||||
set => m_GlobalMaxUpdateRange = value;
|
||||
}
|
||||
|
||||
private static int m_ItemCount, m_MobileCount;
|
||||
|
||||
public static int ScriptItems { get { return m_ItemCount; } }
|
||||
public static int ScriptMobiles { get { return m_MobileCount; } }
|
||||
public static int ScriptItems => m_ItemCount;
|
||||
public static int ScriptMobiles => m_MobileCount;
|
||||
|
||||
public static void VerifySerialization()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -315,7 +315,9 @@ namespace Server
|
|||
private Dictionary<string, Region> m_Regions;
|
||||
private Region m_DefaultRegion;
|
||||
|
||||
public int Season { get { return m_Season; } set { m_Season = value; } }
|
||||
public int Season { get => m_Season;
|
||||
set => m_Season = value;
|
||||
}
|
||||
|
||||
private string m_Name;
|
||||
private MapRules m_Rules;
|
||||
|
|
@ -1171,22 +1173,13 @@ namespace Server
|
|||
|
||||
return m_DefaultRegion;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_DefaultRegion = value;
|
||||
}
|
||||
set => m_DefaultRegion = value;
|
||||
}
|
||||
|
||||
public MapRules Rules
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Rules;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Rules = value;
|
||||
}
|
||||
get => m_Rules;
|
||||
set => m_Rules = value;
|
||||
}
|
||||
|
||||
public Sector InvalidSector => m_InvalidSector;
|
||||
|
|
@ -1360,8 +1353,8 @@ namespace Server
|
|||
|
||||
public static int MaxLOSDistance
|
||||
{
|
||||
get { return m_MaxLOSDistance; }
|
||||
set { m_MaxLOSDistance = value; }
|
||||
get => m_MaxLOSDistance;
|
||||
set => m_MaxLOSDistance = value;
|
||||
}
|
||||
|
||||
public bool LineOfSight( Point3D org, Point3D dest )
|
||||
|
|
@ -1621,8 +1614,8 @@ namespace Server
|
|||
|
||||
public static int[] InvalidLandTiles
|
||||
{
|
||||
get { return m_InvalidLandTiles; }
|
||||
set { m_InvalidLandTiles = value; }
|
||||
get => m_InvalidLandTiles;
|
||||
set => m_InvalidLandTiles = value;
|
||||
}
|
||||
|
||||
public int CompareTo( Map other )
|
||||
|
|
|
|||
|
|
@ -28,29 +28,11 @@ namespace Server.Menus.ItemLists
|
|||
private int m_ItemID;
|
||||
private int m_Hue;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
}
|
||||
public string Name => m_Name;
|
||||
|
||||
public int ItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ItemID;
|
||||
}
|
||||
}
|
||||
public int ItemID => m_ItemID;
|
||||
|
||||
public int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Hue;
|
||||
}
|
||||
}
|
||||
public int Hue => m_Hue;
|
||||
|
||||
public ItemListEntry( string name, int itemID ) : this( name, itemID, 0 )
|
||||
{
|
||||
|
|
@ -72,40 +54,16 @@ namespace Server.Menus.ItemLists
|
|||
private int m_Serial;
|
||||
private static int m_NextSerial;
|
||||
|
||||
int IMenu.Serial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Serial;
|
||||
}
|
||||
}
|
||||
int IMenu.Serial => m_Serial;
|
||||
|
||||
int IMenu.EntryLength
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Entries.Length;
|
||||
}
|
||||
}
|
||||
int IMenu.EntryLength => m_Entries.Length;
|
||||
|
||||
public string Question
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Question;
|
||||
}
|
||||
}
|
||||
public string Question => m_Question;
|
||||
|
||||
public ItemListEntry[] Entries
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Entries;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Entries = value;
|
||||
}
|
||||
get => m_Entries;
|
||||
set => m_Entries = value;
|
||||
}
|
||||
|
||||
public ItemListMenu( string question, ItemListEntry[] entries )
|
||||
|
|
|
|||
|
|
@ -30,41 +30,17 @@ namespace Server.Menus.Questions
|
|||
private int m_Serial;
|
||||
private static int m_NextSerial;
|
||||
|
||||
int IMenu.Serial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Serial;
|
||||
}
|
||||
}
|
||||
int IMenu.Serial => m_Serial;
|
||||
|
||||
int IMenu.EntryLength
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Answers.Length;
|
||||
}
|
||||
}
|
||||
int IMenu.EntryLength => m_Answers.Length;
|
||||
|
||||
public string Question
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Question;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Question = value;
|
||||
}
|
||||
get => m_Question;
|
||||
set => m_Question = value;
|
||||
}
|
||||
|
||||
public string[] Answers
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Answers;
|
||||
}
|
||||
}
|
||||
public string[] Answers => m_Answers;
|
||||
|
||||
public QuestionMenu( string question, string[] answers )
|
||||
{
|
||||
|
|
|
|||
1254
Server/Mobile.cs
1254
Server/Mobile.cs
File diff suppressed because it is too large
Load diff
|
|
@ -26,8 +26,8 @@ namespace Server.Movement
|
|||
|
||||
public static IMovementImpl Impl
|
||||
{
|
||||
get{ return m_Impl; }
|
||||
set{ m_Impl = value; }
|
||||
get => m_Impl;
|
||||
set => m_Impl = value;
|
||||
}
|
||||
|
||||
public static bool CheckMovement( Mobile m, Direction d, out int newZ )
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@ namespace Server
|
|||
public sealed class MultiComponentList
|
||||
{
|
||||
public static bool PostHSFormat {
|
||||
get { return _PostHSFormat; }
|
||||
set { _PostHSFormat = value; }
|
||||
get => _PostHSFormat;
|
||||
set => _PostHSFormat = value;
|
||||
}
|
||||
|
||||
private static bool _PostHSFormat = false;
|
||||
|
|
@ -159,16 +159,16 @@ namespace Server
|
|||
|
||||
public static readonly MultiComponentList Empty = new MultiComponentList();
|
||||
|
||||
public Point2D Min{ get{ return m_Min; } }
|
||||
public Point2D Max{ get{ return m_Max; } }
|
||||
public Point2D Min => m_Min;
|
||||
public Point2D Max => m_Max;
|
||||
|
||||
public Point2D Center{ get{ return m_Center; } }
|
||||
public Point2D Center => m_Center;
|
||||
|
||||
public int Width{ get{ return m_Width; } }
|
||||
public int Height{ get{ return m_Height; } }
|
||||
public int Width => m_Width;
|
||||
public int Height => m_Height;
|
||||
|
||||
public StaticTile[][][] Tiles{ get{ return m_Tiles; } }
|
||||
public MultiTileEntry[] List{ get{ return m_List; } }
|
||||
public StaticTile[][][] Tiles => m_Tiles;
|
||||
public MultiTileEntry[] List => m_List;
|
||||
|
||||
public void Add( int itemID, int x, int y, int z )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,9 @@ namespace Server.Network
|
|||
{
|
||||
private static List<BufferPool> m_Pools = new List<BufferPool>();
|
||||
|
||||
public static List<BufferPool> Pools{ get{ return m_Pools; } set{ m_Pools = value; } }
|
||||
public static List<BufferPool> Pools{ get => m_Pools;
|
||||
set => m_Pools = value;
|
||||
}
|
||||
|
||||
private string m_Name;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace Server.Network
|
|||
|
||||
private byte[] m_Buffer;
|
||||
|
||||
public int Length{ get{ return m_Size; } }
|
||||
public int Length => m_Size;
|
||||
|
||||
public ByteQueue()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -243,11 +243,7 @@ namespace Server.Network {
|
|||
public Compressor32() {
|
||||
}
|
||||
|
||||
public string Version {
|
||||
get {
|
||||
return SafeNativeMethods.zlibVersion();
|
||||
}
|
||||
}
|
||||
public string Version => SafeNativeMethods.zlibVersion();
|
||||
|
||||
public ZLibError Compress( byte[] dest, ref int destLength, byte[] source, int sourceLength ) {
|
||||
return SafeNativeMethods.compress(dest, ref destLength, source, sourceLength);
|
||||
|
|
@ -280,11 +276,7 @@ namespace Server.Network {
|
|||
public Compressor64() {
|
||||
}
|
||||
|
||||
public string Version {
|
||||
get {
|
||||
return SafeNativeMethods.zlibVersion();
|
||||
}
|
||||
}
|
||||
public string Version => SafeNativeMethods.zlibVersion();
|
||||
|
||||
public ZLibError Compress( byte[] dest, ref int destLength, byte[] source, int sourceLength ) {
|
||||
return SafeNativeMethods.compress(dest, ref destLength, source, sourceLength);
|
||||
|
|
@ -317,11 +309,7 @@ namespace Server.Network {
|
|||
public CompressorUnix32() {
|
||||
}
|
||||
|
||||
public string Version {
|
||||
get {
|
||||
return SafeNativeMethods.zlibVersion();
|
||||
}
|
||||
}
|
||||
public string Version => SafeNativeMethods.zlibVersion();
|
||||
|
||||
public ZLibError Compress( byte[] dest, ref int destLength, byte[] source, int sourceLength ) {
|
||||
return SafeNativeMethods.compress(dest, ref destLength, source, sourceLength);
|
||||
|
|
@ -354,11 +342,7 @@ namespace Server.Network {
|
|||
public CompressorUnix64() {
|
||||
}
|
||||
|
||||
public string Version {
|
||||
get {
|
||||
return SafeNativeMethods.zlibVersion();
|
||||
}
|
||||
}
|
||||
public string Version => SafeNativeMethods.zlibVersion();
|
||||
|
||||
public ZLibError Compress( byte[] dest, ref int destLength, byte[] source, int sourceLength ) {
|
||||
ulong destLengthLong = (ulong)destLength;
|
||||
|
|
|
|||
|
|
@ -35,28 +35,10 @@ namespace Server.Network
|
|||
m_OnReceive = onReceive;
|
||||
}
|
||||
|
||||
public int PacketID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PacketID;
|
||||
}
|
||||
}
|
||||
public int PacketID => m_PacketID;
|
||||
|
||||
public OnEncodedPacketReceive OnReceive
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OnReceive;
|
||||
}
|
||||
}
|
||||
public OnEncodedPacketReceive OnReceive => m_OnReceive;
|
||||
|
||||
public bool Ingame
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Ingame;
|
||||
}
|
||||
}
|
||||
public bool Ingame => m_Ingame;
|
||||
}
|
||||
}
|
||||
|
|
@ -29,13 +29,7 @@ namespace Server.Network
|
|||
m_Reader = reader;
|
||||
}
|
||||
|
||||
public byte[] Buffer
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Reader.Buffer;
|
||||
}
|
||||
}
|
||||
public byte[] Buffer => m_Reader.Buffer;
|
||||
|
||||
public void Trace( NetState state )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ namespace Server.Network
|
|||
private static IPEndPoint[] m_EndPoints;
|
||||
|
||||
public static IPEndPoint[] EndPoints {
|
||||
get { return m_EndPoints; }
|
||||
set { m_EndPoints = value; }
|
||||
get => m_EndPoints;
|
||||
set => m_EndPoints = value;
|
||||
}
|
||||
|
||||
public Listener( IPEndPoint ipep )
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ namespace Server.Network
|
|||
|
||||
public Listener[] Listeners
|
||||
{
|
||||
get{ return m_Listeners; }
|
||||
set{ m_Listeners = value; }
|
||||
get => m_Listeners;
|
||||
set => m_Listeners = value;
|
||||
}
|
||||
|
||||
public void AddListener( Listener l )
|
||||
|
|
|
|||
|
|
@ -73,26 +73,14 @@ namespace Server.Network {
|
|||
|
||||
private DateTime m_ConnectedOn;
|
||||
|
||||
public DateTime ConnectedOn {
|
||||
get {
|
||||
return m_ConnectedOn;
|
||||
}
|
||||
}
|
||||
public DateTime ConnectedOn => m_ConnectedOn;
|
||||
|
||||
public TimeSpan ConnectedFor {
|
||||
get {
|
||||
return ( DateTime.UtcNow - m_ConnectedOn );
|
||||
}
|
||||
}
|
||||
public TimeSpan ConnectedFor => ( DateTime.UtcNow - m_ConnectedOn );
|
||||
|
||||
internal int m_Seed;
|
||||
internal int m_AuthID;
|
||||
|
||||
public IPAddress Address {
|
||||
get {
|
||||
return m_Address;
|
||||
}
|
||||
}
|
||||
public IPAddress Address => m_Address;
|
||||
|
||||
private ClientFlags m_Flags;
|
||||
|
||||
|
|
@ -110,56 +98,34 @@ namespace Server.Network {
|
|||
private IPacketEncoder m_Encoder = null;
|
||||
|
||||
public IPacketEncoder PacketEncoder {
|
||||
get {
|
||||
return m_Encoder;
|
||||
}
|
||||
set {
|
||||
m_Encoder = value;
|
||||
}
|
||||
get => m_Encoder;
|
||||
set => m_Encoder = value;
|
||||
}
|
||||
|
||||
private static NetStateCreatedCallback m_CreatedCallback;
|
||||
|
||||
public static NetStateCreatedCallback CreatedCallback {
|
||||
get {
|
||||
return m_CreatedCallback;
|
||||
}
|
||||
set {
|
||||
m_CreatedCallback = value;
|
||||
}
|
||||
get => m_CreatedCallback;
|
||||
set => m_CreatedCallback = value;
|
||||
}
|
||||
|
||||
public bool SentFirstPacket {
|
||||
get {
|
||||
return m_SentFirstPacket;
|
||||
}
|
||||
set {
|
||||
m_SentFirstPacket = value;
|
||||
}
|
||||
get => m_SentFirstPacket;
|
||||
set => m_SentFirstPacket = value;
|
||||
}
|
||||
|
||||
public bool BlockAllPackets {
|
||||
get {
|
||||
return m_BlockAllPackets;
|
||||
}
|
||||
set {
|
||||
m_BlockAllPackets = value;
|
||||
}
|
||||
get => m_BlockAllPackets;
|
||||
set => m_BlockAllPackets = value;
|
||||
}
|
||||
|
||||
public ClientFlags Flags {
|
||||
get {
|
||||
return m_Flags;
|
||||
}
|
||||
set {
|
||||
m_Flags = value;
|
||||
}
|
||||
get => m_Flags;
|
||||
set => m_Flags = value;
|
||||
}
|
||||
|
||||
public ClientVersion Version {
|
||||
get {
|
||||
return m_Version;
|
||||
}
|
||||
get => m_Version;
|
||||
set {
|
||||
m_Version = value;
|
||||
|
||||
|
|
@ -244,38 +210,26 @@ namespace Server.Network {
|
|||
Version704565 = Version70331 | NewSecureTrading
|
||||
}
|
||||
|
||||
public bool NewSpellbook { get { return ((_ProtocolChanges & ProtocolChanges.NewSpellbook) != 0); } }
|
||||
public bool DamagePacket { get { return ((_ProtocolChanges & ProtocolChanges.DamagePacket) != 0); } }
|
||||
public bool Unpack { get { return ((_ProtocolChanges & ProtocolChanges.Unpack) != 0); } }
|
||||
public bool BuffIcon { get { return ((_ProtocolChanges & ProtocolChanges.BuffIcon) != 0); } }
|
||||
public bool NewHaven { get { return ((_ProtocolChanges & ProtocolChanges.NewHaven) != 0); } }
|
||||
public bool ContainerGridLines { get { return ((_ProtocolChanges & ProtocolChanges.ContainerGridLines) != 0); } }
|
||||
public bool ExtendedSupportedFeatures { get { return ((_ProtocolChanges & ProtocolChanges.ExtendedSupportedFeatures) != 0); } }
|
||||
public bool StygianAbyss { get { return ((_ProtocolChanges & ProtocolChanges.StygianAbyss) != 0); } }
|
||||
public bool HighSeas { get { return ((_ProtocolChanges & ProtocolChanges.HighSeas) != 0); } }
|
||||
public bool NewCharacterList { get { return ((_ProtocolChanges & ProtocolChanges.NewCharacterList) != 0); } }
|
||||
public bool NewCharacterCreation { get { return ((_ProtocolChanges & ProtocolChanges.NewCharacterCreation) != 0); } }
|
||||
public bool ExtendedStatus { get { return ((_ProtocolChanges & ProtocolChanges.ExtendedStatus) != 0); } }
|
||||
public bool NewMobileIncoming { get { return ((_ProtocolChanges & ProtocolChanges.NewMobileIncoming) != 0); } }
|
||||
public bool NewSecureTrading { get { return ((_ProtocolChanges & ProtocolChanges.NewSecureTrading) != 0); } }
|
||||
public bool NewSpellbook => ((_ProtocolChanges & ProtocolChanges.NewSpellbook) != 0);
|
||||
public bool DamagePacket => ((_ProtocolChanges & ProtocolChanges.DamagePacket) != 0);
|
||||
public bool Unpack => ((_ProtocolChanges & ProtocolChanges.Unpack) != 0);
|
||||
public bool BuffIcon => ((_ProtocolChanges & ProtocolChanges.BuffIcon) != 0);
|
||||
public bool NewHaven => ((_ProtocolChanges & ProtocolChanges.NewHaven) != 0);
|
||||
public bool ContainerGridLines => ((_ProtocolChanges & ProtocolChanges.ContainerGridLines) != 0);
|
||||
public bool ExtendedSupportedFeatures => ((_ProtocolChanges & ProtocolChanges.ExtendedSupportedFeatures) != 0);
|
||||
public bool StygianAbyss => ((_ProtocolChanges & ProtocolChanges.StygianAbyss) != 0);
|
||||
public bool HighSeas => ((_ProtocolChanges & ProtocolChanges.HighSeas) != 0);
|
||||
public bool NewCharacterList => ((_ProtocolChanges & ProtocolChanges.NewCharacterList) != 0);
|
||||
public bool NewCharacterCreation => ((_ProtocolChanges & ProtocolChanges.NewCharacterCreation) != 0);
|
||||
public bool ExtendedStatus => ((_ProtocolChanges & ProtocolChanges.ExtendedStatus) != 0);
|
||||
public bool NewMobileIncoming => ((_ProtocolChanges & ProtocolChanges.NewMobileIncoming) != 0);
|
||||
public bool NewSecureTrading => ((_ProtocolChanges & ProtocolChanges.NewSecureTrading) != 0);
|
||||
|
||||
public bool IsUOTDClient {
|
||||
get {
|
||||
return ( (m_Flags & ClientFlags.UOTD) != 0 || ( m_Version != null && m_Version.Type == ClientType.UOTD ) );
|
||||
}
|
||||
}
|
||||
public bool IsUOTDClient => ( (m_Flags & ClientFlags.UOTD) != 0 || ( m_Version != null && m_Version.Type == ClientType.UOTD ) );
|
||||
|
||||
public bool IsSAClient {
|
||||
get {
|
||||
return ( m_Version != null && m_Version.Type == ClientType.SA );
|
||||
}
|
||||
}
|
||||
public bool IsSAClient => ( m_Version != null && m_Version.Type == ClientType.SA );
|
||||
|
||||
public List<SecureTrade> Trades {
|
||||
get {
|
||||
return m_Trades;
|
||||
}
|
||||
}
|
||||
public List<SecureTrade> Trades => m_Trades;
|
||||
|
||||
public void ValidateAllTrades() {
|
||||
for ( int i = m_Trades.Count - 1; i >= 0; --i ) {
|
||||
|
|
@ -342,68 +296,36 @@ namespace Server.Network {
|
|||
}
|
||||
|
||||
public bool CompressionEnabled {
|
||||
get {
|
||||
return m_CompressionEnabled;
|
||||
}
|
||||
set {
|
||||
m_CompressionEnabled = value;
|
||||
}
|
||||
get => m_CompressionEnabled;
|
||||
set => m_CompressionEnabled = value;
|
||||
}
|
||||
|
||||
public int Sequence {
|
||||
get {
|
||||
return m_Sequence;
|
||||
}
|
||||
set {
|
||||
m_Sequence = value;
|
||||
}
|
||||
get => m_Sequence;
|
||||
set => m_Sequence = value;
|
||||
}
|
||||
|
||||
public List<Gump> Gumps {
|
||||
get {
|
||||
return m_Gumps;
|
||||
}
|
||||
}
|
||||
public List<Gump> Gumps => m_Gumps;
|
||||
|
||||
public List<HuePicker> HuePickers {
|
||||
get {
|
||||
return m_HuePickers;
|
||||
}
|
||||
}
|
||||
public List<HuePicker> HuePickers => m_HuePickers;
|
||||
|
||||
public List<IMenu> Menus {
|
||||
get {
|
||||
return m_Menus;
|
||||
}
|
||||
}
|
||||
public List<IMenu> Menus => m_Menus;
|
||||
|
||||
private static int m_GumpCap = 512, m_HuePickerCap = 512, m_MenuCap = 512;
|
||||
|
||||
public static int GumpCap {
|
||||
get {
|
||||
return m_GumpCap;
|
||||
}
|
||||
set {
|
||||
m_GumpCap = value;
|
||||
}
|
||||
get => m_GumpCap;
|
||||
set => m_GumpCap = value;
|
||||
}
|
||||
|
||||
public static int HuePickerCap {
|
||||
get {
|
||||
return m_HuePickerCap;
|
||||
}
|
||||
set {
|
||||
m_HuePickerCap = value;
|
||||
}
|
||||
get => m_HuePickerCap;
|
||||
set => m_HuePickerCap = value;
|
||||
}
|
||||
|
||||
public static int MenuCap {
|
||||
get {
|
||||
return m_MenuCap;
|
||||
}
|
||||
set {
|
||||
m_MenuCap = value;
|
||||
}
|
||||
get => m_MenuCap;
|
||||
set => m_MenuCap = value;
|
||||
}
|
||||
|
||||
public void WriteConsole( string text ) {
|
||||
|
|
@ -513,39 +435,23 @@ namespace Server.Network {
|
|||
}
|
||||
|
||||
public CityInfo[] CityInfo {
|
||||
get {
|
||||
return m_CityInfo;
|
||||
}
|
||||
set {
|
||||
m_CityInfo = value;
|
||||
}
|
||||
get => m_CityInfo;
|
||||
set => m_CityInfo = value;
|
||||
}
|
||||
|
||||
public Mobile Mobile {
|
||||
get {
|
||||
return m_Mobile;
|
||||
}
|
||||
set {
|
||||
m_Mobile = value;
|
||||
}
|
||||
get => m_Mobile;
|
||||
set => m_Mobile = value;
|
||||
}
|
||||
|
||||
public ServerInfo[] ServerInfo {
|
||||
get {
|
||||
return m_ServerInfo;
|
||||
}
|
||||
set {
|
||||
m_ServerInfo = value;
|
||||
}
|
||||
get => m_ServerInfo;
|
||||
set => m_ServerInfo = value;
|
||||
}
|
||||
|
||||
public IAccount Account {
|
||||
get {
|
||||
return m_Account;
|
||||
}
|
||||
set {
|
||||
m_Account = value;
|
||||
}
|
||||
get => m_Account;
|
||||
set => m_Account = value;
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
|
|
@ -554,11 +460,7 @@ namespace Server.Network {
|
|||
|
||||
private static List<NetState> m_Instances = new List<NetState>();
|
||||
|
||||
public static List<NetState> Instances {
|
||||
get {
|
||||
return m_Instances;
|
||||
}
|
||||
}
|
||||
public static List<NetState> Instances => m_Instances;
|
||||
|
||||
private static BufferPool m_ReceiveBufferPool = new BufferPool( "Receive", 2048, 2048 );
|
||||
|
||||
|
|
@ -1064,12 +966,8 @@ namespace Server.Network {
|
|||
private static int m_CoalesceSleep = -1;
|
||||
|
||||
public static int CoalesceSleep {
|
||||
get {
|
||||
return m_CoalesceSleep;
|
||||
}
|
||||
set {
|
||||
m_CoalesceSleep = value;
|
||||
}
|
||||
get => m_CoalesceSleep;
|
||||
set => m_CoalesceSleep = value;
|
||||
}
|
||||
|
||||
private long m_NextCheckActivity;
|
||||
|
|
@ -1112,7 +1010,7 @@ namespace Server.Network {
|
|||
|
||||
private bool m_Disposing;
|
||||
|
||||
public bool IsDisposing { get { return m_Disposing; } }
|
||||
public bool IsDisposing => m_Disposing;
|
||||
|
||||
public void Dispose() {
|
||||
Dispose( true );
|
||||
|
|
@ -1224,32 +1122,16 @@ namespace Server.Network {
|
|||
}
|
||||
}
|
||||
|
||||
public bool Running {
|
||||
get {
|
||||
return m_Running;
|
||||
}
|
||||
}
|
||||
public bool Running => m_Running;
|
||||
|
||||
public bool Seeded {
|
||||
get {
|
||||
return m_Seeded;
|
||||
}
|
||||
set {
|
||||
m_Seeded = value;
|
||||
}
|
||||
get => m_Seeded;
|
||||
set => m_Seeded = value;
|
||||
}
|
||||
|
||||
public Socket Socket {
|
||||
get {
|
||||
return m_Socket;
|
||||
}
|
||||
}
|
||||
public Socket Socket => m_Socket;
|
||||
|
||||
public ByteQueue Buffer {
|
||||
get {
|
||||
return m_Buffer;
|
||||
}
|
||||
}
|
||||
public ByteQueue Buffer => m_Buffer;
|
||||
|
||||
public ExpansionInfo ExpansionInfo {
|
||||
get {
|
||||
|
|
@ -1265,11 +1147,7 @@ namespace Server.Network {
|
|||
}
|
||||
}
|
||||
|
||||
public Expansion Expansion {
|
||||
get {
|
||||
return ( Expansion ) this.ExpansionInfo.ID;
|
||||
}
|
||||
}
|
||||
public Expansion Expansion => ( Expansion ) this.ExpansionInfo.ID;
|
||||
|
||||
public bool SupportsExpansion( ExpansionInfo info, bool checkCoreExpansion ) {
|
||||
if ( info == null || ( checkCoreExpansion && ( int ) Core.Expansion < info.ID ) )
|
||||
|
|
|
|||
|
|
@ -39,42 +39,18 @@ namespace Server.Network
|
|||
m_OnReceive = onReceive;
|
||||
}
|
||||
|
||||
public int PacketID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PacketID;
|
||||
}
|
||||
}
|
||||
public int PacketID => m_PacketID;
|
||||
|
||||
public int Length
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Length;
|
||||
}
|
||||
}
|
||||
public int Length => m_Length;
|
||||
|
||||
public OnPacketReceive OnReceive
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OnReceive;
|
||||
}
|
||||
}
|
||||
public OnPacketReceive OnReceive => m_OnReceive;
|
||||
|
||||
public ThrottlePacketCallback ThrottleCallback
|
||||
{
|
||||
get{ return m_ThrottleCallback; }
|
||||
set{ m_ThrottleCallback = value; }
|
||||
get => m_ThrottleCallback;
|
||||
set => m_ThrottleCallback = value;
|
||||
}
|
||||
|
||||
public bool Ingame
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Ingame;
|
||||
}
|
||||
}
|
||||
public bool Ingame => m_Ingame;
|
||||
}
|
||||
}
|
||||
|
|
@ -64,10 +64,7 @@ namespace Server.Network
|
|||
private static EncodedPacketHandler[] m_EncodedHandlersLow;
|
||||
private static Dictionary<int, EncodedPacketHandler> m_EncodedHandlersHigh;
|
||||
|
||||
public static PacketHandler[] Handlers
|
||||
{
|
||||
get{ return m_Handlers; }
|
||||
}
|
||||
public static PacketHandler[] Handlers => m_Handlers;
|
||||
|
||||
static PacketHandlers()
|
||||
{
|
||||
|
|
@ -1488,8 +1485,8 @@ namespace Server.Network
|
|||
|
||||
public static bool SingleClickProps
|
||||
{
|
||||
get{ return m_SingleClickProps; }
|
||||
set{ m_SingleClickProps = value; }
|
||||
get => m_SingleClickProps;
|
||||
set => m_SingleClickProps = value;
|
||||
}
|
||||
|
||||
public static void LookReq( NetState state, PacketReader pvSrc )
|
||||
|
|
@ -1590,7 +1587,9 @@ namespace Server.Network
|
|||
128
|
||||
};
|
||||
|
||||
public static int[] ValidAnimations{ get{ return m_ValidAnimations; } set{ m_ValidAnimations = value; } }
|
||||
public static int[] ValidAnimations{ get => m_ValidAnimations;
|
||||
set => m_ValidAnimations = value;
|
||||
}
|
||||
|
||||
public static void Animate( NetState state, PacketReader pvSrc )
|
||||
{
|
||||
|
|
@ -2479,8 +2478,8 @@ namespace Server.Network
|
|||
|
||||
public static bool ClientVerification
|
||||
{
|
||||
get{ return m_ClientVerification; }
|
||||
set{ m_ClientVerification = value; }
|
||||
get => m_ClientVerification;
|
||||
set => m_ClientVerification = value;
|
||||
}
|
||||
|
||||
internal struct AuthIDPersistence {
|
||||
|
|
|
|||
|
|
@ -37,21 +37,9 @@ namespace Server.Network
|
|||
m_Index = fixedSize ? 1 : 3;
|
||||
}
|
||||
|
||||
public byte[] Buffer
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Data;
|
||||
}
|
||||
}
|
||||
public byte[] Buffer => m_Data;
|
||||
|
||||
public int Size
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Size;
|
||||
}
|
||||
}
|
||||
public int Size => m_Size;
|
||||
|
||||
public void Trace( NetState state )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -416,39 +416,21 @@ namespace Server.Network
|
|||
/// <summary>
|
||||
/// Gets the total stream length.
|
||||
/// </summary>
|
||||
public long Length
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Stream.Length;
|
||||
}
|
||||
}
|
||||
public long Length => m_Stream.Length;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current stream position.
|
||||
/// </summary>
|
||||
public long Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Stream.Position;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Stream.Position = value;
|
||||
}
|
||||
get => m_Stream.Position;
|
||||
set => m_Stream.Position = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The internal stream used by this PacketWriter instance.
|
||||
/// </summary>
|
||||
public MemoryStream UnderlyingStream
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Stream;
|
||||
}
|
||||
}
|
||||
public MemoryStream UnderlyingStream => m_Stream;
|
||||
|
||||
/// <summary>
|
||||
/// Offsets the current position from an origin.
|
||||
|
|
|
|||
|
|
@ -480,21 +480,9 @@ namespace Server.Network
|
|||
private int m_Number;
|
||||
private int m_Charges;
|
||||
|
||||
public int Number
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Number;
|
||||
}
|
||||
}
|
||||
public int Number => m_Number;
|
||||
|
||||
public int Charges
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Charges;
|
||||
}
|
||||
}
|
||||
public int Charges => m_Charges;
|
||||
|
||||
public EquipInfoAttribute( int number ) : this( number, -1 )
|
||||
{
|
||||
|
|
@ -514,37 +502,13 @@ namespace Server.Network
|
|||
private bool m_Unidentified;
|
||||
private EquipInfoAttribute[] m_Attributes;
|
||||
|
||||
public int Number
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Number;
|
||||
}
|
||||
}
|
||||
public int Number => m_Number;
|
||||
|
||||
public Mobile Crafter
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Crafter;
|
||||
}
|
||||
}
|
||||
public Mobile Crafter => m_Crafter;
|
||||
|
||||
public bool Unidentified
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Unidentified;
|
||||
}
|
||||
}
|
||||
public bool Unidentified => m_Unidentified;
|
||||
|
||||
public EquipInfoAttribute[] Attributes
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Attributes;
|
||||
}
|
||||
}
|
||||
public EquipInfoAttribute[] Attributes => m_Attributes;
|
||||
|
||||
public EquipmentInfo( int number, Mobile crafter, bool unidentified, EquipInfoAttribute[] attributes )
|
||||
{
|
||||
|
|
@ -2391,8 +2355,12 @@ namespace Server.Network
|
|||
{
|
||||
private int m_TextEntries, m_Switches;
|
||||
|
||||
public int TextEntries { get { return m_TextEntries; } set { m_TextEntries = value; } }
|
||||
public int Switches { get { return m_Switches; } set { m_Switches = value; } }
|
||||
public int TextEntries { get => m_TextEntries;
|
||||
set => m_TextEntries = value;
|
||||
}
|
||||
public int Switches { get => m_Switches;
|
||||
set => m_Switches = value;
|
||||
}
|
||||
|
||||
private Gump m_Gump;
|
||||
|
||||
|
|
@ -2543,8 +2511,12 @@ namespace Server.Network
|
|||
|
||||
private int m_LayoutLength;
|
||||
|
||||
public int TextEntries{ get{ return m_TextEntries; } set{ m_TextEntries = value; } }
|
||||
public int Switches{ get{ return m_Switches; } set{ m_Switches = value; } }
|
||||
public int TextEntries{ get => m_TextEntries;
|
||||
set => m_TextEntries = value;
|
||||
}
|
||||
public int Switches{ get => m_Switches;
|
||||
set => m_Switches = value;
|
||||
}
|
||||
|
||||
public DisplayGumpFast( Gump g ) : base( 0xB0 )
|
||||
{
|
||||
|
|
@ -2831,7 +2803,9 @@ namespace Server.Network
|
|||
{
|
||||
private static FeatureFlags m_AdditionalFlags;
|
||||
|
||||
public static FeatureFlags Value{ get{ return m_AdditionalFlags; } set{ m_AdditionalFlags = value; } }
|
||||
public static FeatureFlags Value{ get => m_AdditionalFlags;
|
||||
set => m_AdditionalFlags = value;
|
||||
}
|
||||
|
||||
public static SupportedFeatures Instantiate( NetState ns )
|
||||
{
|
||||
|
|
@ -2870,14 +2844,14 @@ namespace Server.Network
|
|||
|
||||
public static int Maximum
|
||||
{
|
||||
get{ return m_Maximum; }
|
||||
set{ m_Maximum = value; }
|
||||
get => m_Maximum;
|
||||
set => m_Maximum = value;
|
||||
}
|
||||
|
||||
public static bool Enabled
|
||||
{
|
||||
get{ return m_Enabled; }
|
||||
set{ m_Enabled = value; }
|
||||
get => m_Enabled;
|
||||
set => m_Enabled = value;
|
||||
}
|
||||
|
||||
public static void Write( PacketWriter stream, int cur, int max )
|
||||
|
|
@ -3917,92 +3891,50 @@ namespace Server.Network
|
|||
|
||||
public string City
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_City;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_City = value;
|
||||
}
|
||||
get => m_City;
|
||||
set => m_City = value;
|
||||
}
|
||||
|
||||
public string Building
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Building;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Building = value;
|
||||
}
|
||||
get => m_Building;
|
||||
set => m_Building = value;
|
||||
}
|
||||
|
||||
public int Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Description;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Description = value;
|
||||
}
|
||||
get => m_Description;
|
||||
set => m_Description = value;
|
||||
}
|
||||
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location.X;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Location.X = value;
|
||||
}
|
||||
get => m_Location.X;
|
||||
set => m_Location.X = value;
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location.Y;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Location.Y = value;
|
||||
}
|
||||
get => m_Location.Y;
|
||||
set => m_Location.Y = value;
|
||||
}
|
||||
|
||||
public int Z
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location.Z;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Location.Z = value;
|
||||
}
|
||||
get => m_Location.Z;
|
||||
set => m_Location.Z = value;
|
||||
}
|
||||
|
||||
public Point3D Location
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Location = value;
|
||||
}
|
||||
get => m_Location;
|
||||
set => m_Location = value;
|
||||
}
|
||||
|
||||
public Map Map
|
||||
{
|
||||
get{ return m_Map; }
|
||||
set{ m_Map = value; }
|
||||
get => m_Map;
|
||||
set => m_Map = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4086,10 +4018,7 @@ namespace Server.Network
|
|||
{
|
||||
private static ThirdPartyFeature m_Disabled = 0;
|
||||
|
||||
public static ThirdPartyFeature DisabledFeatures
|
||||
{
|
||||
get { return m_Disabled; }
|
||||
}
|
||||
public static ThirdPartyFeature DisabledFeatures => m_Disabled;
|
||||
|
||||
public static void Disable( ThirdPartyFeature feature )
|
||||
{
|
||||
|
|
@ -4206,8 +4135,8 @@ namespace Server.Network
|
|||
|
||||
public static CharacterListFlags AdditionalFlags
|
||||
{
|
||||
get{ return m_AdditionalFlags; }
|
||||
set{ m_AdditionalFlags = value; }
|
||||
get => m_AdditionalFlags;
|
||||
set => m_AdditionalFlags = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4368,50 +4297,26 @@ namespace Server.Network
|
|||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Name = value;
|
||||
}
|
||||
get => m_Name;
|
||||
set => m_Name = value;
|
||||
}
|
||||
|
||||
public int FullPercent
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_FullPercent;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_FullPercent = value;
|
||||
}
|
||||
get => m_FullPercent;
|
||||
set => m_FullPercent = value;
|
||||
}
|
||||
|
||||
public int TimeZone
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_TimeZone;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_TimeZone = value;
|
||||
}
|
||||
get => m_TimeZone;
|
||||
set => m_TimeZone = value;
|
||||
}
|
||||
|
||||
public IPEndPoint Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Address;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Address = value;
|
||||
}
|
||||
get => m_Address;
|
||||
set => m_Address = value;
|
||||
}
|
||||
|
||||
public ServerInfo( string name, int fullPercent, TimeZone tz, IPEndPoint address )
|
||||
|
|
@ -4517,10 +4422,7 @@ namespace Server.Network
|
|||
private int m_Length;
|
||||
private State m_State;
|
||||
|
||||
public int PacketID
|
||||
{
|
||||
get{ return m_PacketID; }
|
||||
}
|
||||
public int PacketID => m_PacketID;
|
||||
|
||||
protected Packet( int packetID )
|
||||
{
|
||||
|
|
@ -4553,13 +4455,7 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public PacketWriter UnderlyingStream
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Stream;
|
||||
}
|
||||
}
|
||||
public PacketWriter UnderlyingStream => m_Stream;
|
||||
|
||||
private const int CompressorBufferSize = 0x10000;
|
||||
private static BufferPool m_CompressorBuffers = new BufferPool("Compressor", 4, CompressorBufferSize);
|
||||
|
|
|
|||
|
|
@ -46,29 +46,13 @@ namespace Server.Network {
|
|||
private byte[] _buffer;
|
||||
private int _length;
|
||||
|
||||
public byte[] Buffer {
|
||||
get {
|
||||
return _buffer;
|
||||
}
|
||||
}
|
||||
public byte[] Buffer => _buffer;
|
||||
|
||||
public int Length {
|
||||
get {
|
||||
return _length;
|
||||
}
|
||||
}
|
||||
public int Length => _length;
|
||||
|
||||
public int Available {
|
||||
get {
|
||||
return ( _buffer.Length - _length );
|
||||
}
|
||||
}
|
||||
public int Available => ( _buffer.Length - _length );
|
||||
|
||||
public bool IsFull {
|
||||
get {
|
||||
return ( _length == _buffer.Length );
|
||||
}
|
||||
}
|
||||
public bool IsFull => ( _length == _buffer.Length );
|
||||
|
||||
private Gram() {
|
||||
}
|
||||
|
|
@ -95,9 +79,7 @@ namespace Server.Network {
|
|||
private static BufferPool m_UnusedBuffers = new BufferPool( "Coalesced", 2048, m_CoalesceBufferSize );
|
||||
|
||||
public static int CoalesceBufferSize {
|
||||
get {
|
||||
return m_CoalesceBufferSize;
|
||||
}
|
||||
get => m_CoalesceBufferSize;
|
||||
set {
|
||||
if ( m_CoalesceBufferSize == value )
|
||||
return;
|
||||
|
|
@ -129,17 +111,9 @@ namespace Server.Network {
|
|||
|
||||
private Gram _buffered;
|
||||
|
||||
public bool IsFlushReady {
|
||||
get {
|
||||
return ( _pending.Count == 0 && _buffered != null );
|
||||
}
|
||||
}
|
||||
public bool IsFlushReady => ( _pending.Count == 0 && _buffered != null );
|
||||
|
||||
public bool IsEmpty {
|
||||
get {
|
||||
return ( _pending.Count == 0 && _buffered == null );
|
||||
}
|
||||
}
|
||||
public bool IsEmpty => ( _pending.Count == 0 && _buffered == null );
|
||||
|
||||
public SendQueue() {
|
||||
_pending = new Queue<Gram>();
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ namespace Server
|
|||
|
||||
public static NotorietyHandler Handler
|
||||
{
|
||||
get{ return m_Handler; }
|
||||
set{ m_Handler = value; }
|
||||
get => m_Handler;
|
||||
set => m_Handler = value;
|
||||
}
|
||||
|
||||
private static int[] m_Hues = new int[]
|
||||
|
|
@ -54,8 +54,8 @@ namespace Server
|
|||
|
||||
public static int[] Hues
|
||||
{
|
||||
get{ return m_Hues; }
|
||||
set{ m_Hues = value; }
|
||||
get => m_Hues;
|
||||
set => m_Hues = value;
|
||||
}
|
||||
|
||||
public static int GetHue( int noto )
|
||||
|
|
|
|||
|
|
@ -32,15 +32,21 @@ namespace Server
|
|||
private int m_Strings;
|
||||
private string m_HeaderArgs;
|
||||
|
||||
public IEntity Entity{ get{ return m_Entity; } }
|
||||
public int Hash{ get{ return 0x40000000 + m_Hash; } }
|
||||
public IEntity Entity => m_Entity;
|
||||
public int Hash => 0x40000000 + m_Hash;
|
||||
|
||||
public int Header{ get{ return m_Header; } set{ m_Header = value; } }
|
||||
public string HeaderArgs{ get{ return m_HeaderArgs; } set{ m_HeaderArgs = value; } }
|
||||
public int Header{ get => m_Header;
|
||||
set => m_Header = value;
|
||||
}
|
||||
public string HeaderArgs{ get => m_HeaderArgs;
|
||||
set => m_HeaderArgs = value;
|
||||
}
|
||||
|
||||
private static bool m_Enabled = false;
|
||||
|
||||
public static bool Enabled{ get{ return m_Enabled; } set{ m_Enabled = value; } }
|
||||
public static bool Enabled{ get => m_Enabled;
|
||||
set => m_Enabled = value;
|
||||
}
|
||||
|
||||
public ObjectPropertyList( IEntity e ) : base( 0xD6 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ namespace Server
|
|||
{
|
||||
private static PartyCommands m_Handler;
|
||||
|
||||
public static PartyCommands Handler{ get{ return m_Handler; } set{ m_Handler = value; } }
|
||||
public static PartyCommands Handler{ get => m_Handler;
|
||||
set => m_Handler = value;
|
||||
}
|
||||
|
||||
public abstract void OnAdd( Mobile from );
|
||||
public abstract void OnRemove( Mobile from, Mobile target );
|
||||
|
|
|
|||
|
|
@ -24,9 +24,7 @@ namespace Server {
|
|||
public sealed class BinaryMemoryWriter : BinaryFileWriter {
|
||||
private MemoryStream stream;
|
||||
|
||||
protected override int BufferSize {
|
||||
get { return 512; }
|
||||
}
|
||||
protected override int BufferSize => 512;
|
||||
|
||||
public BinaryMemoryWriter()
|
||||
: base( new MemoryStream( 512 ), true ) {
|
||||
|
|
|
|||
|
|
@ -46,43 +46,23 @@ namespace Server {
|
|||
private static bool unbuffered = true;
|
||||
|
||||
public static int BufferSize {
|
||||
get {
|
||||
return bufferSize;
|
||||
}
|
||||
set {
|
||||
bufferSize = value;
|
||||
}
|
||||
get => bufferSize;
|
||||
set => bufferSize = value;
|
||||
}
|
||||
|
||||
public static int Concurrency {
|
||||
get {
|
||||
return concurrency;
|
||||
}
|
||||
set {
|
||||
concurrency = value;
|
||||
}
|
||||
get => concurrency;
|
||||
set => concurrency = value;
|
||||
}
|
||||
|
||||
public static bool Unbuffered {
|
||||
get {
|
||||
return unbuffered;
|
||||
}
|
||||
set {
|
||||
unbuffered = value;
|
||||
}
|
||||
get => unbuffered;
|
||||
set => unbuffered = value;
|
||||
}
|
||||
|
||||
public static bool AreSynchronous {
|
||||
get {
|
||||
return ( concurrency < 1 );
|
||||
}
|
||||
}
|
||||
public static bool AreSynchronous => ( concurrency < 1 );
|
||||
|
||||
public static bool AreAsynchronous {
|
||||
get {
|
||||
return ( concurrency > 0 );
|
||||
}
|
||||
}
|
||||
public static bool AreAsynchronous => ( concurrency > 0 );
|
||||
|
||||
public static FileStream OpenSequentialStream( string path, FileMode mode, FileAccess access, FileShare share ) {
|
||||
FileOptions options = FileOptions.SequentialScan;
|
||||
|
|
|
|||
|
|
@ -35,23 +35,11 @@ namespace Server {
|
|||
private int offset;
|
||||
private int size;
|
||||
|
||||
public byte[] Buffer {
|
||||
get {
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
public byte[] Buffer => buffer;
|
||||
|
||||
public int Offset {
|
||||
get {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
public int Offset => 0;
|
||||
|
||||
public int Size {
|
||||
get {
|
||||
return size;
|
||||
}
|
||||
}
|
||||
public int Size => size;
|
||||
|
||||
public Chunk( FileQueue owner, int slot, byte[] buffer, int offset, int size ) {
|
||||
this.owner = owner;
|
||||
|
|
@ -94,11 +82,7 @@ namespace Server {
|
|||
|
||||
private long position;
|
||||
|
||||
public long Position {
|
||||
get {
|
||||
return position;
|
||||
}
|
||||
}
|
||||
public long Position => position;
|
||||
|
||||
public FileQueue( int concurrentWrites, FileCommitCallback callback ) {
|
||||
if ( concurrentWrites < 1 ) {
|
||||
|
|
|
|||
|
|
@ -35,10 +35,7 @@ namespace Server
|
|||
private MemoryStream _memStream;
|
||||
private List<IndexInfo> _orderedIndexInfo = new List<IndexInfo>();
|
||||
|
||||
protected override int BufferSize
|
||||
{
|
||||
get { return 512; }
|
||||
}
|
||||
protected override int BufferSize => 512;
|
||||
|
||||
public QueuedMemoryWriter()
|
||||
: base(new MemoryStream(1024 * 1024), true)
|
||||
|
|
|
|||
|
|
@ -46,12 +46,8 @@ namespace Server {
|
|||
}
|
||||
|
||||
public override long Position {
|
||||
get {
|
||||
return fileQueue.Position;
|
||||
}
|
||||
set {
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
get => fileQueue.Position;
|
||||
set => throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
private void FileCallback( FileQueue.Chunk chunk ) {
|
||||
|
|
|
|||
|
|
@ -41,9 +41,11 @@ namespace Server {
|
|||
_decayQueue = new Queue<Item>();
|
||||
}
|
||||
|
||||
protected bool PermitBackgroundWrite { get { return _permitBackgroundWrite; } set { _permitBackgroundWrite = value; } }
|
||||
protected bool PermitBackgroundWrite { get => _permitBackgroundWrite;
|
||||
set => _permitBackgroundWrite = value;
|
||||
}
|
||||
|
||||
protected bool UseSequentialWriters { get { return (StandardSaveStrategy.SaveType == SaveOption.Normal || !_permitBackgroundWrite); } }
|
||||
protected bool UseSequentialWriters => (StandardSaveStrategy.SaveType == SaveOption.Normal || !_permitBackgroundWrite);
|
||||
|
||||
public override void Save(SaveMetrics metrics, bool permitBackgroundWrite)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,31 +31,16 @@ namespace Server
|
|||
m_Count = 0;
|
||||
}
|
||||
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Count;
|
||||
}
|
||||
}
|
||||
public int Count => m_Count;
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
m_Count = 0;
|
||||
}
|
||||
|
||||
public Point3D Last
|
||||
{
|
||||
get{ return m_List[m_Count - 1]; }
|
||||
}
|
||||
public Point3D Last => m_List[m_Count - 1];
|
||||
|
||||
public Point3D this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_List[index];
|
||||
}
|
||||
}
|
||||
public Point3D this[int index] => m_List[index];
|
||||
|
||||
public void Add( int x, int y, int z )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,21 +56,15 @@ namespace Server
|
|||
m_Poisons.Add( reg );
|
||||
}
|
||||
|
||||
public static Poison Lesser { get { return GetPoison( "Lesser" ); } }
|
||||
public static Poison Regular { get { return GetPoison( "Regular" ); } }
|
||||
public static Poison Greater { get { return GetPoison( "Greater" ); } }
|
||||
public static Poison Deadly { get { return GetPoison( "Deadly" ); } }
|
||||
public static Poison Lethal { get { return GetPoison( "Lethal" ); } }
|
||||
public static Poison Lesser => GetPoison( "Lesser" );
|
||||
public static Poison Regular => GetPoison( "Regular" );
|
||||
public static Poison Greater => GetPoison( "Greater" );
|
||||
public static Poison Deadly => GetPoison( "Deadly" );
|
||||
public static Poison Lethal => GetPoison( "Lethal" );
|
||||
|
||||
public static List<Poison> Poisons
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Poisons;
|
||||
}
|
||||
}
|
||||
public static List<Poison> Poisons => m_Poisons;
|
||||
|
||||
public static Poison Parse( string value )
|
||||
public static Poison Parse( string value )
|
||||
{
|
||||
Poison p = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,13 +25,7 @@ namespace Server.Prompts
|
|||
private int m_Serial;
|
||||
private static int m_Serials;
|
||||
|
||||
public int Serial
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Serial;
|
||||
}
|
||||
}
|
||||
public int Serial => m_Serial;
|
||||
|
||||
protected Prompt()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,29 +28,11 @@ namespace Server
|
|||
private Mobile m_Target;
|
||||
private bool m_Running;
|
||||
|
||||
public Mobile Mobile
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Mobile;
|
||||
}
|
||||
}
|
||||
public Mobile Mobile => m_Mobile;
|
||||
|
||||
public Mobile Target
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Target;
|
||||
}
|
||||
}
|
||||
public Mobile Target => m_Target;
|
||||
|
||||
public bool Running
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Running;
|
||||
}
|
||||
}
|
||||
public bool Running => m_Running;
|
||||
|
||||
public void Update()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,19 +26,19 @@ namespace Server
|
|||
[Parsable]
|
||||
public abstract class Race
|
||||
{
|
||||
public static Race DefaultRace { get { return m_Races[0]; } }
|
||||
public static Race DefaultRace => m_Races[0];
|
||||
|
||||
private static Race[] m_Races = new Race[0x100];
|
||||
|
||||
public static Race[] Races { get { return m_Races; } }
|
||||
public static Race[] Races => m_Races;
|
||||
|
||||
public static Race Human { get { return m_Races[0]; } }
|
||||
public static Race Elf { get { return m_Races[1]; } }
|
||||
public static Race Gargoyle { get { return m_Races[2]; } }
|
||||
public static Race Human => m_Races[0];
|
||||
public static Race Elf => m_Races[1];
|
||||
public static Race Gargoyle => m_Races[2];
|
||||
|
||||
private static List<Race> m_AllRaces = new List<Race>();
|
||||
|
||||
public static List<Race> AllRaces { get { return m_AllRaces; } }
|
||||
public static List<Race> AllRaces => m_AllRaces;
|
||||
|
||||
private int m_RaceID, m_RaceIndex;
|
||||
|
||||
|
|
@ -105,13 +105,13 @@ namespace Server
|
|||
|
||||
private Expansion m_RequiredExpansion;
|
||||
|
||||
public Expansion RequiredExpansion { get { return m_RequiredExpansion; } }
|
||||
public Expansion RequiredExpansion => m_RequiredExpansion;
|
||||
|
||||
public int MaleBody { get { return m_MaleBody; } }
|
||||
public int MaleGhostBody { get { return m_MaleGhostBody; } }
|
||||
public int MaleBody => m_MaleBody;
|
||||
public int MaleGhostBody => m_MaleGhostBody;
|
||||
|
||||
public int FemaleBody { get { return m_FemaleBody; } }
|
||||
public int FemaleGhostBody { get { return m_FemaleGhostBody; } }
|
||||
public int FemaleBody => m_FemaleBody;
|
||||
public int FemaleGhostBody => m_FemaleGhostBody;
|
||||
|
||||
protected Race( int raceID, int raceIndex, string name, string pluralName, int maleBody, int femaleBody, int maleGhostBody, int femaleGhostBody, Expansion requiredExpansion )
|
||||
{
|
||||
|
|
@ -167,44 +167,20 @@ namespace Server
|
|||
return (female ? m_FemaleGhostBody : m_MaleGhostBody);
|
||||
}
|
||||
|
||||
public int RaceID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_RaceID;
|
||||
}
|
||||
}
|
||||
public int RaceID => m_RaceID;
|
||||
|
||||
public int RaceIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_RaceIndex;
|
||||
}
|
||||
}
|
||||
public int RaceIndex => m_RaceIndex;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Name = value;
|
||||
}
|
||||
get => m_Name;
|
||||
set => m_Name = value;
|
||||
}
|
||||
|
||||
public string PluralName
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PluralName;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_PluralName = value;
|
||||
}
|
||||
get => m_PluralName;
|
||||
set => m_PluralName = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ namespace Server
|
|||
{
|
||||
private static List<Region> m_Regions = new List<Region>();
|
||||
|
||||
public static List<Region> Regions{ get{ return m_Regions; } }
|
||||
public static List<Region> Regions => m_Regions;
|
||||
|
||||
public static Region Find( Point3D p, Map map )
|
||||
{
|
||||
|
|
@ -124,13 +124,19 @@ namespace Server
|
|||
}
|
||||
|
||||
private static Type m_DefaultRegionType = typeof( Region );
|
||||
public static Type DefaultRegionType{ get{ return m_DefaultRegionType; } set{ m_DefaultRegionType = value; } }
|
||||
public static Type DefaultRegionType{ get => m_DefaultRegionType;
|
||||
set => m_DefaultRegionType = value;
|
||||
}
|
||||
|
||||
private static TimeSpan m_StaffLogoutDelay = TimeSpan.Zero;
|
||||
private static TimeSpan m_DefaultLogoutDelay = TimeSpan.FromMinutes( 5.0 );
|
||||
|
||||
public static TimeSpan StaffLogoutDelay{ get{ return m_StaffLogoutDelay; } set{ m_StaffLogoutDelay = value; } }
|
||||
public static TimeSpan DefaultLogoutDelay{ get{ return m_DefaultLogoutDelay; } set{ m_DefaultLogoutDelay = value; } }
|
||||
public static TimeSpan StaffLogoutDelay{ get => m_StaffLogoutDelay;
|
||||
set => m_StaffLogoutDelay = value;
|
||||
}
|
||||
public static TimeSpan DefaultLogoutDelay{ get => m_DefaultLogoutDelay;
|
||||
set => m_DefaultLogoutDelay = value;
|
||||
}
|
||||
|
||||
public static readonly int DefaultPriority = 50;
|
||||
|
||||
|
|
@ -169,22 +175,26 @@ namespace Server
|
|||
private Point3D m_GoLocation;
|
||||
private MusicName m_Music;
|
||||
|
||||
public string Name{ get{ return m_Name; } }
|
||||
public Map Map{ get{ return m_Map; } }
|
||||
public Region Parent{ get{ return m_Parent; } }
|
||||
public List<Region> Children{ get{ return m_Children; } }
|
||||
public Rectangle3D[] Area{ get{ return m_Area; } }
|
||||
public Sector[] Sectors{ get{ return m_Sectors; } }
|
||||
public bool Dynamic{ get{ return m_Dynamic; } }
|
||||
public int Priority{ get{ return m_Priority; } }
|
||||
public int ChildLevel{ get{ return m_ChildLevel; } }
|
||||
public bool Registered{ get{ return m_Registered; } }
|
||||
public string Name => m_Name;
|
||||
public Map Map => m_Map;
|
||||
public Region Parent => m_Parent;
|
||||
public List<Region> Children => m_Children;
|
||||
public Rectangle3D[] Area => m_Area;
|
||||
public Sector[] Sectors => m_Sectors;
|
||||
public bool Dynamic => m_Dynamic;
|
||||
public int Priority => m_Priority;
|
||||
public int ChildLevel => m_ChildLevel;
|
||||
public bool Registered => m_Registered;
|
||||
|
||||
public Point3D GoLocation{ get{ return m_GoLocation; } set { m_GoLocation = value; } }
|
||||
public MusicName Music{ get{ return m_Music; } set{ m_Music = value; } }
|
||||
public Point3D GoLocation{ get => m_GoLocation;
|
||||
set => m_GoLocation = value;
|
||||
}
|
||||
public MusicName Music{ get => m_Music;
|
||||
set => m_Music = value;
|
||||
}
|
||||
|
||||
public bool IsDefault{ get{ return m_Map.DefaultRegion == this; } }
|
||||
public virtual MusicName DefaultMusic{ get{ return m_Parent != null ? m_Parent.Music : MusicName.Invalid; } }
|
||||
public bool IsDefault => m_Map.DefaultRegion == this;
|
||||
public virtual MusicName DefaultMusic => m_Parent != null ? m_Parent.Music : MusicName.Invalid;
|
||||
|
||||
public Region( string name, Map map, int priority, params Rectangle2D[] area ) : this( name, map, priority, ConvertTo3D( area ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,14 +35,8 @@ namespace Server
|
|||
|
||||
public static Assembly[] Assemblies
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Assemblies;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Assemblies = value;
|
||||
}
|
||||
get => m_Assemblies;
|
||||
set => m_Assemblies = value;
|
||||
}
|
||||
|
||||
private static List<string> m_AdditionalReferences = new List<string>();
|
||||
|
|
@ -728,9 +722,9 @@ namespace Server
|
|||
private Type[] m_Types;
|
||||
private TypeTable m_Names, m_FullNames;
|
||||
|
||||
public Type[] Types { get { return m_Types; } }
|
||||
public TypeTable Names { get { return m_Names; } }
|
||||
public TypeTable FullNames { get { return m_FullNames; } }
|
||||
public Type[] Types => m_Types;
|
||||
public TypeTable Names => m_Names;
|
||||
public TypeTable FullNames => m_FullNames;
|
||||
|
||||
public Type GetTypeByName( string name, bool ignoreCase )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ namespace Server {
|
|||
private Region m_Region;
|
||||
private Rectangle3D m_Rect;
|
||||
|
||||
public Region Region { get { return m_Region; } }
|
||||
public Rectangle3D Rect { get { return m_Rect; } }
|
||||
public Region Region => m_Region;
|
||||
public Rectangle3D Rect => m_Rect;
|
||||
|
||||
public RegionRect( Region region, Rectangle3D rect ) {
|
||||
m_Region = region;
|
||||
|
|
@ -289,28 +289,12 @@ namespace Server {
|
|||
}
|
||||
}
|
||||
|
||||
public bool Active {
|
||||
get {
|
||||
return ( m_Active && m_Owner != Map.Internal );
|
||||
}
|
||||
}
|
||||
public bool Active => ( m_Active && m_Owner != Map.Internal );
|
||||
|
||||
public Map Owner {
|
||||
get {
|
||||
return m_Owner;
|
||||
}
|
||||
}
|
||||
public Map Owner => m_Owner;
|
||||
|
||||
public int X {
|
||||
get {
|
||||
return m_X;
|
||||
}
|
||||
}
|
||||
public int X => m_X;
|
||||
|
||||
public int Y {
|
||||
get {
|
||||
return m_Y;
|
||||
}
|
||||
}
|
||||
public int Y => m_Y;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,10 +112,10 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
public SecureTradeInfo From { get { return m_From; } }
|
||||
public SecureTradeInfo To { get { return m_To; } }
|
||||
public SecureTradeInfo From => m_From;
|
||||
public SecureTradeInfo To => m_To;
|
||||
|
||||
public bool Valid { get { return m_Valid; } }
|
||||
public bool Valid => m_Valid;
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
|
|
@ -472,8 +472,12 @@ namespace Server
|
|||
public SecureTradeContainer Container { get; private set; }
|
||||
public VirtualCheck VirtualCheck { get; private set; }
|
||||
|
||||
public int Gold { get { return VirtualCheck.Gold; } set { VirtualCheck.Gold = value; } }
|
||||
public int Plat { get { return VirtualCheck.Plat; } set { VirtualCheck.Plat = value; } }
|
||||
public int Gold { get => VirtualCheck.Gold;
|
||||
set => VirtualCheck.Gold = value;
|
||||
}
|
||||
public int Plat { get => VirtualCheck.Plat;
|
||||
set => VirtualCheck.Plat = value;
|
||||
}
|
||||
|
||||
public bool Accepted { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ namespace Server
|
|||
private static Serial m_LastMobile = Zero;
|
||||
private static Serial m_LastItem = 0x40000000;
|
||||
|
||||
public static Serial LastMobile { get { return m_LastMobile; } }
|
||||
public static Serial LastItem { get { return m_LastItem; } }
|
||||
public static Serial LastMobile => m_LastMobile;
|
||||
public static Serial LastItem => m_LastItem;
|
||||
|
||||
public static readonly Serial MinusOne = new Serial( -1 );
|
||||
public static readonly Serial Zero = new Serial( 0 );
|
||||
|
|
@ -60,37 +60,13 @@ namespace Server
|
|||
m_Serial = serial;
|
||||
}
|
||||
|
||||
public int Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Serial;
|
||||
}
|
||||
}
|
||||
public int Value => m_Serial;
|
||||
|
||||
public bool IsMobile
|
||||
{
|
||||
get
|
||||
{
|
||||
return ( m_Serial > 0 && m_Serial < 0x40000000 );
|
||||
}
|
||||
}
|
||||
public bool IsMobile => ( m_Serial > 0 && m_Serial < 0x40000000 );
|
||||
|
||||
public bool IsItem
|
||||
{
|
||||
get
|
||||
{
|
||||
return ( m_Serial >= 0x40000000 && m_Serial <= 0x7FFFFFFF );
|
||||
}
|
||||
}
|
||||
public bool IsItem => ( m_Serial >= 0x40000000 && m_Serial <= 0x7FFFFFFF );
|
||||
|
||||
public bool IsValid
|
||||
{
|
||||
get
|
||||
{
|
||||
return ( m_Serial > 0 );
|
||||
}
|
||||
}
|
||||
public bool IsValid => ( m_Serial > 0 );
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -196,13 +196,7 @@ namespace Server
|
|||
private bool PrefixStrings;
|
||||
private Stream m_File;
|
||||
|
||||
protected virtual int BufferSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return 64 * 1024;
|
||||
}
|
||||
}
|
||||
protected virtual int BufferSize => 64 * 1024;
|
||||
|
||||
private byte[] m_Buffer;
|
||||
|
||||
|
|
@ -239,13 +233,7 @@ namespace Server
|
|||
|
||||
private long m_Position;
|
||||
|
||||
public override long Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Position + m_Index;
|
||||
}
|
||||
}
|
||||
public override long Position => m_Position + m_Index;
|
||||
|
||||
public Stream UnderlyingStream
|
||||
{
|
||||
|
|
@ -970,13 +958,7 @@ namespace Server
|
|||
m_File.Close();
|
||||
}
|
||||
|
||||
public long Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_File.BaseStream.Position;
|
||||
}
|
||||
}
|
||||
public long Position => m_File.BaseStream.Position;
|
||||
|
||||
public long Seek( long offset, SeekOrigin origin )
|
||||
{
|
||||
|
|
@ -1402,7 +1384,7 @@ namespace Server
|
|||
public sealed class AsyncWriter : GenericWriter
|
||||
{
|
||||
private static int m_ThreadCount = 0;
|
||||
public static int ThreadCount { get { return m_ThreadCount; } }
|
||||
public static int ThreadCount => m_ThreadCount;
|
||||
|
||||
private int BufferSize;
|
||||
|
||||
|
|
@ -1500,10 +1482,7 @@ namespace Server
|
|||
|
||||
public MemoryStream MemStream
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Mem;
|
||||
}
|
||||
get => m_Mem;
|
||||
set
|
||||
{
|
||||
if ( m_Mem.Length > 0 )
|
||||
|
|
@ -1523,13 +1502,7 @@ namespace Server
|
|||
m_Closed = true;
|
||||
}
|
||||
|
||||
public override long Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_CurPos;
|
||||
}
|
||||
}
|
||||
public override long Position => m_CurPos;
|
||||
|
||||
public override void Write( IPAddress value )
|
||||
{
|
||||
|
|
|
|||
412
Server/Skills.cs
412
Server/Skills.cs
|
|
@ -213,62 +213,23 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
public Skills Owner
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Owner;
|
||||
}
|
||||
}
|
||||
public Skills Owner => m_Owner;
|
||||
|
||||
public SkillName SkillName
|
||||
{
|
||||
get
|
||||
{
|
||||
return (SkillName)m_Info.SkillID;
|
||||
}
|
||||
}
|
||||
public SkillName SkillName => (SkillName)m_Info.SkillID;
|
||||
|
||||
public int SkillID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Info.SkillID;
|
||||
}
|
||||
}
|
||||
public int SkillID => m_Info.SkillID;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Info.Name;
|
||||
}
|
||||
}
|
||||
public string Name => m_Info.Name;
|
||||
|
||||
public SkillInfo Info
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Info;
|
||||
}
|
||||
}
|
||||
public SkillInfo Info => m_Info;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public SkillLock Lock
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Lock;
|
||||
}
|
||||
}
|
||||
public SkillLock Lock => m_Lock;
|
||||
|
||||
public int BaseFixedPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Base;
|
||||
}
|
||||
get => m_Base;
|
||||
set
|
||||
{
|
||||
if ( value < 0 )
|
||||
|
|
@ -299,22 +260,13 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public double Base
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((double)m_Base / 10.0);
|
||||
}
|
||||
set
|
||||
{
|
||||
BaseFixedPoint = (int)(value * 10.0);
|
||||
}
|
||||
get => ((double)m_Base / 10.0);
|
||||
set => BaseFixedPoint = (int)(value * 10.0);
|
||||
}
|
||||
|
||||
public int CapFixedPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Cap;
|
||||
}
|
||||
get => m_Cap;
|
||||
set
|
||||
{
|
||||
if ( value < 0 )
|
||||
|
|
@ -336,25 +288,18 @@ namespace Server
|
|||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public double Cap
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((double)m_Cap / 10.0);
|
||||
}
|
||||
set
|
||||
{
|
||||
CapFixedPoint = (int)(value * 10.0);
|
||||
}
|
||||
get => ((double)m_Cap / 10.0);
|
||||
set => CapFixedPoint = (int)(value * 10.0);
|
||||
}
|
||||
|
||||
private static bool m_UseStatMods;
|
||||
|
||||
public static bool UseStatMods{ get{ return m_UseStatMods; } set{ m_UseStatMods = value; } }
|
||||
|
||||
public int Fixed
|
||||
{
|
||||
get{ return (int)(Value * 10); }
|
||||
public static bool UseStatMods{ get => m_UseStatMods;
|
||||
set => m_UseStatMods = value;
|
||||
}
|
||||
|
||||
public int Fixed => (int)(Value * 10);
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public double Value
|
||||
{
|
||||
|
|
@ -476,142 +421,70 @@ namespace Server
|
|||
|
||||
public SkillUseCallback Callback
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Callback;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Callback = value;
|
||||
}
|
||||
get => m_Callback;
|
||||
set => m_Callback = value;
|
||||
}
|
||||
|
||||
public int SkillID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SkillID;
|
||||
}
|
||||
}
|
||||
public int SkillID => m_SkillID;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Name = value;
|
||||
}
|
||||
get => m_Name;
|
||||
set => m_Name = value;
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Title;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Title = value;
|
||||
}
|
||||
get => m_Title;
|
||||
set => m_Title = value;
|
||||
}
|
||||
|
||||
public double StrScale
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_StrScale;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_StrScale = value;
|
||||
}
|
||||
get => m_StrScale;
|
||||
set => m_StrScale = value;
|
||||
}
|
||||
|
||||
public double DexScale
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_DexScale;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_DexScale = value;
|
||||
}
|
||||
get => m_DexScale;
|
||||
set => m_DexScale = value;
|
||||
}
|
||||
|
||||
public double IntScale
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_IntScale;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_IntScale = value;
|
||||
}
|
||||
get => m_IntScale;
|
||||
set => m_IntScale = value;
|
||||
}
|
||||
|
||||
public double StatTotal
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_StatTotal;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_StatTotal = value;
|
||||
}
|
||||
get => m_StatTotal;
|
||||
set => m_StatTotal = value;
|
||||
}
|
||||
|
||||
public double StrGain
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_StrGain;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_StrGain = value;
|
||||
}
|
||||
get => m_StrGain;
|
||||
set => m_StrGain = value;
|
||||
}
|
||||
|
||||
public double DexGain
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_DexGain;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_DexGain = value;
|
||||
}
|
||||
get => m_DexGain;
|
||||
set => m_DexGain = value;
|
||||
}
|
||||
|
||||
public double IntGain
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_IntGain;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_IntGain = value;
|
||||
}
|
||||
get => m_IntGain;
|
||||
set => m_IntGain = value;
|
||||
}
|
||||
|
||||
public double GainFactor
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_GainFactor;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_GainFactor = value;
|
||||
}
|
||||
get => m_GainFactor;
|
||||
set => m_GainFactor = value;
|
||||
}
|
||||
|
||||
private static SkillInfo[] m_Table = new SkillInfo[58]
|
||||
|
|
@ -678,14 +551,8 @@ namespace Server
|
|||
|
||||
public static SkillInfo[] Table
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Table;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Table = value;
|
||||
}
|
||||
get => m_Table;
|
||||
set => m_Table = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -699,208 +566,257 @@ namespace Server
|
|||
|
||||
#region Skill Getters & Setters
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Alchemy{ get{ return this[SkillName.Alchemy]; } set{} }
|
||||
public Skill Alchemy{ get => this[SkillName.Alchemy];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Anatomy{ get{ return this[SkillName.Anatomy]; } set{} }
|
||||
public Skill Anatomy{ get => this[SkillName.Anatomy];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill AnimalLore{ get{ return this[SkillName.AnimalLore]; } set{} }
|
||||
public Skill AnimalLore{ get => this[SkillName.AnimalLore];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill ItemID{ get{ return this[SkillName.ItemID]; } set{} }
|
||||
public Skill ItemID{ get => this[SkillName.ItemID];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill ArmsLore{ get{ return this[SkillName.ArmsLore]; } set{} }
|
||||
public Skill ArmsLore{ get => this[SkillName.ArmsLore];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Parry{ get{ return this[SkillName.Parry]; } set{} }
|
||||
public Skill Parry{ get => this[SkillName.Parry];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Begging{ get{ return this[SkillName.Begging]; } set{} }
|
||||
public Skill Begging{ get => this[SkillName.Begging];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Blacksmith{ get{ return this[SkillName.Blacksmith]; } set{} }
|
||||
public Skill Blacksmith{ get => this[SkillName.Blacksmith];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Fletching{ get{ return this[SkillName.Fletching]; } set{} }
|
||||
public Skill Fletching{ get => this[SkillName.Fletching];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Peacemaking{ get{ return this[SkillName.Peacemaking]; } set{} }
|
||||
public Skill Peacemaking{ get => this[SkillName.Peacemaking];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Camping{ get{ return this[SkillName.Camping]; } set{} }
|
||||
public Skill Camping{ get => this[SkillName.Camping];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Carpentry{ get{ return this[SkillName.Carpentry]; } set{} }
|
||||
public Skill Carpentry{ get => this[SkillName.Carpentry];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Cartography{ get{ return this[SkillName.Cartography]; } set{} }
|
||||
public Skill Cartography{ get => this[SkillName.Cartography];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Cooking{ get{ return this[SkillName.Cooking]; } set{} }
|
||||
public Skill Cooking{ get => this[SkillName.Cooking];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill DetectHidden{ get{ return this[SkillName.DetectHidden]; } set{} }
|
||||
public Skill DetectHidden{ get => this[SkillName.DetectHidden];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Discordance{ get{ return this[SkillName.Discordance]; } set{} }
|
||||
public Skill Discordance{ get => this[SkillName.Discordance];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill EvalInt{ get{ return this[SkillName.EvalInt]; } set{} }
|
||||
public Skill EvalInt{ get => this[SkillName.EvalInt];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Healing{ get{ return this[SkillName.Healing]; } set{} }
|
||||
public Skill Healing{ get => this[SkillName.Healing];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Fishing{ get{ return this[SkillName.Fishing]; } set{} }
|
||||
public Skill Fishing{ get => this[SkillName.Fishing];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Forensics{ get{ return this[SkillName.Forensics]; } set{} }
|
||||
public Skill Forensics{ get => this[SkillName.Forensics];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Herding{ get{ return this[SkillName.Herding]; } set{} }
|
||||
public Skill Herding{ get => this[SkillName.Herding];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Hiding{ get{ return this[SkillName.Hiding]; } set{} }
|
||||
public Skill Hiding{ get => this[SkillName.Hiding];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Provocation{ get{ return this[SkillName.Provocation]; } set{} }
|
||||
public Skill Provocation{ get => this[SkillName.Provocation];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Inscribe{ get{ return this[SkillName.Inscribe]; } set{} }
|
||||
public Skill Inscribe{ get => this[SkillName.Inscribe];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Lockpicking{ get{ return this[SkillName.Lockpicking]; } set{} }
|
||||
public Skill Lockpicking{ get => this[SkillName.Lockpicking];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Magery{ get{ return this[SkillName.Magery]; } set{} }
|
||||
public Skill Magery{ get => this[SkillName.Magery];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill MagicResist{ get{ return this[SkillName.MagicResist]; } set{} }
|
||||
public Skill MagicResist{ get => this[SkillName.MagicResist];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Tactics{ get{ return this[SkillName.Tactics]; } set{} }
|
||||
public Skill Tactics{ get => this[SkillName.Tactics];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Snooping{ get{ return this[SkillName.Snooping]; } set{} }
|
||||
public Skill Snooping{ get => this[SkillName.Snooping];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Musicianship{ get{ return this[SkillName.Musicianship]; } set{} }
|
||||
public Skill Musicianship{ get => this[SkillName.Musicianship];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Poisoning{ get{ return this[SkillName.Poisoning]; } set{} }
|
||||
public Skill Poisoning{ get => this[SkillName.Poisoning];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Archery{ get{ return this[SkillName.Archery]; } set{} }
|
||||
public Skill Archery{ get => this[SkillName.Archery];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill SpiritSpeak{ get{ return this[SkillName.SpiritSpeak]; } set{} }
|
||||
public Skill SpiritSpeak{ get => this[SkillName.SpiritSpeak];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Stealing{ get{ return this[SkillName.Stealing]; } set{} }
|
||||
public Skill Stealing{ get => this[SkillName.Stealing];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Tailoring{ get{ return this[SkillName.Tailoring]; } set{} }
|
||||
public Skill Tailoring{ get => this[SkillName.Tailoring];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill AnimalTaming{ get{ return this[SkillName.AnimalTaming]; } set{} }
|
||||
public Skill AnimalTaming{ get => this[SkillName.AnimalTaming];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill TasteID{ get{ return this[SkillName.TasteID]; } set{} }
|
||||
public Skill TasteID{ get => this[SkillName.TasteID];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Tinkering{ get{ return this[SkillName.Tinkering]; } set{} }
|
||||
public Skill Tinkering{ get => this[SkillName.Tinkering];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Tracking{ get{ return this[SkillName.Tracking]; } set{} }
|
||||
public Skill Tracking{ get => this[SkillName.Tracking];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Veterinary{ get{ return this[SkillName.Veterinary]; } set{} }
|
||||
public Skill Veterinary{ get => this[SkillName.Veterinary];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Swords{ get{ return this[SkillName.Swords]; } set{} }
|
||||
public Skill Swords{ get => this[SkillName.Swords];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Macing{ get{ return this[SkillName.Macing]; } set{} }
|
||||
public Skill Macing{ get => this[SkillName.Macing];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Fencing{ get{ return this[SkillName.Fencing]; } set{} }
|
||||
public Skill Fencing{ get => this[SkillName.Fencing];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Wrestling{ get{ return this[SkillName.Wrestling]; } set{} }
|
||||
public Skill Wrestling{ get => this[SkillName.Wrestling];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Lumberjacking{ get{ return this[SkillName.Lumberjacking]; } set{} }
|
||||
public Skill Lumberjacking{ get => this[SkillName.Lumberjacking];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Mining{ get{ return this[SkillName.Mining]; } set{} }
|
||||
public Skill Mining{ get => this[SkillName.Mining];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Meditation{ get{ return this[SkillName.Meditation]; } set{} }
|
||||
public Skill Meditation{ get => this[SkillName.Meditation];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Stealth{ get{ return this[SkillName.Stealth]; } set{} }
|
||||
public Skill Stealth{ get => this[SkillName.Stealth];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill RemoveTrap{ get{ return this[SkillName.RemoveTrap]; } set{} }
|
||||
public Skill RemoveTrap{ get => this[SkillName.RemoveTrap];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Necromancy{ get{ return this[SkillName.Necromancy]; } set{} }
|
||||
public Skill Necromancy{ get => this[SkillName.Necromancy];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Focus{ get{ return this[SkillName.Focus]; } set{} }
|
||||
public Skill Focus{ get => this[SkillName.Focus];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Chivalry{ get{ return this[SkillName.Chivalry]; } set{} }
|
||||
public Skill Chivalry{ get => this[SkillName.Chivalry];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Bushido{ get{ return this[SkillName.Bushido]; } set{} }
|
||||
public Skill Bushido{ get => this[SkillName.Bushido];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Ninjitsu{ get{ return this[SkillName.Ninjitsu]; } set{} }
|
||||
public Skill Ninjitsu{ get => this[SkillName.Ninjitsu];
|
||||
set{} }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Spellweaving { get { return this[SkillName.Spellweaving]; } set { } }
|
||||
public Skill Spellweaving { get => this[SkillName.Spellweaving];
|
||||
set { } }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Mysticism { get { return this[SkillName.Mysticism]; } set { } }
|
||||
public Skill Mysticism { get => this[SkillName.Mysticism];
|
||||
set { } }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Imbuing { get { return this[SkillName.Imbuing]; } set { } }
|
||||
public Skill Imbuing { get => this[SkillName.Imbuing];
|
||||
set { } }
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Skill Throwing { get { return this[SkillName.Throwing]; } set { } }
|
||||
public Skill Throwing { get => this[SkillName.Throwing];
|
||||
set { } }
|
||||
|
||||
#endregion
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public int Cap
|
||||
{
|
||||
get{ return m_Cap; }
|
||||
set{ m_Cap = value; }
|
||||
get => m_Cap;
|
||||
set => m_Cap = value;
|
||||
}
|
||||
|
||||
public int Total
|
||||
{
|
||||
get{ return m_Total; }
|
||||
set{ m_Total = value; }
|
||||
get => m_Total;
|
||||
set => m_Total = value;
|
||||
}
|
||||
|
||||
public Mobile Owner
|
||||
{
|
||||
get{ return m_Owner; }
|
||||
}
|
||||
public Mobile Owner => m_Owner;
|
||||
|
||||
public int Length
|
||||
{
|
||||
get{ return m_Skills.Length; }
|
||||
}
|
||||
public int Length => m_Skills.Length;
|
||||
|
||||
public Skill this[SkillName name]
|
||||
{
|
||||
get{ return this[(int)name]; }
|
||||
}
|
||||
public Skill this[SkillName name] => this[(int)name];
|
||||
|
||||
public Skill this[int skillID]
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,66 +37,24 @@ namespace Server.Targeting
|
|||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return TileData.LandTable[m_TileID].Name;
|
||||
}
|
||||
}
|
||||
public string Name => TileData.LandTable[m_TileID].Name;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public TileFlag Flags
|
||||
{
|
||||
get
|
||||
{
|
||||
return TileData.LandTable[m_TileID].Flags;
|
||||
}
|
||||
}
|
||||
public TileFlag Flags => TileData.LandTable[m_TileID].Flags;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int TileID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_TileID;
|
||||
}
|
||||
}
|
||||
public int TileID => m_TileID;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Point3D Location
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location;
|
||||
}
|
||||
}
|
||||
public Point3D Location => m_Location;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location.X;
|
||||
}
|
||||
}
|
||||
public int X => m_Location.X;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location.Y;
|
||||
}
|
||||
}
|
||||
public int Y => m_Location.Y;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Z
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location.Z;
|
||||
}
|
||||
}
|
||||
public int Z => m_Location.Z;
|
||||
}
|
||||
}
|
||||
|
|
@ -29,26 +29,14 @@ namespace Server.Targeting
|
|||
|
||||
public int MultiID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_MultiID;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_MultiID = value;
|
||||
}
|
||||
get => m_MultiID;
|
||||
set => m_MultiID = value;
|
||||
}
|
||||
|
||||
public Point3D Offset
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Offset;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Offset = value;
|
||||
}
|
||||
get => m_Offset;
|
||||
set => m_Offset = value;
|
||||
}
|
||||
|
||||
protected MultiTarget( int multiID, Point3D offset )
|
||||
|
|
|
|||
|
|
@ -33,66 +33,24 @@ namespace Server.Targeting
|
|||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public Point3D Location
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location;
|
||||
}
|
||||
}
|
||||
public Point3D Location => m_Location;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return TileData.ItemTable[m_ItemID].Name;
|
||||
}
|
||||
}
|
||||
public string Name => TileData.ItemTable[m_ItemID].Name;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public TileFlag Flags
|
||||
{
|
||||
get
|
||||
{
|
||||
return TileData.ItemTable[m_ItemID].Flags;
|
||||
}
|
||||
}
|
||||
public TileFlag Flags => TileData.ItemTable[m_ItemID].Flags;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int X
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location.X;
|
||||
}
|
||||
}
|
||||
public int X => m_Location.X;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Y
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location.Y;
|
||||
}
|
||||
}
|
||||
public int Y => m_Location.Y;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int Z
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Location.Z;
|
||||
}
|
||||
}
|
||||
public int Z => m_Location.Z;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor )]
|
||||
public int ItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ItemID;
|
||||
}
|
||||
}
|
||||
public int ItemID => m_ItemID;
|
||||
}
|
||||
}
|
||||
|
|
@ -31,8 +31,8 @@ namespace Server.Targeting
|
|||
|
||||
public static bool TargetIDValidation
|
||||
{
|
||||
get { return m_TargetIDValidation; }
|
||||
set { m_TargetIDValidation = value; }
|
||||
get => m_TargetIDValidation;
|
||||
set => m_TargetIDValidation = value;
|
||||
}
|
||||
|
||||
private int m_TargetID;
|
||||
|
|
@ -44,7 +44,7 @@ namespace Server.Targeting
|
|||
private TargetFlags m_Flags;
|
||||
private DateTime m_TimeoutTime;
|
||||
|
||||
public DateTime TimeoutTime{ get{ return m_TimeoutTime; } }
|
||||
public DateTime TimeoutTime => m_TimeoutTime;
|
||||
|
||||
protected Target( int range, bool allowGround, TargetFlags flags )
|
||||
{
|
||||
|
|
@ -134,47 +134,23 @@ namespace Server.Targeting
|
|||
|
||||
public bool CheckLOS
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_CheckLOS;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_CheckLOS = value;
|
||||
}
|
||||
get => m_CheckLOS;
|
||||
set => m_CheckLOS = value;
|
||||
}
|
||||
|
||||
public bool DisallowMultis
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_DisallowMultis;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_DisallowMultis = value;
|
||||
}
|
||||
get => m_DisallowMultis;
|
||||
set => m_DisallowMultis = value;
|
||||
}
|
||||
|
||||
public bool AllowNonlocal
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_AllowNonlocal;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_AllowNonlocal = value;
|
||||
}
|
||||
get => m_AllowNonlocal;
|
||||
set => m_AllowNonlocal = value;
|
||||
}
|
||||
|
||||
public int TargetID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_TargetID;
|
||||
}
|
||||
}
|
||||
public int TargetID => m_TargetID;
|
||||
|
||||
public virtual Packet GetPacketFor( NetState ns )
|
||||
{
|
||||
|
|
@ -350,38 +326,20 @@ namespace Server.Targeting
|
|||
|
||||
public int Range
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Range;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Range = value;
|
||||
}
|
||||
get => m_Range;
|
||||
set => m_Range = value;
|
||||
}
|
||||
|
||||
public bool AllowGround
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_AllowGround;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_AllowGround = value;
|
||||
}
|
||||
get => m_AllowGround;
|
||||
set => m_AllowGround = value;
|
||||
}
|
||||
|
||||
public TargetFlags Flags
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Flags;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Flags = value;
|
||||
}
|
||||
get => m_Flags;
|
||||
set => m_Flags = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,14 +37,14 @@ namespace Server
|
|||
|
||||
public string Name
|
||||
{
|
||||
get{ return m_Name; }
|
||||
set{ m_Name = value; }
|
||||
get => m_Name;
|
||||
set => m_Name = value;
|
||||
}
|
||||
|
||||
public TileFlag Flags
|
||||
{
|
||||
get{ return m_Flags; }
|
||||
set{ m_Flags = value; }
|
||||
get => m_Flags;
|
||||
set => m_Flags = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -71,19 +71,19 @@ namespace Server
|
|||
|
||||
public string Name
|
||||
{
|
||||
get{ return m_Name; }
|
||||
set{ m_Name = value; }
|
||||
get => m_Name;
|
||||
set => m_Name = value;
|
||||
}
|
||||
|
||||
public TileFlag Flags
|
||||
{
|
||||
get{ return m_Flags; }
|
||||
set{ m_Flags = value; }
|
||||
get => m_Flags;
|
||||
set => m_Flags = value;
|
||||
}
|
||||
|
||||
public bool Bridge
|
||||
{
|
||||
get{ return (m_Flags & TileFlag.Bridge) != 0; }
|
||||
get => (m_Flags & TileFlag.Bridge) != 0;
|
||||
set
|
||||
{
|
||||
if ( value )
|
||||
|
|
@ -95,7 +95,7 @@ namespace Server
|
|||
|
||||
public bool Impassable
|
||||
{
|
||||
get{ return (m_Flags & TileFlag.Impassable) != 0; }
|
||||
get => (m_Flags & TileFlag.Impassable) != 0;
|
||||
set
|
||||
{
|
||||
if ( value )
|
||||
|
|
@ -107,7 +107,7 @@ namespace Server
|
|||
|
||||
public bool Surface
|
||||
{
|
||||
get{ return (m_Flags & TileFlag.Surface) != 0; }
|
||||
get => (m_Flags & TileFlag.Surface) != 0;
|
||||
set
|
||||
{
|
||||
if ( value )
|
||||
|
|
@ -119,32 +119,32 @@ namespace Server
|
|||
|
||||
public int Weight
|
||||
{
|
||||
get{ return m_Weight; }
|
||||
set{ m_Weight = (byte)value; }
|
||||
get => m_Weight;
|
||||
set => m_Weight = (byte)value;
|
||||
}
|
||||
|
||||
public int Quality
|
||||
{
|
||||
get{ return m_Quality; }
|
||||
set{ m_Quality = (byte)value; }
|
||||
get => m_Quality;
|
||||
set => m_Quality = (byte)value;
|
||||
}
|
||||
|
||||
public int Quantity
|
||||
{
|
||||
get{ return m_Quantity; }
|
||||
set{ m_Quantity = (byte)value; }
|
||||
get => m_Quantity;
|
||||
set => m_Quantity = (byte)value;
|
||||
}
|
||||
|
||||
public int Value
|
||||
{
|
||||
get{ return m_Value; }
|
||||
set{ m_Value = (byte)value; }
|
||||
get => m_Value;
|
||||
set => m_Value = (byte)value;
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get{ return m_Height; }
|
||||
set{ m_Height = (byte)value; }
|
||||
get => m_Height;
|
||||
set => m_Height = (byte)value;
|
||||
}
|
||||
|
||||
public int CalcHeight
|
||||
|
|
@ -202,21 +202,9 @@ namespace Server
|
|||
private static LandData[] m_LandData;
|
||||
private static ItemData[] m_ItemData;
|
||||
|
||||
public static LandData[] LandTable
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_LandData;
|
||||
}
|
||||
}
|
||||
public static LandData[] LandTable => m_LandData;
|
||||
|
||||
public static ItemData[] ItemTable
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ItemData;
|
||||
}
|
||||
}
|
||||
public static ItemData[] ItemTable => m_ItemData;
|
||||
|
||||
private static int m_MaxLandValue;
|
||||
private static int m_MaxItemValue;
|
||||
|
|
|
|||
|
|
@ -31,13 +31,7 @@ namespace Server
|
|||
m_Count = 0;
|
||||
}
|
||||
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Count;
|
||||
}
|
||||
}
|
||||
public int Count => m_Count;
|
||||
|
||||
public void AddRange( StaticTile[] tiles )
|
||||
{
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue