Formatting #2 (#59)

This commit is contained in:
Kamron Batman 2019-10-05 00:37:03 -07:00 committed by GitHub
parent 096d39609e
commit 8e9221bb5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
400 changed files with 3688 additions and 5969 deletions

View file

@ -37,14 +37,13 @@ namespace Server.Items
{
get
{
switch (ItemID)
return ItemID switch
{
case 0x113C: return GasTrapType.NorthWall;
case 0x1147: return GasTrapType.WestWall;
case 0x11A8: return GasTrapType.Floor;
}
return GasTrapType.WestWall;
0x113C => GasTrapType.NorthWall,
0x1147 => GasTrapType.WestWall,
0x11A8 => GasTrapType.Floor,
_ => GasTrapType.WestWall
};
}
set => ItemID = GetBaseID(value);
}
@ -56,14 +55,13 @@ namespace Server.Items
public static int GetBaseID(GasTrapType type)
{
switch (type)
return type switch
{
case GasTrapType.NorthWall: return 0x113C;
case GasTrapType.WestWall: return 0x1147;
case GasTrapType.Floor: return 0x11A8;
}
return 0;
GasTrapType.NorthWall => 0x113C,
GasTrapType.WestWall => 0x1147,
GasTrapType.Floor => 0x11A8,
_ => 0
};
}
public override void OnTrigger(Mobile from)

View file

@ -28,15 +28,14 @@ namespace Server.Items
{
get
{
switch (ItemID)
return ItemID switch
{
case 0x1103: return SawTrapType.NorthWall;
case 0x1116: return SawTrapType.WestWall;
case 0x11AC: return SawTrapType.NorthFloor;
case 0x11B1: return SawTrapType.WestFloor;
}
return SawTrapType.NorthWall;
0x1103 => SawTrapType.NorthWall,
0x1116 => SawTrapType.WestWall,
0x11AC => SawTrapType.NorthFloor,
0x11B1 => SawTrapType.WestFloor,
_ => SawTrapType.NorthWall
};
}
set => ItemID = GetBaseID(value);
}
@ -48,15 +47,14 @@ namespace Server.Items
public static int GetBaseID(SawTrapType type)
{
switch (type)
return type switch
{
case SawTrapType.NorthWall: return 0x1103;
case SawTrapType.WestWall: return 0x1116;
case SawTrapType.NorthFloor: return 0x11AC;
case SawTrapType.WestFloor: return 0x11B1;
}
return 0;
SawTrapType.NorthWall => 0x1103,
SawTrapType.WestWall => 0x1116,
SawTrapType.NorthFloor => 0x11AC,
SawTrapType.WestFloor => 0x11B1,
_ => 0
};
}
public override void OnTrigger(Mobile from)

View file

@ -28,23 +28,22 @@ namespace Server.Items
{
get
{
switch (ItemID)
return ItemID switch
{
case 4360:
case 4361:
case 4366: return SpikeTrapType.WestWall;
case 4379:
case 4380:
case 4385: return SpikeTrapType.NorthWall;
case 4506:
case 4507:
case 4511: return SpikeTrapType.WestFloor;
case 4512:
case 4513:
case 4517: return SpikeTrapType.NorthFloor;
}
return SpikeTrapType.WestWall;
4360 => SpikeTrapType.WestWall,
4361 => SpikeTrapType.WestWall,
4366 => SpikeTrapType.WestWall,
4379 => SpikeTrapType.NorthWall,
4380 => SpikeTrapType.NorthWall,
4385 => SpikeTrapType.NorthWall,
4506 => SpikeTrapType.WestFloor,
4507 => SpikeTrapType.WestFloor,
4511 => SpikeTrapType.WestFloor,
4512 => SpikeTrapType.NorthFloor,
4513 => SpikeTrapType.NorthFloor,
4517 => SpikeTrapType.NorthFloor,
_ => SpikeTrapType.WestWall
};
}
set
{
@ -73,31 +72,28 @@ namespace Server.Items
public static int GetBaseID(SpikeTrapType type)
{
switch (type)
return type switch
{
case SpikeTrapType.WestWall: return 4360;
case SpikeTrapType.NorthWall: return 4379;
case SpikeTrapType.WestFloor: return 4506;
case SpikeTrapType.NorthFloor: return 4512;
}
return 0;
SpikeTrapType.WestWall => 4360,
SpikeTrapType.NorthWall => 4379,
SpikeTrapType.WestFloor => 4506,
SpikeTrapType.NorthFloor => 4512,
_ => 0
};
}
public static int GetExtendedID(SpikeTrapType type) => GetBaseID(type) + GetExtendedOffset(type);
public static int GetExtendedOffset(SpikeTrapType type)
{
switch (type)
return type switch
{
case SpikeTrapType.WestWall: return 6;
case SpikeTrapType.NorthWall: return 6;
case SpikeTrapType.WestFloor: return 5;
case SpikeTrapType.NorthFloor: return 5;
}
return 0;
SpikeTrapType.WestWall => 6,
SpikeTrapType.NorthWall => 6,
SpikeTrapType.WestFloor => 5,
SpikeTrapType.NorthFloor => 5,
_ => 0
};
}
public override void OnTrigger(Mobile from)

View file

@ -24,20 +24,19 @@ namespace Server.Items
{
get
{
switch (ItemID)
return ItemID switch
{
case 0x10F5:
case 0x10F6:
case 0x10F7: return StoneFaceTrapType.NorthWestWall;
case 0x10FC:
case 0x10FD:
case 0x10FE: return StoneFaceTrapType.NorthWall;
case 0x110F:
case 0x1110:
case 0x1111: return StoneFaceTrapType.WestWall;
}
return StoneFaceTrapType.NorthWestWall;
0x10F5 => StoneFaceTrapType.NorthWestWall,
0x10F6 => StoneFaceTrapType.NorthWestWall,
0x10F7 => StoneFaceTrapType.NorthWestWall,
0x10FC => StoneFaceTrapType.NorthWall,
0x10FD => StoneFaceTrapType.NorthWall,
0x10FE => StoneFaceTrapType.NorthWall,
0x110F => StoneFaceTrapType.WestWall,
0x1110 => StoneFaceTrapType.WestWall,
0x1111 => StoneFaceTrapType.WestWall,
_ => StoneFaceTrapType.NorthWestWall
};
}
set
{
@ -66,26 +65,24 @@ namespace Server.Items
public static int GetBaseID(StoneFaceTrapType type)
{
switch (type)
return type switch
{
case StoneFaceTrapType.NorthWestWall: return 0x10F5;
case StoneFaceTrapType.NorthWall: return 0x10FC;
case StoneFaceTrapType.WestWall: return 0x110F;
}
return 0;
StoneFaceTrapType.NorthWestWall => 0x10F5,
StoneFaceTrapType.NorthWall => 0x10FC,
StoneFaceTrapType.WestWall => 0x110F,
_ => 0
};
}
public static int GetFireID(StoneFaceTrapType type)
{
switch (type)
return type switch
{
case StoneFaceTrapType.NorthWestWall: return 0x10F7;
case StoneFaceTrapType.NorthWall: return 0x10FE;
case StoneFaceTrapType.WestWall: return 0x1111;
}
return 0;
StoneFaceTrapType.NorthWestWall => 0x10F7,
StoneFaceTrapType.NorthWall => 0x10FE,
StoneFaceTrapType.WestWall => 0x1111,
_ => 0
};
}
public override void OnTrigger(Mobile from)