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

@ -42,7 +42,7 @@ namespace Server.Targeting
public TileFlag Flags => TileData.LandTable[TileID].Flags;
[CommandProperty(AccessLevel.Counselor)]
public int TileID{ get; }
public int TileID { get; }
[CommandProperty(AccessLevel.Counselor)]
public Point3D Location => m_Location;
@ -56,4 +56,4 @@ namespace Server.Targeting
[CommandProperty(AccessLevel.Counselor)]
public int Z => m_Location.Z;
}
}
}

View file

@ -24,16 +24,17 @@ namespace Server.Targeting
{
public abstract class MultiTarget : Target
{
protected MultiTarget(int multiID, Point3D offset, int range = 10, bool allowGround = true, TargetFlags flags = TargetFlags.None)
protected MultiTarget(int multiID, Point3D offset, int range = 10, bool allowGround = true,
TargetFlags flags = TargetFlags.None)
: base(range, allowGround, flags)
{
MultiID = multiID;
Offset = offset;
}
public int MultiID{ get; set; }
public int MultiID { get; set; }
public Point3D Offset{ get; set; }
public Point3D Offset { get; set; }
public override Packet GetPacketFor(NetState ns)
{

View file

@ -41,7 +41,7 @@ namespace Server.Targeting
public TileFlag Flags => TileData.ItemTable[ItemID].Flags;
[CommandProperty(AccessLevel.Counselor)]
public int ItemID{ get; }
public int ItemID { get; }
[CommandProperty(AccessLevel.Counselor)]
public int X => m_Location.X;
@ -52,4 +52,4 @@ namespace Server.Targeting
[CommandProperty(AccessLevel.Counselor)]
public int Z => m_Location.Z;
}
}
}

View file

@ -39,21 +39,21 @@ namespace Server.Targeting
CheckLOS = true;
}
public DateTime TimeoutTime{ get; private set; }
public DateTime TimeoutTime { get; private set; }
public bool CheckLOS{ get; set; }
public bool CheckLOS { get; set; }
public bool DisallowMultis{ get; set; }
public bool DisallowMultis { get; set; }
public bool AllowNonlocal{ get; set; }
public bool AllowNonlocal { get; set; }
public int TargetID{ get; }
public int TargetID { get; }
public int Range{ get; set; }
public int Range { get; set; }
public bool AllowGround{ get; set; }
public bool AllowGround { get; set; }
public TargetFlags Flags{ get; set; }
public TargetFlags Flags { get; set; }
public static void Cancel(Mobile m)
{
@ -114,8 +114,8 @@ namespace Server.Targeting
Point3D loc;
Map map;
Item item = targeted as Item;
Mobile mobile = targeted as Mobile;
var item = targeted as Item;
var mobile = targeted as Mobile;
if (targeted is LandTarget target)
{
@ -179,7 +179,7 @@ namespace Server.Targeting
return;
}
if (map == null || map != from.Map || Range != -1 && !from.InRange(loc, Range))
if (map == null || map != from.Map || (Range != -1 && !from.InRange(loc, Range)))
{
OnTargetOutOfRange(from, targeted);
}

View file

@ -27,4 +27,4 @@ namespace Server.Targeting
Disconnected,
Timeout
}
}
}

View file

@ -29,4 +29,4 @@ namespace Server.Targeting
Harmful = 0x01,
Beneficial = 0x02
}
}
}