fix: Cleanup IPoint3D calls (#704)
This commit is contained in:
parent
788b04b958
commit
3293ffcf06
33 changed files with 158 additions and 264 deletions
|
|
@ -239,7 +239,7 @@ namespace Server.Multis
|
|||
|
||||
public override bool AllowsRelativeDrop => true;
|
||||
|
||||
public static BaseBoat FindBoatAt(IPoint2D loc, Map map)
|
||||
public static BaseBoat FindBoatAt(Point3D loc, Map map)
|
||||
{
|
||||
var sector = map.GetSector(loc);
|
||||
|
||||
|
|
@ -1512,7 +1512,7 @@ namespace Server.Multis
|
|||
var adx = dx.Abs();
|
||||
var ady = dy.Abs();
|
||||
|
||||
var dir = Utility.GetDirection(this, new Point2D(x, y));
|
||||
var dir = Utility.GetDirection(Location.X, Location.Y, x, y);
|
||||
var iDir = (int)dir;
|
||||
|
||||
// Compute the maximum distance we can travel without going too far away
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ namespace Server.Multis
|
|||
return;
|
||||
}
|
||||
|
||||
if (from.Region.IsPartOf<HouseRegion>() || BaseBoat.FindBoatAt(from, from.Map) != null)
|
||||
if (from.Region.IsPartOf<HouseRegion>() || BaseBoat.FindBoatAt(from.Location, from.Map) != null)
|
||||
{
|
||||
from.SendLocalizedMessage(
|
||||
1010568,
|
||||
|
|
|
|||
|
|
@ -707,16 +707,16 @@ namespace Server.Multis
|
|||
return fromSecures + fromVendors + fromLockdowns + fromMovingCrate;
|
||||
}
|
||||
|
||||
public override bool InRange(IPoint2D from, int range)
|
||||
public bool InRange(Point2D from, int range)
|
||||
{
|
||||
if (Region == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
foreach (var rect in Region.Area)
|
||||
{
|
||||
// TODO: Convert this to 3D - https://github.com/modernuo/ModernUO/issues/29
|
||||
if (from.X >= rect.Start.X - range && from.Y >= rect.Start.Y - range && from.X < rect.End.X + range && from.Y < rect.End.Y + range)
|
||||
{
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue