Package lineage2.commons.threading

Examples of lineage2.commons.threading.RunnableImpl


    {
      _expireTask.cancel(false);
      _expireTask = null;
    }

    _expireTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
      @Override
      public void runImpl()
      {
        try
        {
View Full Code Here


      spawnTraps();
      actor.abortAttack(true, false);
      actor.abortCast(true, false);
      actor.setIsInvul(true);
      actor.doCast(TIAT_TRANSFORMATION_SKILL, actor, true);
      ThreadPoolManager.getInstance().schedule(new RunnableImpl()
      {
        @Override
        public void runImpl()
        {
          getActor().setCurrentHpMp(getActor().getMaxHp(), getActor().getMaxMp());
View Full Code Here

    }
    if (!_failed && (_lastAttackTime != 0) && ((_lastAttackTime + COLLAPSE_BY_INACTIVITY_INTERVAL) < System.currentTimeMillis()))
    {
      final Reflection r = actor.getReflection();
      _failed = true;
      ThreadPoolManager.getInstance().schedule(new RunnableImpl()
      {
        @Override
        public void runImpl()
        {
          for (Player pl : r.getPlayers())
View Full Code Here

    r.setReenterTime(System.currentTimeMillis());
    for (NpcInstance n : r.getNpcs())
    {
      n.deleteMe();
    }
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        for (Player pl : r.getPlayers())
View Full Code Here

  private void startDefence()
  {
    spawnByGroup("soi_hos_defence_tumor");
    doCountCoffinNotifications = true;
    coffinSpawnTask = ThreadPoolManager.getInstance().scheduleAtFixedRate(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        addSpawnWithoutRespawn(RegenerationCoffin, new Location(-173704, 218092, -9562, Location.getRandomHeading()), 250);
      }
    }, 1000L, 10000L);
    monstersSpawnTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
      @Override
      public void runImpl() throws Exception
      {
        spawnMonsters();
      }
View Full Code Here

        return;
      if(ArrayUtils.contains(monsters, self.getNpcId()) && !checkAliveMonsters())
      {
        if(monstersSpawnTask != null)
          monstersSpawnTask.cancel(false);
        monstersSpawnTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
          @Override
          public void runImpl() throws Exception
          {
            spawnMonsters();
          }
        }, 40000L);
      }
      if(self.getNpcId() == AliveTumor)
      {
        self.deleteMe();
        addSpawnWithoutRespawn(DeadTumor, roomCenter, 0);
        tumorIndex = 300;
        doCountCoffinNotifications = true;
      }
      else if(self.getNpcId() == Yehan)
        ThreadPoolManager.getInstance().schedule(new RunnableImpl(){
          @Override
          public void runImpl() throws Exception
          {
            if(monstersSpawnTask != null)
              monstersSpawnTask.cancel(false);
View Full Code Here

      if (_collapse1minTask != null)
      {
        _collapse1minTask.cancel(false);
        _collapse1minTask = null;
      }
      _collapseTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl()
      {
        @Override
        public void runImpl()
        {
          collapse();
        }
      }, timeInMillis);
      if (timeInMillis >= (60 * 1000L))
      {
        _collapse1minTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl()
        {
          @Override
          public void runImpl()
          {
            minuteBeforeCollapse();
View Full Code Here

      {
        collapse();
      }
      else
      {
        _hiddencollapseTask = ThreadPoolManager.getInstance().schedule(new RunnableImpl()
        {
          @Override
          public void runImpl()
          {
            collapse();
View Full Code Here

    ServerVariables.unset("Tauti_kills");
    ServerVariables.set("SoH_opened", (System.currentTimeMillis() + timelimit) / 1000L);
    _log.info("Seed of Hellfire Manager: Opening the seed for " + Util.formatTime((int) timelimit / 1000));
    SpawnManager.getInstance().spawn(SPAWN_GROUP);

    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl() throws Exception
      {
        closeSeed();
View Full Code Here

      else
      {
        return false;
      }
      actor.doCast(skill, actor, true);
      ThreadPoolManager.getInstance().schedule(new RunnableImpl()
      {
        @Override
        public void runImpl()
        {
          getActor().doDie(null);
View Full Code Here

TOP

Related Classes of lineage2.commons.threading.RunnableImpl

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.