Package l2p.util

Examples of l2p.util.Location


    if(actor == null)
    {
      return false;
    }
    boolean randomWalk = actor.hasRandomWalk();
    Location sloc = actor.getSpawnedLoc();
    if(sloc == null)
    {
      return false;
    }
    // Моб попал на другой этаж
View Full Code Here


      actor.clearAggroList(true);
    }
    setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
    // Удаляем все задания
    clearTasks();
    Location sloc = actor.getSpawnedLoc();
    if(sloc == null)
    {
      return;
    }
    if(!clearAggro)
View Full Code Here

      actor.clearAggroList(true);
    }
    setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
    // Удаляем все задания
    clearTasks();
    Location sloc = actor.getSpawnedLoc();
    if(sloc == null)
    {
      return;
    }
    actor.broadcastPacketToOthers(new MagicSkillUse(actor, actor, 2036, 1, 500, 0));
View Full Code Here

      case MOVE:
        if(nextAction_arg0 == null || nextAction_arg1 == null)
        {
          return false;
        }
        Location loc = (Location) nextAction_arg0;
        Integer offset = (Integer) nextAction_arg1;
        clearNextAction();
        actor.moveToLocation(loc, offset, nextAction_arg2);
        break;
      case REST:
View Full Code Here

      doTask();
      return true;
    }
    actor.setRunning();
    actor.setAttackTimeout(Long.MAX_VALUE);
    Location sloc = actor.getSpawnedLoc();
    int homeX = actor.getX() - sloc.x;
    int homeY = actor.getY() - sloc.y;
    // Проверка на расстояние до точки спауна
    if(homeX * homeX + homeY * homeY > 10000)
    {
View Full Code Here

    {
      return;
    }
    actor.setRunning();
    actor.setAttackTimeout(Long.MAX_VALUE);
    Location sloc = actor.getSpawnedLoc();
    int homeX = actor.getX() - sloc.x;
    int homeY = actor.getY() - sloc.y;
    // Проверка на расстояние до точки спауна
    if(homeX * homeX + homeY * homeY > 9000000)
    {
View Full Code Here

    {
      // Приводит к застреванию в стенах:
      //if(actor.isInRange(blocked_at_pos, 1000))
      //  actor.setLoc(blocked_at_pos, true);
      // Этот способ надежнее:
      Location loc = ((L2Player) actor).getLastServerPosition();
      if(loc != null)
      {
        actor.setLoc(loc, true);
      }
      actor.stopMove();
View Full Code Here

  public L2MonsterInstance spawn(int npcId, int x, int y, int z)
  {
    try
    {
      L2MonsterInstance monster = (L2MonsterInstance) NpcTable.getTemplate(npcId).getInstanceConstructor().newInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(npcId));
      monster.setSpawnedLoc(new Location(x, y, z));
      monster.onSpawn();
      monster.spawnMe(monster.getSpawnedLoc());
      return monster;
    }
    catch(Exception e)
View Full Code Here

    double radian = Math.toRadians(angle - 90);
    int x = _x - (int) (100 * Math.sin(radian));
    int y = _y + (int) (100 * Math.cos(radian));
    int z = GeoEngine.getHeight(x, y, _z, activeChar.getReflection().getGeoIndex());
    activeChar.setXYZ(x, y, z);
    activeChar.broadcastPacket(new ExGetOffAirShip(activeChar, boat, new Location(x, y, z)));
  }
View Full Code Here

          GArray<SiegeSpawn> flagSpawns = new GArray<SiegeSpawn>();
          for(int x = xc - 150; x <= xc + 150; x += 150)
          {
            for(int y = yc - 150; y <= yc + 150; y += 150)
            {
              flagSpawns.add(new SiegeSpawn(castle.getId(), new Location(x, y, zc), flagNpcId, flagItemId));
            }
          }
          _flagSpawnList.put(castle.getId(), flagSpawns);
        }
        else
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.