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

@ -19,18 +19,17 @@
package com.l2jserver.gameserver.pathfinding.geonodes;
import com.l2jserver.gameserver.pathfinding.AbstractNode;
import com.l2jserver.gameserver.pathfinding.AbstractNodeLoc;
/**
* @author -Nemesiss-
*/
public class GeoNode extends AbstractNode
public class GeoNode extends AbstractNode<GeoNodeLoc>
{
private final int _neighborsIdx;
private short _cost;
private GeoNode[] _neighbors;
public GeoNode(AbstractNodeLoc Loc, int Neighbors_idx)
public GeoNode(GeoNodeLoc Loc, int Neighbors_idx)
{
super(Loc);
_neighborsIdx = Neighbors_idx;
@ -51,15 +50,13 @@ public class GeoNode extends AbstractNode
return _neighbors;
}
public void attachNeighbors()
public void attachNeighbors(GeoNode[] neighbors)
{
if (getLoc() == null)
{
_neighbors = null;
}
else
{
_neighbors = GeoPathFinding.getInstance().readNeighbors(this, _neighborsIdx);
}
_neighbors = neighbors;
}
public int getNeighborsIdx()
{
return _neighborsIdx;
}
}