}
public boolean buildPathTo(int dest_x, int dest_y, int dest_z, int offset, boolean pathFind, boolean _follow)
{
int ref = getReflection().getGeoIndex();
Location dest;
if(_forestalling && isFollow && getFollowTarget() != null && getFollowTarget().isMoving)
{
dest = getIntersectionPoint(getFollowTarget());
}
else
{
dest = new Location(dest_x, dest_y, dest_z);
}
if(isInVehicle() || isVehicle())
{
applyOffset(dest, offset);
return setSimplePath(dest);
}
if(isFlying() || isSwimming() || isInWater() || L2World.isWater(dest))
{
applyOffset(dest, offset);
if(GeoEngine.canSeeCoord(this, dest.x, dest.y, dest.z, isFlying()))
{
return setSimplePath(dest);
}
Location nextloc;
if(isFlying())
{
nextloc = GeoEngine.moveCheckInAir(getX(), getY(), getZ(), dest.x, dest.y, dest.z, getColRadius(), ref);
}
else
{
nextloc = GeoEngine.moveInWaterCheck(getX(), getY(), getZ(), dest.x, dest.y, dest.z, ref);
}
if(nextloc != null && !nextloc.equals(getX(), getY(), getZ()))
{
return setSimplePath(nextloc);
}
return false;
}