Sync with L2jServer HighFive Apr 10th 2015.

This commit is contained in:
MobiusDev
2015-04-11 07:15:16 +00:00
parent 46669bba9d
commit ebfe860e5a
16 changed files with 221 additions and 204 deletions

View File

@ -140,7 +140,7 @@ public class CellNodeBuffer
private final void getNeighbors()
{
if (((NodeLoc) _current.getLoc()).canGoNone())
if (_current.getLoc().canGoNone())
{
return;
}
@ -155,25 +155,25 @@ public class CellNodeBuffer
CellNode nodeN = null;
// East
if (((NodeLoc) _current.getLoc()).canGoEast())
if (_current.getLoc().canGoEast())
{
nodeE = addNode(x + 1, y, z, false);
}
// South
if (((NodeLoc) _current.getLoc()).canGoSouth())
if (_current.getLoc().canGoSouth())
{
nodeS = addNode(x, y + 1, z, false);
}
// West
if (((NodeLoc) _current.getLoc()).canGoWest())
if (_current.getLoc().canGoWest())
{
nodeW = addNode(x - 1, y, z, false);
}
// North
if (((NodeLoc) _current.getLoc()).canGoNorth())
if (_current.getLoc().canGoNorth())
{
nodeN = addNode(x, y - 1, z, false);
}
@ -183,7 +183,7 @@ public class CellNodeBuffer
// SouthEast
if ((nodeE != null) && (nodeS != null))
{
if (((NodeLoc) nodeE.getLoc()).canGoSouth() && ((NodeLoc) nodeS.getLoc()).canGoEast())
if (nodeE.getLoc().canGoSouth() && nodeS.getLoc().canGoEast())
{
addNode(x + 1, y + 1, z, true);
}
@ -192,7 +192,7 @@ public class CellNodeBuffer
// SouthWest
if ((nodeS != null) && (nodeW != null))
{
if (((NodeLoc) nodeW.getLoc()).canGoSouth() && ((NodeLoc) nodeS.getLoc()).canGoWest())
if (nodeW.getLoc().canGoSouth() && nodeS.getLoc().canGoWest())
{
addNode(x - 1, y + 1, z, true);
}
@ -201,7 +201,7 @@ public class CellNodeBuffer
// NorthEast
if ((nodeN != null) && (nodeE != null))
{
if (((NodeLoc) nodeE.getLoc()).canGoNorth() && ((NodeLoc) nodeN.getLoc()).canGoEast())
if (nodeE.getLoc().canGoNorth() && nodeN.getLoc().canGoEast())
{
addNode(x + 1, y - 1, z, true);
}
@ -210,7 +210,7 @@ public class CellNodeBuffer
// NorthWest
if ((nodeN != null) && (nodeW != null))
{
if (((NodeLoc) nodeW.getLoc()).canGoNorth() && ((NodeLoc) nodeN.getLoc()).canGoWest())
if (nodeW.getLoc().canGoNorth() && nodeN.getLoc().canGoWest())
{
addNode(x - 1, y - 1, z, true);
}
@ -244,7 +244,7 @@ public class CellNodeBuffer
// reinit node if needed
if (result.getLoc() != null)
{
((NodeLoc) result.getLoc()).set(x, y, z);
result.getLoc().set(x, y, z);
}
else
{
@ -272,7 +272,7 @@ public class CellNodeBuffer
final int stepZ = Math.abs(geoZ - _current.getLoc().getZ());
float weight = diagonal ? Config.DIAGONAL_WEIGHT : Config.LOW_WEIGHT;
if (!((NodeLoc) newNode.getLoc()).canGoAll() || (stepZ > 16))
if (!newNode.getLoc().canGoAll() || (stepZ > 16))
{
weight = Config.HIGH_WEIGHT;
}
@ -330,7 +330,7 @@ public class CellNodeBuffer
return true;
}
if (!((NodeLoc) result.getLoc()).canGoAll())
if (!result.getLoc().canGoAll())
{
return true;
}