L2JMobius

Fafurion cannot find symbol isIn2DRadius

Mechagon3k · 2 · 4174

Offline Mechagon3k

  • Knight
  • ***
    • Posts: 66
Hi, can anyone help with this: "isIn2DRadius"
Code: [Select]
code: compiler.err.cant.resolve.location.args
message: cannot find symbol
  symbol:   method isIn2DRadius(org.l2jmobius.gameserver.model.Location,int)
  location: class org.l2jmobius.gameserver.model.Location

Is there any old symbol before this one "isIn2DRadius"?


Online Mobius

  • Distinguished King
  • *****
    • Posts: 19659
Creature
Code: [Select]
/**
* Check if this object is inside the given 2D radius around the given point.
* @param loc Location of the target
* @param radius the radius around the target
* @return true if the Creature is inside the radius.
*/
public boolean isInsideRadius2D(ILocational loc, int radius)
{
return isInsideRadius2D(loc.getX(), loc.getY(), loc.getZ(), radius);
}

/**
* Check if this object is inside the given 2D radius around the given point.
* @param x X position of the target
* @param y Y position of the target
* @param z Z position of the target
* @param radius the radius around the target
* @return true if the Creature is inside the radius.
*/
public boolean isInsideRadius2D(int x, int y, int z, int radius)
{
return calculateDistanceSq2D(x, y, z) < (radius * radius);
}


WorldObject
Code: [Select]
/**
* Calculates 2D distance between this WorldObject and given x, y, z.
* @param x the X coordinate
* @param y the Y coordinate
* @param z the Z coordinate
* @return distance between object and given x, y, z.
*/
public double calculateDistance2D(int x, int y, int z)
{
return Math.sqrt(Math.pow(x - getX(), 2) + Math.pow(y - getY(), 2));
}

/**
* Calculates the 2D distance between this WorldObject and given location.
* @param loc the location object
* @return distance between object and given location.
*/
public double calculateDistance2D(ILocational loc)
{
return calculateDistance2D(loc.getX(), loc.getY(), loc.getZ());
}