Package l2p.gameserver.model.instances

Examples of l2p.gameserver.model.instances.L2NpcInstance


  }

  @Override
  protected boolean thinkActive()
  {
    L2NpcInstance actor = getActor();
    if(actor == null || actor.isDead())
    {
      return true;
    }
    if(_def_think)
    {
View Full Code Here


  }

  public void fromMDT()
  {
    L2Player player = (L2Player) getSelf();
    L2NpcInstance npc = getNpc();
    if(player == null || npc == null)
    {
      return;
    }
    if(!L2NpcInstance.canBypassCheck(player, npc))
View Full Code Here

  }

  public void teleOut()
  {
    L2Player player = (L2Player) getSelf();
    L2NpcInstance npc = getNpc();
    if(player == null || npc == null)
    {
      return;
    }
    player.teleToLocation(12902, 181011, -3563);
View Full Code Here

  }

  @Override
  protected void onEvtDead(L2Character killer)
  {
    L2NpcInstance actor = getActor();
    if(actor == null)
    {
      return;
    }
    Reflection ref = actor.getReflection();
    // Открываем дверь, спауним тиата
    if(checkAllDestroyed(actor.getNpcId(), ref.getId()))
    {
      ref.openDoor(DOOR);
      spawnTiat();
      // Показываем заставку спауна Тиата
      for(L2Player pl : L2World.getAroundPlayers(actor))
View Full Code Here

  /**
   * Спаунит боса
   */
  private void spawnTiat()
  {
    L2NpcInstance actor = getActor();
    if(actor == null)
    {
      return;
    }
    L2ReflectionBossInstance tiat = new L2ReflectionBossInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(TIAT_NPC_ID));
    tiat.setSpawnedLoc(TIAT_LOC);
    tiat.setReflection(actor.getReflection());
    tiat.onSpawn();
    tiat.spawnMe(tiat.getSpawnedLoc());
    actor.getReflection().addSpawn(tiat.getSpawn());
  }
View Full Code Here

        show(dialog.toString(), player, npc);
    }

    public void aggro() {
        L2Player player = (L2Player) getSelf();
        L2NpcInstance npc = getNpc();
        if (player == null || npc == null) {
            return;
        }
        StringBuilder dialog = new StringBuilder("<html><body><table width=\"80%\"><tr><td>Attacker</td><td>Damage</td><td>Hate</td></tr>");
        // Сортировка аггролиста по хейту
        TreeSet<AggroInfo> aggroList = new TreeSet<AggroInfo>(new Comparator<AggroInfo>() {

            @Override
            public int compare(AggroInfo o1, AggroInfo o2) {
                int hateDiff = o1.hate - o2.hate;
                if (hateDiff != 0) {
                    return hateDiff;
                }
                return o1.damage - o2.damage;
            }
        });
        aggroList.addAll(npc.getAggroList());
        // Вывод результата
        for (AggroInfo aggroInfo : aggroList.descendingSet()) {
            if (aggroInfo.attacker != null && (aggroInfo.attacker.isPlayer() || aggroInfo.attacker.isSummon() || aggroInfo.attacker.isPet())) {
                dialog.append("<tr><td>" + aggroInfo.attacker.getName() + "</td><td>" + aggroInfo.damage + "</td><td>" + aggroInfo.hate + "</td></tr>");
            }
View Full Code Here

  }

  private TreeMap<String, TreeMap<Long, Item>> getItems(int type)
  {
    L2Player player = (L2Player) getSelf();
    L2NpcInstance npc = getNpc();
    if(player == null || npc == null)
    {
      return null;
    }
    updateInfo(player, npc);
View Full Code Here

  public void list(String[] var)
  {
    int countPerPage = 9;
    L2Player player = (L2Player) getSelf();
    L2NpcInstance npc = getNpc();
    if(player == null || npc == null)
    {
      return;
    }
    if(var.length != 6)
View Full Code Here

  public void listForItem(String[] var)
  {
    int maxItems = 20;
    L2Player player = (L2Player) getSelf();
    L2NpcInstance npc = getNpc();
    if(player == null || npc == null)
    {
      return;
    }
    if(var.length != 7)
View Full Code Here

  }

  public void path(String[] var)
  {
    L2Player player = (L2Player) getSelf();
    L2NpcInstance npc = getNpc();
    if(player == null || npc == null)
    {
      return;
    }
    if(var.length != 3)
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.instances.L2NpcInstance

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.