Formatting FIxes (#58)
This commit is contained in:
parent
57fb9fb525
commit
096d39609e
1318 changed files with 11633 additions and 22129 deletions
|
|
@ -47,10 +47,7 @@ namespace Server.PathAlgorithms.FastAStar
|
|||
return x * x + y * y + z * z;
|
||||
}
|
||||
|
||||
public override bool CheckCondition(Mobile m, Map map, Point3D start, Point3D goal)
|
||||
{
|
||||
return Utility.InRange(start, goal, AreaSize);
|
||||
}
|
||||
public override bool CheckCondition(Mobile m, Map map, Point3D start, Point3D goal) => Utility.InRange(start, goal, AreaSize);
|
||||
|
||||
private void RemoveFromChain(int node)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -130,12 +130,10 @@ namespace Server.Movement
|
|||
return moveIsOk;
|
||||
}
|
||||
|
||||
public bool CheckMovement(Mobile m, Direction d, out int newZ)
|
||||
{
|
||||
return !Enabled && _Successor != null
|
||||
public bool CheckMovement(Mobile m, Direction d, out int newZ) =>
|
||||
!Enabled && _Successor != null
|
||||
? _Successor.CheckMovement(m, d, out newZ)
|
||||
: CheckMovement(m, m.Map, m.Location, d, out newZ);
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
|
|
@ -381,21 +379,13 @@ namespace Server.Movement
|
|||
return moveIsOk;
|
||||
}
|
||||
|
||||
private static bool Verify(Item item, int x, int y)
|
||||
{
|
||||
return item.AtWorldPoint(x, y);
|
||||
}
|
||||
private static bool Verify(Item item, int x, int y) => item.AtWorldPoint(x, y);
|
||||
|
||||
private static bool Verify(Item item, TileFlag reqFlags, bool ignoreMovableImpassables)
|
||||
{
|
||||
return item != null && (!ignoreMovableImpassables || !item.Movable || !item.ItemData.Impassable) &&
|
||||
(item.ItemData.Flags & reqFlags) != 0 && !(item is BaseMulti) && item.ItemID <= TileData.MaxItemValue;
|
||||
}
|
||||
private static bool Verify(Item item, TileFlag reqFlags, bool ignoreMovableImpassables) =>
|
||||
item != null && (!ignoreMovableImpassables || !item.Movable || !item.ItemData.Impassable) &&
|
||||
(item.ItemData.Flags & reqFlags) != 0 && !(item is BaseMulti) && item.ItemID <= TileData.MaxItemValue;
|
||||
|
||||
private static bool Verify(Item item, TileFlag reqFlags, bool ignoreMovableImpassables, int x, int y)
|
||||
{
|
||||
return Verify(item, reqFlags, ignoreMovableImpassables) && Verify(item, x, y);
|
||||
}
|
||||
private static bool Verify(Item item, TileFlag reqFlags, bool ignoreMovableImpassables, int x, int y) => Verify(item, reqFlags, ignoreMovableImpassables) && Verify(item, x, y);
|
||||
|
||||
private static void GetStartZ(Mobile m, Map map, Point3D loc, IEnumerable<Item> itemList, out int zLow, out int zTop)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -264,10 +264,7 @@ namespace Server.Movement
|
|||
return moveIsOk;
|
||||
}
|
||||
|
||||
public bool CheckMovement(Mobile m, Direction d, out int newZ)
|
||||
{
|
||||
return CheckMovement(m, m.Map, m.Location, d, out newZ);
|
||||
}
|
||||
public bool CheckMovement(Mobile m, Direction d, out int newZ) => CheckMovement(m, m.Map, m.Location, d, out newZ);
|
||||
|
||||
public static void Configure()
|
||||
{
|
||||
|
|
@ -499,11 +496,9 @@ namespace Server.Movement
|
|||
return moveIsOk;
|
||||
}
|
||||
|
||||
private bool CanMoveOver(Mobile m, Mobile t)
|
||||
{
|
||||
return !t.Alive || !m.Alive || t.IsDeadBondedPet || m.IsDeadBondedPet ||
|
||||
t.Hidden && t.AccessLevel > AccessLevel.Player;
|
||||
}
|
||||
private bool CanMoveOver(Mobile m, Mobile t) =>
|
||||
!t.Alive || !m.Alive || t.IsDeadBondedPet || m.IsDeadBondedPet ||
|
||||
t.Hidden && t.AccessLevel > AccessLevel.Player;
|
||||
|
||||
private void GetStartZ(Mobile m, Map map, Point3D loc, List<Item> itemList, out int zLow, out int zTop)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -90,10 +90,7 @@ namespace Server
|
|||
|
||||
}
|
||||
|
||||
public bool Check(Point3D loc, Point3D goal, int range)
|
||||
{
|
||||
return Utility.InRange(loc, goal, range) && (range > 1 || Math.Abs(loc.Z - goal.Z) < 16);
|
||||
}
|
||||
public bool Check(Point3D loc, Point3D goal, int range) => Utility.InRange(loc, goal, range) && (range > 1 || Math.Abs(loc.Z - goal.Z) < 16);
|
||||
|
||||
public bool Follow(bool run, int range)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,10 +38,7 @@ namespace Server.PathAlgorithms.SlowAStar
|
|||
return x * x + y * y + z * z;
|
||||
}
|
||||
|
||||
public override bool CheckCondition(Mobile m, Map map, Point3D start, Point3D goal)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override bool CheckCondition(Mobile m, Map map, Point3D start, Point3D goal) => false;
|
||||
|
||||
public override Direction[] Find(Mobile m, Map map, Point3D start, Point3D goal)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue