Overwrite

Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
Unstable Kitsune
2023-11-28 23:20:26 -05:00
parent 3cd54811de
commit b918192e4e
11608 changed files with 2644205 additions and 47 deletions

72
Server/Movement.cs Normal file
View File

@@ -0,0 +1,72 @@
namespace Server.Movement
{
public static class Movement
{
private static IMovementImpl m_Impl;
public static IMovementImpl Impl { get { return m_Impl; } set { m_Impl = value; } }
/*public static bool CheckMovement(IPoint3D p, Direction d, out int newZ)
{
if (m_Impl != null)
{
return m_Impl.CheckMovement(p, d, out newZ);
}
newZ = p.Z;
return false;
}*/
public static bool CheckMovement(IPoint3D p, Map map, Point3D loc, Direction d, out int newZ)
{
if (m_Impl != null)
{
return m_Impl.CheckMovement(p, map, loc, d, out newZ);
}
newZ = p.Z;
return false;
}
public static void Offset(Direction d, ref int x, ref int y)
{
switch (d & Direction.Mask)
{
case Direction.North:
--y;
break;
case Direction.South:
++y;
break;
case Direction.West:
--x;
break;
case Direction.East:
++x;
break;
case Direction.Right:
++x;
--y;
break;
case Direction.Left:
--x;
++y;
break;
case Direction.Down:
++x;
++y;
break;
case Direction.Up:
--x;
--y;
break;
}
}
}
public interface IMovementImpl
{
//bool CheckMovement(IPoint3D p, Direction d, out int newZ);
bool CheckMovement(IPoint3D p, Map map, Point3D loc, Direction d, out int newZ);
}
}