Examples of MinionList


Examples of com.l2jfrozen.gameserver.util.MinionList

   */
  public L2MonsterInstance(int objectId, L2NpcTemplate template)
  {
    super(objectId, template);
    getKnownList(); // init knownlist
    _minionList = new MinionList(this);
  }
View Full Code Here

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

Examples of l2p.util.MinionList

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

Examples of l2p.util.MinionList

    return _minionList;
  }

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

Examples of l2p.util.MinionList

    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

Examples of l2p.util.MinionList

        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

Examples of l2p.util.MinionList

                    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

Examples of l2p.util.MinionList

    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

Examples of lineage2.gameserver.model.MinionList

   * @param npc NpcInstance
   * @return MinionInstance
   */
  private MinionInstance getAliveMinion(NpcInstance npc)
  {
    final MinionList ml = npc.getMinionList();
    if ((ml != null) && ml.hasAliveMinions())
    {
      for (MinionInstance minion : ml.getAliveMinions())
      {
        return minion;
      }
    }
    return null;
View Full Code Here

Examples of lineage2.gameserver.model.MinionList

    if (!actor.isInCombat())
    {
      _lastMinionsTargetRef = HardReferences.emptyRef();
      return;
    }
    final MinionList ml = actor.getMinionList();
    if ((ml == null) || !ml.hasMinions())
    {
      _lastMinionsTargetRef = HardReferences.emptyRef();
      return;
    }
    final long now = System.currentTimeMillis();
    if ((_nextOrderTime > now) && (_lastMinionsTargetRef.get() != null))
    {
      final Player old_target = _lastMinionsTargetRef.get();
      if ((old_target != null) && !old_target.isAlikeDead())
      {
        for (MinionInstance m : ml.getAliveMinions())
        {
          if (!m.getAI().getAttackTarget().equals(old_target))
          {
            m.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, old_target, 10000000);
          }
        }
        return;
      }
    }
    _nextOrderTime = now + 30000;
    final List<Player> pl = World.getAroundPlayers(actor);
    if (pl.isEmpty())
    {
      _lastMinionsTargetRef = HardReferences.emptyRef();
      return;
    }
    final List<Player> alive = new LazyArrayList<>();
    for (Player p : pl)
    {
      if (!p.isAlikeDead())
      {
        alive.add(p);
      }
    }
    if (alive.isEmpty())
    {
      _lastMinionsTargetRef = HardReferences.emptyRef();
      return;
    }
    final Player target = alive.get(Rnd.get(alive.size()));
    _lastMinionsTargetRef = target.getRef();
    Functions.npcSayCustomMessage(actor, "Kama56Boss.attack", target.getName());
    for (MinionInstance m : ml.getAliveMinions())
    {
      m.getAggroList().clear();
      m.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, target, 10000000);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.