Adds style cop (#109)

This commit is contained in:
Kamron Batman 2020-04-26 00:16:02 -07:00 • committed by GitHub
parent 3e715bcb60
commit 556a17aba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1725 changed files with 33831 additions and 38046 deletions

View file

@ -51,7 +51,7 @@ namespace Server.Items
public class MonsterStatuetteInfo
{
private static MonsterStatuetteInfo[] m_Table =
private static readonly MonsterStatuetteInfo[] m_Table =
{
/* Crocodile */ new MonsterStatuetteInfo(1041249, 0x20DA, 660),
/* Daemon */ new MonsterStatuetteInfo(1041250, 0x20D3, 357),
@ -109,11 +109,11 @@ namespace Server.Items
Sounds = sounds;
}
public int LabelNumber{ get; }
public int LabelNumber { get; }
public int ItemID{ get; }
public int ItemID { get; }
public int[] Sounds{ get; }
public int[] Sounds { get; }
public static MonsterStatuetteInfo GetInfo(MonsterStatuetteType type)
{
@ -132,8 +132,7 @@ namespace Server.Items
private MonsterStatuetteType m_Type;
[Constructible]
public MonsterStatuette(MonsterStatuetteType type = MonsterStatuetteType.Crocodile) :
base(MonsterStatuetteInfo.GetInfo(type).ItemID)
public MonsterStatuette(MonsterStatuetteType type = MonsterStatuetteType.Crocodile) : base(MonsterStatuetteInfo.GetInfo(type).ItemID)
{
LootType = LootType.Blessed;
@ -191,7 +190,7 @@ namespace Server.Items
public override bool HandlesOnMovement => m_TurnedOn && IsLockedDown;
[CommandProperty(AccessLevel.GameMaster)]
public bool IsRewardItem{ get; set; }
public bool IsRewardItem { get; set; }
public override void OnMovement(Mobile m, Point3D oldLocation)
{
@ -255,18 +254,18 @@ namespace Server.Items
switch (version)
{
case 0:
{
m_Type = (MonsterStatuetteType)reader.ReadEncodedInt();
m_TurnedOn = reader.ReadBool();
IsRewardItem = reader.ReadBool();
break;
}
{
m_Type = (MonsterStatuetteType)reader.ReadEncodedInt();
m_TurnedOn = reader.ReadBool();
IsRewardItem = reader.ReadBool();
break;
}
}
}
private class OnOffGump : Gump
{
private MonsterStatuette m_Statuette;
private readonly MonsterStatuette m_Statuette;
public OnOffGump(MonsterStatuette statuette) : base(150, 200)
{