Examples of Spawner


Examples of juju.reattore.util.Spawner

    public void begin()
        throws Exception {

        log.info("Running '" + startupCmd + "' in dir: " + dir);

        proc = new Spawner();
        proc.setCommand(startupCmd);
        proc.setDir(dir);

        proc.spawn();
View Full Code Here

Examples of juju.reattore.util.Spawner

                log.info("Exit value: " + proc.exitValue());

                log.info("Shutting down using " + shutdownCmd);

                Spawner shut = new Spawner();
                shut.setCommand(shutdownCmd);
               
                shut.spawn();
                shut.waitDone();

                Thread.sleep(2000);
            }
        }
    }
View Full Code Here

Examples of juju.reattore.util.Spawner

    extends TestCase {

    public void testSpawn()
        throws Exception {

        Spawner sp = new Spawner();
        sp.setCommand("ls");

        sp.spawn();
       
        sp.waitDone();

        assertEquals(0, sp.exitValue());

        assertTrue(sp.getOutput().size() > 0);
    }
View Full Code Here

Examples of juju.reattore.util.Spawner

    }

    public void testDestroy()
        throws Exception {

        Spawner sp = new Spawner();
        sp.setCommand("sleep 60");

        sp.spawn();
       
        sp.destroy();

        assertEquals(true, sp.isDone());
    }
View Full Code Here

Examples of lineage2.gameserver.model.Spawner

              }
            }
          }
          for (NpcInstance work : works)
          {
            Spawner spawn = work.getSpawn();
            if (spawn == null)
            {
              continue;
            }
            spawn.decreaseScheduledCount();
            if (spawn.isDoRespawn())
            {
              spawn.respawnNpc(work);
            }
          }
        }
        catch (Exception e)
        {
View Full Code Here

Examples of lineage2.gameserver.model.Spawner

    List<CMGSiegeClanObject> attackers = miniGameEvent.getObjects(SiegeEvent.ATTACKERS);
    int index = attackers.indexOf(_winner);
    String arenaName = "arena_" + index;
    miniGameEvent.spawnAction(arenaName, false);
    SpawnExObject spawnEx = miniGameEvent.getFirstObject(arenaName);
    Spawner spawner = spawnEx.getSpawns().get(0);
    Location loc = (Location) spawner.getCurrentSpawnRange();
    miniGameEvent.removeBanishItems();
    final NpcInstance npc = NpcUtils.spawnSingle(35600, loc.x, loc.y, loc.z, 0);
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
View Full Code Here

Examples of lineage2.gameserver.model.Spawner

   * Method updateStatusDb.
   * @param id int
   */
  private void updateStatusDb(int id)
  {
    Spawner spawner = _spawntable.get(id);
    if (spawner == null)
    {
      return;
    }
    StatsSet info = _storedInfo.get(id);
    if (info == null)
    {
      _storedInfo.put(id, info = new StatsSet());
    }
    NpcInstance raidboss = spawner.getFirstSpawned();
    if (raidboss instanceof ReflectionBossInstance)
    {
      return;
    }
    if (raidboss != null)
    {
      info.set("current_hp", raidboss.getCurrentHp());
      info.set("current_mp", raidboss.getCurrentMp());
      info.set("respawn_delay", 0);
    }
    else
    {
      info.set("current_hp", 0);
      info.set("current_mp", 0);
      info.set("respawn_delay", spawner.getRespawnTime());
    }
    Connection con = null;
    PreparedStatement statement = null;
    try
    {
View Full Code Here

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

Examples of lineage2.gameserver.model.Spawner

    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

Examples of lineage2.gameserver.model.Spawner

        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
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.