Package lineage2.commons.threading

Examples of lineage2.commons.threading.RunnableImpl


   */
  @Override
  protected void onEvtSpawn()
  {
    super.onEvtSpawn();
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        if (getActor() != null)
View Full Code Here


    }
    ServerVariables.set("SoI_opened", (System.currentTimeMillis() + time) / 1000L);
    _log.info("Seed of Infinity Manager: Opening the seed for " + Util.formatTime((int) time / 1000));
    spawnOpenedSeed();
    ReflectionUtils.getDoor(14240102).openMe();
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        closeSeed();
View Full Code Here

  @Override
  public void useSkill(final Creature activeChar, List<Creature> targets)
  {
    for (final Creature target : targets)
    {
      ThreadPoolManager.getInstance().execute(new RunnableImpl()
      {
        @Override
        public void runImpl()
        {
          if (target instanceof FeedableBeastInstance)
View Full Code Here

        final Creature randomHated = actor.getAggroList().getRandomHated();
        if (randomHated != null)
        {
          setAttackTarget(randomHated);
          actor.startConfused();
          ThreadPoolManager.getInstance().schedule(new RunnableImpl()
          {
            @Override
            public void runImpl()
            {
              final NpcInstance actor = getActor();
View Full Code Here

      }
      setIntention(AI_INTENTION_ACTIVE);
    }
    else
    {
      ThreadPoolManager.getInstance().execute(new RunnableImpl()
      {
        @Override
        public void runImpl()
        {
          actor.moveToLocation(target.getLoc(), 10, true);
View Full Code Here

      party.broadcastToPartyMembers(owner, new ExPartyPetWindowAdd(this));
    }
    if (owner.getEffectList().getEffectByStackType("ServitorShare") != null)
    {
      final Creature SummonEffect = this;
      ThreadPoolManager.getInstance().execute(new RunnableImpl()
      {
        @Override
        public void runImpl()
        {
          final Player owner = getPlayer();
View Full Code Here

      broadcastPacketToOthers(new MagicSkillUse(this, this, 14175, 1, 3000, 0));
      broadcastPacket(new Earthquake(player.getLoc(), 10, 7));
      ThreadPoolManager.getInstance().schedule(new Shot(), 300 * 1000L);
      checkShot = false;
      ThreadPoolManager.getInstance().schedule(new RunnableImpl() {
      @Override
      public void runImpl() throws Exception {
        decayMe();
        spawnMe();
      }
      }, 3100);
      setTitle("Cannon is loading");

      Location loc = point_bombs[getNpcId()-32939];
     
      for (NpcInstance monster : World.getAroundNpcCor(loc, getCurrentRegion(), getReflectionId(), 650, 500))
      {
        if (monster == null || !monster.isNpc() || monster.getNpcId() != 22966 && monster.getNpcId() != 22965 && monster.getNpcId() != 22967)
          continue;
     
        if (monster.getNpcId() == 22966)
          Functions.spawn(monster.getLoc(), 22980);
        else if (monster.getNpcId() == 22965)
          Functions.spawn(monster.getLoc(), 22979);
        else if (monster.getNpcId() == 22967)
          Functions.spawn(monster.getLoc(), 22981);
         
        monster.decayMe();
        monster.doDie(this);
     
    } else if (command.equalsIgnoreCase("spezion_bomb"))
    {
      if (!checkShot) {
        Functions.npcSay(this, NpcString.CANNON_READY_TO_FIRE);
        player.sendPacket(new NpcHtmlMessage(player, this).setHtml("Cannon:<br><br>Preparations are underway to re-activate the cannon. This process can take up to 5 minutes."));
        return;
      } else if (!player.getInventory().destroyItemByItemId(17611, 1)) {
        player.sendPacket(new NpcHtmlMessage(player, this).setHtml("Cannon:<br><br>\"Huge Charges\" not available."));
        return;
      }
     
      checkShot = false;
      broadcastPacketToOthers(new MagicSkillUse(this, this, 14175, 1, 3000, 0));
      broadcastPacket(new Earthquake(player.getLoc(), 10, 7));
      ThreadPoolManager.getInstance().schedule(new RunnableImpl() {
      @Override
      public void runImpl() throws Exception {
        checkShot = true;
        setTitle("Empty Cannon");
      }
      }, 60000);
      ThreadPoolManager.getInstance().schedule(new RunnableImpl() {
      @Override
      public void runImpl() throws Exception {
        decayMe();
        spawnMe();
      }
View Full Code Here

   */
  public static void checkAnnihilated(final Player player)
  {
    if (isPlayersAnnihilated())
    {
      ThreadPoolManager.getInstance().schedule(new RunnableImpl()
      {
        @Override
        public void runImpl()
        {
          if (player.getParty() != null)
View Full Code Here

    if (isLogoutStarted() || isInOfflineMode())
    {
      return;
    }
    broadcastCharInfo();
    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        if (!isConnected())
View Full Code Here

   */
  private void onActive()
  {
    setNonAggroTime(0);
    sendPacket(Msg.YOU_ARE_PROTECTED_AGGRESSIVE_MONSTERS);
    ThreadPoolManager.getInstance().execute(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {       
        getSummonList().summonAll();
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.