Changes properties to use automatic property initializers
This commit is contained in:
parent
f0a48ad431
commit
06fa31a7bf
623 changed files with 13072 additions and 19304 deletions
|
|
@ -8,96 +8,83 @@ namespace Server
|
|||
{
|
||||
public class HardwareInfo
|
||||
{
|
||||
private int m_InstanceID;
|
||||
private int m_OSMajor, m_OSMinor, m_OSRevision;
|
||||
private int m_CpuManufacturer, m_CpuFamily, m_CpuModel, m_CpuClockSpeed, m_CpuQuantity;
|
||||
private int m_PhysicalMemory;
|
||||
private int m_ScreenWidth, m_ScreenHeight, m_ScreenDepth;
|
||||
private int m_DXMajor, m_DXMinor;
|
||||
private int m_VCVendorID, m_VCDeviceID, m_VCMemory;
|
||||
private int m_Distribution, m_ClientsRunning, m_ClientsInstalled, m_PartialInstalled;
|
||||
private string m_VCDescription;
|
||||
private string m_Language;
|
||||
private string m_Unknown;
|
||||
private DateTime m_TimeReceived;
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CpuModel { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CpuModel => m_CpuModel;
|
||||
public int CpuClockSpeed { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CpuClockSpeed => m_CpuClockSpeed;
|
||||
public int CpuQuantity { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CpuQuantity => m_CpuQuantity;
|
||||
public int OSMajor { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int OSMajor => m_OSMajor;
|
||||
public int OSMinor { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int OSMinor => m_OSMinor;
|
||||
public int OSRevision { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int OSRevision => m_OSRevision;
|
||||
public int InstanceID { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int InstanceID => m_InstanceID;
|
||||
public int ScreenWidth { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int ScreenWidth => m_ScreenWidth;
|
||||
public int ScreenHeight { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int ScreenHeight => m_ScreenHeight;
|
||||
public int ScreenDepth { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int ScreenDepth => m_ScreenDepth;
|
||||
public int PhysicalMemory { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int PhysicalMemory => m_PhysicalMemory;
|
||||
public int CpuManufacturer { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CpuManufacturer => m_CpuManufacturer;
|
||||
public int CpuFamily { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CpuFamily => m_CpuFamily;
|
||||
public int VCVendorID { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int VCVendorID => m_VCVendorID;
|
||||
public int VCDeviceID { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int VCDeviceID => m_VCDeviceID;
|
||||
public int VCMemory { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int VCMemory => m_VCMemory;
|
||||
public int DXMajor { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int DXMajor => m_DXMajor;
|
||||
public int DXMinor { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int DXMinor => m_DXMinor;
|
||||
public string VCDescription { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string VCDescription => m_VCDescription;
|
||||
public string Language { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string Language => m_Language;
|
||||
public int Distribution { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Distribution => m_Distribution;
|
||||
public int ClientsRunning { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int ClientsRunning => m_ClientsRunning;
|
||||
public int ClientsInstalled { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int ClientsInstalled => m_ClientsInstalled;
|
||||
public int PartialInstalled { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int PartialInstalled => m_PartialInstalled;
|
||||
public string Unknown { get; private set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string Unknown => m_Unknown;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public DateTime TimeReceived => m_TimeReceived;
|
||||
public DateTime TimeReceived { get; private set; }
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
@ -148,33 +135,33 @@ namespace Server
|
|||
|
||||
HardwareInfo info = new HardwareInfo();
|
||||
|
||||
info.m_InstanceID = pvSrc.ReadInt32();
|
||||
info.m_OSMajor = pvSrc.ReadInt32();
|
||||
info.m_OSMinor = pvSrc.ReadInt32();
|
||||
info.m_OSRevision = pvSrc.ReadInt32();
|
||||
info.m_CpuManufacturer = pvSrc.ReadByte();
|
||||
info.m_CpuFamily = pvSrc.ReadInt32();
|
||||
info.m_CpuModel = pvSrc.ReadInt32();
|
||||
info.m_CpuClockSpeed = pvSrc.ReadInt32();
|
||||
info.m_CpuQuantity = pvSrc.ReadByte();
|
||||
info.m_PhysicalMemory = pvSrc.ReadInt32();
|
||||
info.m_ScreenWidth = pvSrc.ReadInt32();
|
||||
info.m_ScreenHeight = pvSrc.ReadInt32();
|
||||
info.m_ScreenDepth = pvSrc.ReadInt32();
|
||||
info.m_DXMajor = pvSrc.ReadInt16();
|
||||
info.m_DXMinor = pvSrc.ReadInt16();
|
||||
info.m_VCDescription = pvSrc.ReadUnicodeStringLESafe( 64 );
|
||||
info.m_VCVendorID = pvSrc.ReadInt32();
|
||||
info.m_VCDeviceID = pvSrc.ReadInt32();
|
||||
info.m_VCMemory = pvSrc.ReadInt32();
|
||||
info.m_Distribution = pvSrc.ReadByte();
|
||||
info.m_ClientsRunning = pvSrc.ReadByte();
|
||||
info.m_ClientsInstalled = pvSrc.ReadByte();
|
||||
info.m_PartialInstalled = pvSrc.ReadByte();
|
||||
info.m_Language = pvSrc.ReadUnicodeStringLESafe( 4 );
|
||||
info.m_Unknown = pvSrc.ReadStringSafe( 64 );
|
||||
info.InstanceID = pvSrc.ReadInt32();
|
||||
info.OSMajor = pvSrc.ReadInt32();
|
||||
info.OSMinor = pvSrc.ReadInt32();
|
||||
info.OSRevision = pvSrc.ReadInt32();
|
||||
info.CpuManufacturer = pvSrc.ReadByte();
|
||||
info.CpuFamily = pvSrc.ReadInt32();
|
||||
info.CpuModel = pvSrc.ReadInt32();
|
||||
info.CpuClockSpeed = pvSrc.ReadInt32();
|
||||
info.CpuQuantity = pvSrc.ReadByte();
|
||||
info.PhysicalMemory = pvSrc.ReadInt32();
|
||||
info.ScreenWidth = pvSrc.ReadInt32();
|
||||
info.ScreenHeight = pvSrc.ReadInt32();
|
||||
info.ScreenDepth = pvSrc.ReadInt32();
|
||||
info.DXMajor = pvSrc.ReadInt16();
|
||||
info.DXMinor = pvSrc.ReadInt16();
|
||||
info.VCDescription = pvSrc.ReadUnicodeStringLESafe( 64 );
|
||||
info.VCVendorID = pvSrc.ReadInt32();
|
||||
info.VCDeviceID = pvSrc.ReadInt32();
|
||||
info.VCMemory = pvSrc.ReadInt32();
|
||||
info.Distribution = pvSrc.ReadByte();
|
||||
info.ClientsRunning = pvSrc.ReadByte();
|
||||
info.ClientsInstalled = pvSrc.ReadByte();
|
||||
info.PartialInstalled = pvSrc.ReadByte();
|
||||
info.Language = pvSrc.ReadUnicodeStringLESafe( 4 );
|
||||
info.Unknown = pvSrc.ReadStringSafe( 64 );
|
||||
|
||||
info.m_TimeReceived = DateTime.UtcNow;
|
||||
info.TimeReceived = DateTime.UtcNow;
|
||||
|
||||
if ( state.Account is Account acct )
|
||||
acct.HardwareInfo = info;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue