Package l2p.util

Examples of l2p.util.Location


        {
          double angle = Util.convertHeadingToDegree(_baylor.getHeading());
          double radian = Math.toRadians(angle - 90);
          int x1 = -(int) (Math.sin(radian) * 600);
          int y1 = (int) (Math.cos(radian) * 600);
          Location flyLoc = GeoEngine.moveCheck(player.getX(), player.getY(), player.getZ(), player.getX() + x1, player.getY() + y1, player.getReflection().getGeoIndex());
          player.setLoc(flyLoc);
          player.broadcastPacket(new FlyToLocation(player, flyLoc, FlyType.THROW_HORIZONTAL));
        }
      }
      for(int i = 0; i < _crystaline.length; i++)
View Full Code Here


    if(Config.SERVICES_PARNASSUS_ENABLED)
    {
      try
      {
        // init reflection
        ReflectionTable.getInstance().get(-1, true).setCoreLoc(new Location(149384, 171896, -952));
        // spawn wh keeper
        L2Spawn sp1 = new L2Spawn(NpcTable.getTemplate(30086));
        sp1.setLocx(149960);
        sp1.setLocy(174136);
        sp1.setLocz(-920);
View Full Code Here

    if(var == null || var.equals(""))
    {
      teleOut();
      return;
    }
    player.teleToLocation(new Location(var), 0);
  }
View Full Code Here

  }

  public L2NpcInstance addSpawn(int npcId, int x, int y, int z, int heading, int randomOffset, int despawnDelay)
  {
    return addSpawn(npcId, new Location(x, y, z, heading), randomOffset, despawnDelay);
  }
View Full Code Here

   *
   * @return Location
   */
  public Location getLoc()
  {
    return new Location(_x, _y, _z, getHeading());
  }
View Full Code Here

  public void dropToTheGround(L2Player lastAttacker, L2NpcInstance dropper)
  {
    if(dropper == null)
    {
      Location dropPos = Rnd.coordsRandomize(lastAttacker, 70);
      for(int i = 0; i < 20 && !GeoEngine.canMoveWithCollision(lastAttacker.getX(), lastAttacker.getY(), lastAttacker.getZ(), dropPos.x, dropPos.y, dropPos.z, getReflection().getGeoIndex()); i++)
      {
        dropPos = Rnd.coordsRandomize(lastAttacker, 70);
      }
      dropMe(lastAttacker, dropPos);
      if(Config.AUTODESTROY_ITEM_AFTER > 0 && !isCursed())
      {
        ItemsAutoDestroy.getInstance().addItem(this);
      }
      return;
    }
    // 20 попыток уронить дроп в точке смерти моба
    Location dropPos = Rnd.coordsRandomize(dropper, 70);
    if(lastAttacker != null)
    {
      for(int i = 0; i < 20 && !GeoEngine.canMoveWithCollision(dropper.getX(), dropper.getY(), dropper.getZ(), dropPos.x, dropPos.y, dropPos.z, getReflection().getGeoIndex()); i++)
      {
        dropPos = Rnd.coordsRandomize(dropper, 70);
View Full Code Here

            _log.info("loc " + character.getLoc() + " moveList " + character.moveList.get(character.moveList.size() - 1).geo2world());
          }*/
          character.moveNext(false);
          return;
        }
        Location loc = null;
        try
        {
          int index = (int) (character.moveList.size() * done);
          if(index >= character.moveList.size())
          {
View Full Code Here

    _def_think = true;
  }

  public void addTaskMove(int locX, int locY, int locZ, boolean pathfind)
  {
    addTaskMove(new Location(locX, locY, locZ), pathfind);
  }
View Full Code Here

    L2NpcInstance actor = getActor();
    if(actor == null)
    {
      return;
    }
    Location loc = actor.getSpawnedLoc();
    if(loc.x != 0 && loc.y != 0 && !actor.isInRange(loc, getMaxPursueRange()))
    {
      teleportHome(true);
      return;
    }
View Full Code Here

      if(hate == null || hate.damage < 100 && hate.hate < 100)
      {
        returnHome(true);
        return false;
      }
      Location loc = GeoEngine.moveCheckForAI(target.getLoc(), actor.getLoc(), actor.getReflection().getGeoIndex());
      if(!GeoEngine.canMoveToCoord(actor.getX(), actor.getY(), actor.getZ(), loc.x, loc.y, loc.z, actor.getReflection().getGeoIndex())) // Для подстраховки
      {
        loc = target.getLoc();
      }
      actor.teleToLocation(loc);
View Full Code Here

TOP

Related Classes of l2p.util.Location

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.