Package com.l2jfrozen.gameserver.network.serverpackets

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


    {
      // 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 player
      player.setTarget(this);
     
      // Send a Server->Client packet MyTargetSelected to the player
      // The color to display in the select window is White
      player.sendPacket(new MyTargetSelected(getObjectId(), 0));
      if (player != this)
      {
        player.sendPacket(new ValidateLocation(this));
       
        // To be sure update also the pvp flag / war tag status
View Full Code Here

    if (player.isGM())
    {
      if (this != player.getTarget())
      {
        player.setTarget(this);
        player.sendPacket(new MyTargetSelected(getObjectId(), 0));
        if (player != this)
        {
          player.sendPacket(new ValidateLocation(this));
         
          // To be sure update also the pvp flag / war tag status
          if (!player.inObserverMode())
            this.broadcastUserInfo();
        }
      }
      else
      {
        AdminEditChar.gatherCharacterInfo(player, this, "charinfo.htm");
      }
    }
    else
    // Like L2OFF set the target of the L2PcInstance player
    {
      if (((TvT.is_started() || TvT.is_teleport()) && !Config.TVT_ALLOW_INTERFERENCE) || ((CTF.is_started() || CTF.is_teleport()) && !Config.CTF_ALLOW_INTERFERENCE) || ((DM.is_started() || DM.is_teleport()) && !Config.DM_ALLOW_INTERFERENCE))
      {
        if ((_inEventTvT && !player._inEventTvT) || (!_inEventTvT && player._inEventTvT))
        {
          player.sendPacket(ActionFailed.STATIC_PACKET);
          return;
        }
        else if ((_inEventCTF && !player._inEventCTF) || (!_inEventCTF && player._inEventCTF))
        {
          player.sendPacket(ActionFailed.STATIC_PACKET);
          return;
        }
        else if ((_inEventDM && !player._inEventDM) || (!_inEventDM && player._inEventDM))
        {
          player.sendPacket(ActionFailed.STATIC_PACKET);
          return;
        }
      }
      // Check if the L2PcInstance is confused
      if (player.isOutOfControl())
      {
        // Send a Server->Client packet ActionFailed to the player
        player.sendPacket(ActionFailed.STATIC_PACKET);
        return;
      }
     
      // Check if the player already target this L2PcInstance
      if (player.getTarget() != this)
      {
        // Set the target of the player
        player.setTarget(this);
       
        // Send a Server->Client packet MyTargetSelected to the player
        // The color to display in the select window is White
        player.sendPacket(new MyTargetSelected(getObjectId(), 0));
        if (player != this)
        {
          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(), 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());
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);

      // 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);

      // 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
      // The color to display in the select window is White
      MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
      player.sendPacket(my);
      my = null;

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

    // Check if the L2PcInstance already target the L2NpcInstance
    if(this != player.getTarget())
    {
      // Set the target of the L2PcInstance player
      player.setTarget(this);
      player.sendPacket(new MyTargetSelected(getObjectId(), 0));
    }
    else
    {
      MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
      player.sendPacket(my);
      my = null;

      // Calculate the distance between the L2PcInstance and the L2NpcInstance
      if(!player.isInsideRadius(this, INTERACTION_DISTANCE, false, false))
View Full Code Here

    @Override
    public void onAction(L2PcInstance player)
    {
    if (this != player.getTarget()) {
      player.setTarget(this);
      player.sendPacket(new MyTargetSelected(getObjectId(), player.getLevel() - getLevel()));
      player.sendPacket(new ValidateLocation(this));
    }
    else if (isInsideRadius(player, INTERACTION_DISTANCE, false, false))
    {
      //SocialAction sa = new SocialAction(this, Rnd.get(8));
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

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.