Package l2p.util

Examples of l2p.util.MinionList


      newMinion.setSpawnedLoc(loc);
      newMinion.onSpawn();
      newMinion.spawnMe(loc);
      newMinion.getAI().setGlobalAggro(0);
      newMinion.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, boss.getRandomHated(), 1);
      MinionList ml = boss.getMinionList();
      if(ml != null)
      {
        ml.addSpawnedMinion(newMinion);
      }
    }
    super.onEvtDead(killer);
  }
View Full Code Here


    {
      try
      {
        if(!L2RaidBossInstance.this.isDead())
        {
          MinionList list = L2RaidBossInstance.this.getMinionList();
          if(list != null)
          {
            list.spawnSingleMinionSync(_minion);
          }
        }
      }
      catch(Throwable e)
      {
View Full Code Here

    return _minionList;
  }

  public void setNewMinionList()
  {
    _minionList = new MinionList(this);
  }
View Full Code Here

    if(!actor.isInCombat())
    {
      _lastMinionsTarget = 0;
      return;
    }
    MinionList ml = ((L2ReflectionBossInstance) actor).getMinionList();
    if(ml == null || !ml.hasMinions())
    {
      _lastMinionsTarget = 0;
      return;
    }
    long now = System.currentTimeMillis();
    if(_nextOrderTime > now && _lastMinionsTarget > 0)
    {
      L2Player old_target = L2ObjectsStorage.getAsPlayer(_lastMinionsTarget);
      if(old_target != null && !old_target.isAlikeDead())
      {
        for(L2MinionInstance m : ml.getSpawnedMinions())
        {
          if(m.getAI().getAttackTarget() != old_target)
          {
            m.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, old_target, 10000000);
            m.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, old_target);
          }
        }
        return;
      }
    }
    _nextOrderTime = now + 30000;
    GArray<L2Player> pl = L2World.getAroundPlayers(actor);
    if(pl.isEmpty())
    {
      _lastMinionsTarget = 0;
      return;
    }
    GArray<L2Player> alive = new GArray<L2Player>(6);
    for(L2Player p : pl)
    {
      if(!p.isAlikeDead())
      {
        alive.add(p);
      }
    }
    if(alive.isEmpty())
    {
      _lastMinionsTarget = 0;
      return;
    }
    L2Player target = alive.get(Rnd.get(alive.size()));
    _lastMinionsTarget = target.getStoredId();
    Functions.npcSayCustomMessage(actor, "Kama56Boss.attack", target.getName());
    for(L2MinionInstance m : ml.getSpawnedMinions())
    {
      m.clearAggroList(false);
      m.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, target, 10000000);
      m.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
    }
View Full Code Here

        if(frendly_target_hp_precent > master.getCurrentHpPercents())
        {
          targetToHeal = master;
          frendly_target_hp_precent = master.getCurrentHpPercents();
        }
        MinionList list = master.getMinionList();
        if(list != null)
        {
          for(L2MinionInstance m : list.getSpawnedMinions())
          {
            if(m != actor && frendly_target_hp_precent > m.getCurrentHpPercents())
            {
              targetToHeal = m;
              frendly_target_hp_precent = m.getCurrentHpPercents();
View Full Code Here

                    if (master != null) {
                        if (!master.isInCombat() && !master.isDead()) {
                            master.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION,
                                    new Object[] { attacker, Rnd.get(1, 100) });
                        }
                        MinionList list = master.getMinionList();
                        if (list != null) {
                            for (L2MinionInstance m : list.getSpawnedMinions()) {
                                if (m != this) {
                                    m.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION,
                                            new Object[] { attacker, Rnd.get(1, 100) });
                                }
                            }
View Full Code Here

    if(actor == null || actor.isDead())
    {
      return;
    }
    // Уменьшаем ХП у миньонов-носильщиков во время боя
    MinionList ml = ((L2MonsterInstance) actor).getMinionList();
    if(ml != null && ml.hasMinions())
    {
      for(L2MinionInstance m : ml.getSpawnedMinions())
      {
        if(m.getNpcId() == SCAPEGOAT_ID && !m.isDead())
        {
          m.reduceCurrentHp(m.getMaxHp() / 30, actor, null, false, true, true, false);
        }
View Full Code Here

TOP

Related Classes of l2p.util.MinionList

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.