Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -47,7 +47,7 @@ namespace Server.Items
|
|||
int version = reader.ReadEncodedInt();
|
||||
|
||||
int length = reader.ReadEncodedInt();
|
||||
for (int i = 0;; i++)
|
||||
for (int i = 0; ; i++)
|
||||
if (i < length)
|
||||
{
|
||||
PuzzleChestCylinder cylinder = (PuzzleChestCylinder)reader.ReadInt();
|
||||
|
|
@ -65,7 +65,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public PuzzleChestCylinder[] Cylinders{ get; } = new PuzzleChestCylinder[Length];
|
||||
public PuzzleChestCylinder[] Cylinders { get; } = new PuzzleChestCylinder[Length];
|
||||
|
||||
public PuzzleChestCylinder First
|
||||
{
|
||||
|
|
@ -162,7 +162,7 @@ namespace Server.Items
|
|||
When = reader.ReadDeltaTime();
|
||||
}
|
||||
|
||||
public DateTime When{ get; }
|
||||
public DateTime When { get; }
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
|
|
@ -179,7 +179,7 @@ namespace Server.Items
|
|||
public const int HintsCount = 3;
|
||||
public readonly TimeSpan CleanupTime = TimeSpan.FromHours(1.0);
|
||||
|
||||
private Dictionary<Mobile, PuzzleChestSolutionAndTime> m_Guesses =
|
||||
private readonly Dictionary<Mobile, PuzzleChestSolutionAndTime> m_Guesses =
|
||||
new Dictionary<Mobile, PuzzleChestSolutionAndTime>();
|
||||
|
||||
private PuzzleChestSolution m_Solution;
|
||||
|
|
@ -202,7 +202,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public PuzzleChestCylinder[] Hints{ get; private set; } = new PuzzleChestCylinder[HintsCount];
|
||||
public PuzzleChestCylinder[] Hints { get; private set; } = new PuzzleChestCylinder[HintsCount];
|
||||
|
||||
public PuzzleChestCylinder FirstHint
|
||||
{
|
||||
|
|
@ -295,44 +295,44 @@ namespace Server.Items
|
|||
switch (Utility.Random(4))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Effects.SendLocationEffect(to, to.Map, 0x113A, 20, 10);
|
||||
to.PlaySound(0x231);
|
||||
to.LocalOverheadMessage(MessageType.Regular, 0x44, 1010523); // A toxic vapor envelops thee.
|
||||
{
|
||||
Effects.SendLocationEffect(to, to.Map, 0x113A, 20, 10);
|
||||
to.PlaySound(0x231);
|
||||
to.LocalOverheadMessage(MessageType.Regular, 0x44, 1010523); // A toxic vapor envelops thee.
|
||||
|
||||
to.ApplyPoison(to, Poison.Regular);
|
||||
to.ApplyPoison(to, Poison.Regular);
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
Effects.SendLocationEffect(to, to.Map, 0x3709, 30);
|
||||
to.PlaySound(0x54);
|
||||
to.LocalOverheadMessage(MessageType.Regular, 0xEE, 1010524); // Searing heat scorches thy skin.
|
||||
{
|
||||
Effects.SendLocationEffect(to, to.Map, 0x3709, 30);
|
||||
to.PlaySound(0x54);
|
||||
to.LocalOverheadMessage(MessageType.Regular, 0xEE, 1010524); // Searing heat scorches thy skin.
|
||||
|
||||
AOS.Damage(to, to, Utility.RandomMinMax(10, 40), 0, 100, 0, 0, 0);
|
||||
AOS.Damage(to, to, Utility.RandomMinMax(10, 40), 0, 100, 0, 0, 0);
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
to.PlaySound(0x223);
|
||||
to.LocalOverheadMessage(MessageType.Regular, 0x62,
|
||||
1010525); // Pain lances through thee from a sharp metal blade.
|
||||
{
|
||||
to.PlaySound(0x223);
|
||||
to.LocalOverheadMessage(MessageType.Regular, 0x62,
|
||||
1010525); // Pain lances through thee from a sharp metal blade.
|
||||
|
||||
AOS.Damage(to, to, Utility.RandomMinMax(10, 40), 100, 0, 0, 0, 0);
|
||||
AOS.Damage(to, to, Utility.RandomMinMax(10, 40), 100, 0, 0, 0, 0);
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
to.BoltEffect(0);
|
||||
to.LocalOverheadMessage(MessageType.Regular, 0xDA, 1010526); // Lightning arcs through thy body.
|
||||
{
|
||||
to.BoltEffect(0);
|
||||
to.LocalOverheadMessage(MessageType.Regular, 0xDA, 1010526); // Lightning arcs through thy body.
|
||||
|
||||
AOS.Damage(to, to, Utility.RandomMinMax(10, 40), 0, 0, 0, 0, 100);
|
||||
AOS.Damage(to, to, Utility.RandomMinMax(10, 40), 0, 0, 0, 0, 100);
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -404,7 +404,7 @@ namespace Server.Items
|
|||
foreach (Item gem in gems)
|
||||
DropItem(gem);
|
||||
|
||||
if (0.2 > Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() < 0.2)
|
||||
DropItem(new BagOfReagents());
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
|
|
@ -538,9 +538,9 @@ namespace Server.Items
|
|||
|
||||
private class PuzzleGump : Gump
|
||||
{
|
||||
private PuzzleChest m_Chest;
|
||||
private Mobile m_From;
|
||||
private PuzzleChestSolution m_Solution;
|
||||
private readonly PuzzleChest m_Chest;
|
||||
private readonly Mobile m_From;
|
||||
private readonly PuzzleChestSolution m_Solution;
|
||||
|
||||
public PuzzleGump(Mobile from, PuzzleChest chest, PuzzleChestSolution solution, int check) : base(50, 50)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue