Modernization Fixes & Updates to Default Values (#3)

This commit is contained in:
Kamron Batman 2018-10-28 00:33:16 -07:00 • committed by GitHub
parent 445eddff68
commit dcf64091b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
768 changed files with 10507 additions and 14196 deletions

View file

@ -86,10 +86,7 @@ namespace Server.Items
if (map == null || map == Map.Internal)
return Point3D.Zero;
int xCenter, yCenter;
int xWidth, yHeight;
if (!ComputeMapDetails(map, 0, 0, out xCenter, out yCenter, out xWidth, out yHeight))
if (!ComputeMapDetails(map, 0, 0, out int xCenter, out int yCenter, out int xWidth, out int yHeight))
return Point3D.Zero;
double absLong = xLong + (double)xMins / 60;
@ -101,10 +98,8 @@ namespace Server.Items
if (!ySouth)
absLat = 360.0 - absLat;
int x, y, z;
x = xCenter + (int)(absLong * xWidth / 360);
y = yCenter + (int)(absLat * yHeight / 360);
int x = xCenter + (int)(absLong * xWidth / 360);
int y = yCenter + (int)(absLat * yHeight / 360);
if (x < 0)
x += xWidth;
@ -116,7 +111,7 @@ namespace Server.Items
else if (y >= yHeight)
y -= yHeight;
z = map.GetAverageZ(x, y);
int z = map.GetAverageZ(x, y);
return new Point3D(x, y, z);
}
@ -128,10 +123,8 @@ namespace Server.Items
return false;
int x = p.X, y = p.Y;
int xCenter, yCenter;
int xWidth, yHeight;
if (!ComputeMapDetails(map, x, y, out xCenter, out yCenter, out xWidth, out yHeight))
if (!ComputeMapDetails(map, x, y, out int xCenter, out int yCenter, out int xWidth, out int yHeight))
return false;
double absLong = (double)((x - xCenter) * 360) / xWidth;