Sync with L2jServer HighFive Apr 21st 2015.

This commit is contained in:
MobiusDev
2015-04-22 09:59:28 +00:00
parent c896c6cd51
commit 1a6970e30d
37 changed files with 1518 additions and 1298 deletions

View File

@ -199,13 +199,14 @@ public class CellPathFinding extends PathFinding
int currentY = y;
int currentZ = z;
for (int i = 0; i < path.size() - 1; i++)
int midPoint = 0;
while (endPoint.hasNext())
{
AbstractNodeLoc locMiddle = path.get(i);
AbstractNodeLoc locMiddle = path.get(midPoint);
AbstractNodeLoc locEnd = endPoint.next();
if (GeoData.getInstance().canMove(currentX, currentY, currentZ, locEnd.getX(), locEnd.getY(), locEnd.getZ(), instanceId))
{
path.remove(i);
path.remove(midPoint);
remove = true;
if (debug)
{
@ -217,6 +218,7 @@ public class CellPathFinding extends PathFinding
currentX = locMiddle.getX();
currentY = locMiddle.getY();
currentZ = locMiddle.getZ();
midPoint++;
}
}
}