chore(content): Updates to C# 9 syntax (#373)

This commit is contained in:
Kamron Batman 2020-12-30 12:50:10 -08:00 • committed by GitHub
parent a59fda6a3a
commit 1e2242bb1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 155 additions and 405 deletions

View file

@ -31,23 +31,13 @@ namespace Server.SkillHandlers
{
var foundAnyone = false;
Point3D p;
if (targ is Mobile mobile)
Point3D p = targ switch
{
p = mobile.Location;
}
else if (targ is Item item)
{
p = item.Location;
}
else if (targ is IPoint3D d)
{
p = new Point3D(d);
}
else
{
p = src.Location;
}
Mobile mobile => mobile.Location,
Item item => item.Location,
IPoint3D d => new Point3D(d),
_ => src.Location
};
var srcSkill = src.Skills.DetectHidden.Value;
var range = (int)(srcSkill / 10.0);