Package com.l2jfrozen.gameserver.network.serverpackets

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


        if(trg.isAlikeDead())
          continue;

        //trg.teleToLocation(activeChar.getX(), activeChar.getY(), activeChar.getZ(), true);
        trg.setXYZ(activeChar.getX() + Rnd.get(-10, 10), activeChar.getY() + Rnd.get(-10, 10), activeChar.getZ());
        trg.sendPacket(new ValidateLocation(trg));

        trg = null;
      }
    }
  }
View Full Code Here


      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));
    }
    else
    {
      // Calculate the distance between the L2PcInstance and the L2NpcInstance
      if(!canInteract(player) && !Config.ALLOW_REMOTE_CLASS_MASTERS)
View Full Code Here

      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));
    }
    else
    {
      // Check if the L2PcInstance is in the _aggroList of the L2GuardInstance
      if(containsTarget(player))
View Full Code Here

      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));
    }
    else
    {
      // Calculate the distance between the L2PcInstance and the L2NpcInstance
      if(!canInteract(player))
View Full Code Here

      // 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
        if (!player.inObserverMode())
          this.broadcastUserInfo();
      }
    }
    else
    {
      if (player != this)
      {
        player.sendPacket(new ValidateLocation(this));
      }
      // Check if this L2PcInstance has a Private Store
      if (getPrivateStoreType() != 0)
      {
        // Notify the L2PcInstance AI with AI_INTENTION_INTERACT
View Full Code Here

      {
        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));
        }
      }
      else
      {
        if (player != this)
        {
          player.sendPacket(new ValidateLocation(this));
        }
        // Check if this L2PcInstance has a Private Store
        if (getPrivateStoreType() != 0)
        {
          // Notify the L2PcInstance AI with AI_INTENTION_INTERACT
View Full Code Here

      su.addAttribute(StatusUpdate.MAX_HP, getMaxHp());
      player.sendPacket(su);
      su = null;

      // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client
      player.sendPacket(new ValidateLocation(this));
    }
    else
    {
      if(isAutoAttackable(player) && !isAlikeDead())
      {
View Full Code Here

      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));
    }
    else
    {
      // Calculate the distance between the L2PcInstance and the
      // L2NpcInstance
View Full Code Here

      // 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));
    }
    else
    {
      // Calculate the distance between the L2PcInstance and the L2NpcInstance
      if(!canInteract(player))
View Full Code Here

      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));
    }
    else
    {
      // Calculate the distance between the L2PcInstance and the L2NpcInstance
      if(!canInteract(player))
View Full Code Here

TOP

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

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.