chore(content): Updates to C# 9 syntax (#373)
This commit is contained in:
parent
a59fda6a3a
commit
1e2242bb1a
25 changed files with 155 additions and 405 deletions
|
|
@ -86,20 +86,13 @@ namespace Server.Engines.BulkOrders
|
|||
}
|
||||
|
||||
var theirSkill = m.Skills.Blacksmith.Base;
|
||||
int amountMax;
|
||||
|
||||
if (theirSkill >= 70.1)
|
||||
int amountMax = theirSkill switch
|
||||
{
|
||||
amountMax = Utility.RandomList(10, 15, 20, 20);
|
||||
}
|
||||
else if (theirSkill >= 50.1)
|
||||
{
|
||||
amountMax = Utility.RandomList(10, 15, 15, 20);
|
||||
}
|
||||
else
|
||||
{
|
||||
amountMax = Utility.RandomList(10, 10, 15, 20);
|
||||
}
|
||||
>= 70.1 => Utility.RandomList(10, 15, 20, 20),
|
||||
>= 50.1 => Utility.RandomList(10, 15, 15, 20),
|
||||
_ => Utility.RandomList(10, 10, 15, 20)
|
||||
};
|
||||
|
||||
var material = BulkMaterialType.None;
|
||||
|
||||
|
|
|
|||
|
|
@ -86,20 +86,12 @@ namespace Server.Engines.BulkOrders
|
|||
|
||||
if (entries.Length > 0)
|
||||
{
|
||||
int amountMax;
|
||||
|
||||
if (theirSkill >= 70.1)
|
||||
int amountMax = theirSkill switch
|
||||
{
|
||||
amountMax = Utility.RandomList(10, 15, 20, 20);
|
||||
}
|
||||
else if (theirSkill >= 50.1)
|
||||
{
|
||||
amountMax = Utility.RandomList(10, 15, 15, 20);
|
||||
}
|
||||
else
|
||||
{
|
||||
amountMax = Utility.RandomList(10, 10, 15, 20);
|
||||
}
|
||||
>= 70.1 => Utility.RandomList(10, 15, 20, 20),
|
||||
>= 50.1 => Utility.RandomList(10, 15, 15, 20),
|
||||
_ => Utility.RandomList(10, 10, 15, 20)
|
||||
};
|
||||
|
||||
var material = BulkMaterialType.None;
|
||||
|
||||
|
|
|
|||
|
|
@ -215,26 +215,14 @@ namespace Server.Engines.Doom
|
|||
|
||||
var random = Utility.Random(100);
|
||||
|
||||
if (random < 22)
|
||||
trap = random switch
|
||||
{
|
||||
trap = new SawTrap(Utility.RandomBool() ? SawTrapType.WestFloor : SawTrapType.NorthFloor);
|
||||
}
|
||||
else if (random < 44)
|
||||
{
|
||||
trap = new SpikeTrap(Utility.RandomBool() ? SpikeTrapType.WestFloor : SpikeTrapType.NorthFloor);
|
||||
}
|
||||
else if (random < 66)
|
||||
{
|
||||
trap = new GasTrap(Utility.RandomBool() ? GasTrapType.NorthWall : GasTrapType.WestWall);
|
||||
}
|
||||
else if (random < 88)
|
||||
{
|
||||
trap = new FireColumnTrap();
|
||||
}
|
||||
else
|
||||
{
|
||||
trap = new MushroomTrap();
|
||||
}
|
||||
< 22 => new SawTrap(Utility.RandomBool() ? SawTrapType.WestFloor : SawTrapType.NorthFloor),
|
||||
< 44 => new SpikeTrap(Utility.RandomBool() ? SpikeTrapType.WestFloor : SpikeTrapType.NorthFloor),
|
||||
< 66 => new GasTrap(Utility.RandomBool() ? GasTrapType.NorthWall : GasTrapType.WestWall),
|
||||
< 88 => new FireColumnTrap(),
|
||||
_ => new MushroomTrap()
|
||||
};
|
||||
|
||||
if (trap is FireColumnTrap || trap is MushroomTrap)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue