Package com.l2jfrozen.gameserver.network.serverpackets

Examples of com.l2jfrozen.gameserver.network.serverpackets.MyTargetSelected


      {
        // Send a Server->Client packet MyTargetSelected to the
        // L2PcInstance player
        // The player.getLevel() - getLevel() permit to display the
        // correct color in the select window
        MyTargetSelected my = new MyTargetSelected(getObjectId(), player.getLevel() - getLevel());
        player.sendPacket(my);

        // Send a Server->Client packet StatusUpdate of the
        // L2NpcInstance to the L2PcInstance to update its HP bar
        StatusUpdate su = new StatusUpdate(getObjectId());
        su.addAttribute(StatusUpdate.CUR_HP, (int) getStatus().getCurrentHp());
        su.addAttribute(StatusUpdate.MAX_HP, getMaxHp());
        player.sendPacket(su);
      }
      else
      {
        // Send a Server->Client packet MyTargetSelected to the
        // L2PcInstance player
        MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
        player.sendPacket(my);
      }

      // Send a Server->Client packet ValidateLocation to correct the
      // L2NpcInstance position and heading on the client
View Full Code Here


      {
        _logPet.fine("new target selected:" + getObjectId());
      }

      player.setTarget(this);
      MyTargetSelected my = new MyTargetSelected(getObjectId(), player.getLevel() - getLevel());
      player.sendPacket(my);
      my = null;
    }
  }
View Full Code Here

    {
      // Set the target of the L2PcInstance player
      player.setTarget(this);

      // Send a Server->Client packet MyTargetSelected to the L2PcInstance player
      MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
      player.sendPacket(my);
      my = null;

      player.sendPacket(new ValidateLocation(this));
    }
View Full Code Here

    {
      // Set the target of the L2PcInstance player
      player.setTarget(this);

      // Send a Server->Client packet MyTargetSelected to the L2PcInstance player
      MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
      player.sendPacket(my);
      my = null;

      // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client
      player.sendPacket(new ValidateLocation(this));
View Full Code Here

    {
      // Set the target of the L2PcInstance player
      player.setTarget(this);

      // Send a Server->Client packet MyTargetSelected to the L2PcInstance player
      MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
      player.sendPacket(my);
      my = null;

      // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client
      player.sendPacket(new ValidateLocation(this));
View Full Code Here

    {
      // Set the target of the L2PcInstance player
      player.setTarget(this);

      // Send a Server->Client packet MyTargetSelected to the L2PcInstance player
      MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
      player.sendPacket(my);
      my = null;

      player.sendPacket(new ValidateLocation(this));
    }
View Full Code Here

      // Set the target of the L2PcInstance player
      player.setTarget(this);

      // Send a Server->Client packet MyTargetSelected to the L2PcInstance player
      // The color to display in the select window is White
      MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
      player.sendPacket(my);

      // Send a Server->Client packet ValidateLocation to correct the L2ArtefactInstance position and heading on the client
      player.sendPacket(new ValidateLocation(this));
    }
View Full Code Here

    {
      // Set the target of the L2PcInstance player
      player.setTarget(this);

      // Send a Server->Client packet MyTargetSelected to the L2PcInstance player
      MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
      player.sendPacket(my);
      my = null;

      // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client
      player.sendPacket(new ValidateLocation(this));
View Full Code Here

  public void onAction(L2PcInstance player)
  {
    if(player.getTarget() != this)
    {
      player.setTarget(this);
      MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
      player.sendPacket(my);
      my = null;
    }
  }
View Full Code Here

      // Check if the player is attackable (without a forced attack)
      if (isAutoAttackable(player))
      {
        // Send a Server->Client packet MyTargetSelected to the L2PcInstance player
        // The player.getLevel() - getLevel() permit to display the correct color in the select window
        MyTargetSelected my = new MyTargetSelected(getObjectId(), player.getLevel() - getLevel());
        player.sendPacket(my);
        my = null;
       
        // Send a Server->Client packet StatusUpdate of the L2NpcInstance to the L2PcInstance to update its HP bar
        StatusUpdate su = new StatusUpdate(getObjectId());
        su.addAttribute(StatusUpdate.CUR_HP, (int) getCurrentHp());
        su.addAttribute(StatusUpdate.MAX_HP, getMaxHp());
        player.sendPacket(su);
        su = null;
      }
      else
      {
        // Send a Server->Client packet MyTargetSelected to the L2PcInstance player
        MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
        player.sendPacket(my);
        my = null;
      }
     
      player.setTimerToAttack(System.currentTimeMillis());
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.network.serverpackets.MyTargetSelected

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.