Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Spawner


   * @param bossId int
   * @return Status
   */
  public Status getRaidBossStatusId(int bossId)
  {
    Spawner spawner = _spawntable.get(bossId);
    if (spawner == null)
    {
      return Status.UNDEFINED;
    }
    NpcInstance npc = spawner.getFirstSpawned();
    return npc == null ? Status.DEAD : Status.ALIVE;
  }
View Full Code Here


    FortressSiegeEvent event = getEvent(FortressSiegeEvent.class);
    SpawnExObject exObject = event.getFirstObject(FortressSiegeEvent.IN_POWER_UNITS);
    int machineNumber = -1;
    for (int i = 0; i < 3; i++)
    {
      Spawner spawn = exObject.getSpawns().get(i);
      if (spawn == powerUnit.getSpawn())
      {
        machineNumber = i;
      }
    }
View Full Code Here

        int bossId = Integer.parseInt(command.substring(12).trim());
        switch (RaidBossSpawnManager.getInstance().getRaidBossStatusId(bossId))
        {
          case ALIVE:
          case DEAD:
            Spawner spawn = RaidBossSpawnManager.getInstance().getSpawnTable().get(bossId);
            Location loc = spawn.getCurrentSpawnRange().getRandomLoc(spawn.getReflection().getGeoIndex());
            player.sendPacket(new RadarControl(2, 2, loc), new RadarControl(0, 1, loc));
            break;
          case UNDEFINED:
            player.sendMessage(new CustomMessage("lineage2.gameserver.model.instances.L2AdventurerInstance.BossNotInGame", player).addNumber(bossId));
            break;
View Full Code Here

    }
    SpawnExObject object = event.getFirstObject(FortressSiegeEvent.OUT_POWER_UNITS);
    boolean allPowerDisabled = true;
    for (int i = 0; i < 4; i++)
    {
      Spawner spawn = object.getSpawns().get(i);
      if (spawn.getFirstSpawned() != null)
      {
        allPowerDisabled = false;
      }
    }
    if (allPowerDisabled)
View Full Code Here

        message.setFile("residence2/fortress/fortress_inner_controller002.htm");
        FortressSiegeEvent event = getEvent(FortressSiegeEvent.class);
        if (event != null)
        {
          SpawnExObject exObject = event.getFirstObject(FortressSiegeEvent.SIEGE_COMMANDERS);
          Spawner spawn = exObject.getSpawns().get(3);
          MainMachineInstance machineInstance = (MainMachineInstance) spawn.getFirstSpawned();
          machineInstance.powerOff(this);
          onDecay();
        }
        break;
      case COND_TIMEOUT:
View Full Code Here

        GameObject obj = wordList.length == 1 ? activeChar.getTarget() : GameObjectsStorage.getNpc(NumberUtils.toInt(wordList[1]));
        if ((obj != null) && obj.isNpc())
        {
          NpcInstance target = (NpcInstance) obj;
          target.deleteMe();
          Spawner spawn = target.getSpawn();
          if (spawn != null)
          {
            spawn.stopRespawn();
          }
          CustomSpawnTable.getInstance().deleteSpawn(target);
        }
        else
        {
View Full Code Here

    {
      return false;
    }
    StringTokenizer st;
    NpcInstance target;
    Spawner spawn;
    NpcInstance npc;
    switch (command)
    {
      case admin_show_spawns:
        activeChar.sendPacket(new NpcHtmlMessage(5).setFile("admin/spawns.htm"));
View Full Code Here

    _zoneListener = new ZoneListener();
    for (String element : ZONES)
    {
      int random = Rnd.get(60 * 1000 * 1, 60 * 1000 * 7);
      int message;
      Zone zone = ReflectionUtils.getZone(element);
      ThreadPoolManager.getInstance().schedule(new CampDestroyTask(zone), random);
      if (random > (5 * 60000))
      {
        message = random - (5 * 60000);
        ThreadPoolManager.getInstance().schedule(new BroadcastMessageTask(0, zone), message);
      }
      if (random > (3 * 60000))
      {
        message = random - (3 * 60000);
        ThreadPoolManager.getInstance().schedule(new BroadcastMessageTask(0, zone), message);
      }
      if (random > 60000)
      {
        message = random - 60000;
        ThreadPoolManager.getInstance().schedule(new BroadcastMessageTask(0, zone), message);
      }
      if (random > 15000)
      {
        message = random - 15000;
        ThreadPoolManager.getInstance().schedule(new BroadcastMessageTask(1, zone), message);
      }
      zone.addListener(_zoneListener);
    }
    _buffTask = ThreadPoolManager.getInstance().scheduleAtFixedRate(new BuffTask(), TICK_BUFF_DELAY, TICK_BUFF_DELAY);
  }
View Full Code Here

  @Override
  public void onReload()
  {
    for (String element : ZONES)
    {
      Zone zone = ReflectionUtils.getZone(element);
      zone.removeListener(_zoneListener);
    }
    if (_buffTask != null)
    {
      _buffTask.cancel(false);
      _buffTask = null;
View Full Code Here

    @Override
    public void runImpl()
    {
      for (String element : ZONES)
      {
        Zone zone = ReflectionUtils.getZone(element);
        NpcInstance npc = getKasha(zone);
        if ((npc != null) && (zone != null))
        {
          int curseLvl = 0;
          int yearningLvl = 0;
          int despairLvl = 0;
          for (Creature c : zone.getObjects())
          {
            if (c.isMonster() && !c.isDead())
            {
              if (getRealNpcId((NpcInstance) c) == mobs[0])
              {
                curseLvl++;
              }
              else if (getRealNpcId((NpcInstance) c) == mobs[1])
              {
                yearningLvl++;
              }
              else if (getRealNpcId((NpcInstance) c) == mobs[2])
              {
                despairLvl++;
              }
            }
          }
          if ((yearningLvl > 0) || (curseLvl > 0) || (despairLvl > 0))
          {
            for (Creature cha : zone.getInsidePlayables())
            {
              boolean casted = false;
              if (curseLvl > 0)
              {
                addEffect(npc, cha.getPlayer(), SkillTable.getInstance().getInfo(_buffs[0], curseLvl), true);
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.Spawner

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.