Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.Die


  void changeAura(NpcInstance actor, int npcId)
  {
    if (npcId != actor.getDisplayId())
    {
      actor.setDisplayId(npcId);
      DeleteObject d = new DeleteObject(actor);
      L2GameServerPacket su = new StatusUpdate(actor).addAttribute(StatusUpdateField.CUR_HP, StatusUpdateField.MAX_HP);
      for (Player player : World.getAroundPlayers(actor))
      {
        player.sendPacket(d, new NpcInfo(actor, player));
        if (player.getTarget() == actor)
View Full Code Here


        sendPacket(new RecipeShopMsg(activeChar));
      }
    }
    if (activeChar.isDead())
    {
      sendPacket(new Die(activeChar));
    }
    activeChar.unsetVar("offline");
    activeChar.sendActionFailed();
    if (first && activeChar.isGM() && Config.SAVE_GM_EFFECTS && activeChar.getPlayerAccess().CanUseGMCommand)
    {
View Full Code Here

  {
    Creature actor = getActor();
    actor.abortAttack(true, true);
    actor.abortCast(true, true);
    actor.stopMove();
    actor.broadcastPacket(new Die(actor));
    setIntention(CtrlIntention.AI_INTENTION_IDLE);
  }
View Full Code Here

        {
          activeChar.doRevive(100);
        }
        else
        {
          activeChar.sendPacket(ActionFail.STATIC, new Die(activeChar));
        }
        break;
      case FIXED:
        if (activeChar.getPlayerAccess().ResurectFixed)
        {
          activeChar.doRevive(100);
        }
        else if (ItemFunctions.removeItem(activeChar, 13300, 1, true) == 1)
        {
          activeChar.sendPacket(SystemMsg.YOU_HAVE_USED_THE_FEATHER_OF_BLESSING_TO_RESURRECT);
          activeChar.doRevive(100);
        }
        else if (ItemFunctions.removeItem(activeChar, 10649, 1, true) == 1)
        {
          activeChar.sendPacket(SystemMsg.YOU_HAVE_USED_THE_FEATHER_OF_BLESSING_TO_RESURRECT);
          activeChar.doRevive(100);
        }
        else
        {
          activeChar.sendPacket(ActionFail.STATIC, new Die(activeChar));
        }
        break;
      default:
        Location loc = null;
        Reflection ref = activeChar.getReflection();
        if (ref == ReflectionManager.DEFAULT)
        {
          for (GlobalEvent e : activeChar.getEvents())
          {
            loc = e.getRestartLoc(activeChar, _restartType);
          }
        }
        if (loc == null)
        {
          loc = defaultLoc(_restartType, activeChar);
        }
        if (loc != null)
        {
          Pair<Integer, OnAnswerListener> ask = activeChar.getAskListener(false);
          if ((ask != null) && (ask.getValue() instanceof ReviveAnswerListener) && !((ReviveAnswerListener) ask.getValue()).isForPet())
          {
            activeChar.getAskListener(true);
          }
          activeChar.setPendingRevive(true);
          activeChar.teleToLocation(loc, ReflectionManager.DEFAULT);
        }
        else
        {
          activeChar.sendPacket(ActionFail.STATIC, new Die(activeChar));
        }
        break;
    }
  }
View Full Code Here

  @Override
  protected void onSpawn()
  {
    super.onSpawn();
    setCurrentHp(0, false);
    broadcastPacket(new Die(this));
    setWalking();
  }
View Full Code Here

  public void onShutdown()
  {}
 
  public void broadcastPacket(int value, boolean b)
  {
    L2GameServerPacket trigger = new EventTrigger(value, b);
    for (Player player : GameObjectsStorage.getAllPlayersForIterate())
      player.sendPacket(trigger);

  }
View Full Code Here

  }
 
  public void broadcastSend(Castle castle)
  {
    L2GameServerPacket trigger = new ExCastleState(castle);
    for (Player player : GameObjectsStorage.getAllPlayersForIterate())
      player.sendPacket(trigger);

  }
View Full Code Here

      if (castle != null)
      { 
        if(_side.ordinal()==1 || _side.ordinal()==0)
        {
        ((Player) cha).sendPacket(new ExCastleState(castle));
        broadcastPacket(_side.ordinal(),true);
        broadcastSend(castle);
        Announcements.getInstance().announceToAll(new ExCastleState(castle));
        //broadcastPacket(_side.ordinal(),false);
        }
        else
        {
        ((Player) cha).sendPacket(new ExCastleState(castle));
        broadcastPacket(_side.ordinal(),true);
        broadcastSend(castle);
        Announcements.getInstance().announceToAll(new ExCastleState(castle));
        //broadcastPacket(_side.ordinal(),false);
        }
       
        //return;
      }
View Full Code Here

  @Override
  public void onPlayerEnter(Player player)
  {
    super.onPlayerEnter(player);
    player.sendPacket(new ExSendUIEvent(player, 0, 1, (int) (System.currentTimeMillis() - _savedTime) / 1000, 0, NpcString.NONE));
  }
View Full Code Here

  @Override
  public void onPlayerExit(Player player)
  {
    super.onPlayerExit(player);
    player.sendPacket(new ExSendUIEvent(player, 1, 1, 0, 0));
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.network.serverpackets.Die

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.