Package com.l2jfrozen.gameserver.network.serverpackets

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


          L2PcInstance otherPlayer = (L2PcInstance) object;

          if(otherPlayer.isInBoat())
          {
            otherPlayer.getPosition().setWorldPosition(otherPlayer.getBoat().getPosition().getWorldPosition());
            _activeChar.sendPacket(new CharInfo(otherPlayer));
            int relation = otherPlayer.getRelation(_activeChar);

            if(otherPlayer.getKnownList().getKnownRelations().get(_activeChar.getObjectId()) != null && otherPlayer.getKnownList().getKnownRelations().get(_activeChar.getObjectId()) != relation)
            {
              _activeChar.sendPacket(new RelationChanged(otherPlayer, relation, _activeChar.isAutoAttackable(otherPlayer)));
            }

            _activeChar.sendPacket(new GetOnVehicle(otherPlayer, otherPlayer.getBoat(), otherPlayer.getInBoatPosition().getX(), otherPlayer.getInBoatPosition().getY(), otherPlayer.getInBoatPosition().getZ()));
          }
          else
          {
            _activeChar.sendPacket(new CharInfo(otherPlayer));
            int relation = otherPlayer.getRelation(_activeChar);

            if(otherPlayer.getKnownList().getKnownRelations().get(_activeChar.getObjectId()) != null && otherPlayer.getKnownList().getKnownRelations().get(_activeChar.getObjectId()) != relation)
            {
              _activeChar.sendPacket(new RelationChanged(otherPlayer, relation, _activeChar.isAutoAttackable(otherPlayer)));
View Full Code Here


        // send packets
        InventoryUpdate iu = new InventoryUpdate();
        iu.addModifiedItem(itemInstance);
        player.sendPacket(iu);
        player.broadcastPacket(new CharInfo(player));
        player.sendPacket(new UserInfo(player));

        iu = null;

        // informations
View Full Code Here

        String id = st.nextToken();

        activeChar.getPoly().setPolyInfo("npc", id);
        activeChar.teleToLocation(activeChar.getX(), activeChar.getY(), activeChar.getZ(), false);

        CharInfo info1 = new CharInfo(activeChar);
        activeChar.broadcastPacket(info1);
        UserInfo info2 = new UserInfo(activeChar);
        activeChar.sendPacket(info2);

        info1 = null;
        info2 = null;
        id = null;
      }
      catch(Exception e)
      {
        if(Config.ENABLE_ALL_EXCEPTIONS)
          e.printStackTrace();
      }
    }

    else if(command.startsWith("admin_unpolyself"))
    {
      try
      {
        activeChar.getPoly().setPolyInfo(null, "1");
        activeChar.decayMe();
        activeChar.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ());

        CharInfo info1 = new CharInfo(activeChar);
        activeChar.broadcastPacket(info1);
        UserInfo info2 = new UserInfo(activeChar);
        activeChar.sendPacket(info2);

        info1 = null;
View Full Code Here

      {
        L2PcInstance otherPlayer = (L2PcInstance) object;
        if(otherPlayer.isInBoat())
        {
          otherPlayer.getPosition().setWorldPosition(otherPlayer.getBoat().getPosition().getWorldPosition());
          active_char.sendPacket(new CharInfo(otherPlayer));

          int relation = otherPlayer.getRelation(active_char);

          if(otherPlayer.getKnownList().getKnownRelations().get(active_char.getObjectId()) != null && otherPlayer.getKnownList().getKnownRelations().get(active_char.getObjectId()) != relation)
          {
            active_char.sendPacket(new RelationChanged(otherPlayer, relation, active_char.isAutoAttackable(otherPlayer)));
          }

          active_char.sendPacket(new GetOnVehicle(otherPlayer, otherPlayer.getBoat(), otherPlayer.getInBoatPosition().getX(), otherPlayer.getInBoatPosition().getY(), otherPlayer.getInBoatPosition().getZ()));

        }
        else
        {
          active_char.sendPacket(new CharInfo(otherPlayer));

          int relation = otherPlayer.getRelation(active_char);

          if(otherPlayer.getKnownList().getKnownRelations().get(active_char.getObjectId()) != null && otherPlayer.getKnownList().getKnownRelations().get(active_char.getObjectId()) != relation)
          {
View Full Code Here

     
      // send packets
      InventoryUpdate iu = new InventoryUpdate();
      iu.addModifiedItem(itemInstance);
      activeChar.sendPacket(iu);
      activeChar.broadcastPacket(new CharInfo(activeChar));
      activeChar.sendPacket(new UserInfo(activeChar));
      //activeChar.broadcastPacket(new ExBrExtraUserInfo(activeChar));
     
      // informations
      activeChar.sendMessage("Changed enchantment of " + activeChar.getName() + "'s " + itemInstance.getItem().getName() + " from " + curEnchant + " to " + ench + ".");
View Full Code Here

    {
      setIsOverloaded(false);
      _curWeightPenalty = 0;
      super.removeSkill(getKnownSkill(4270));
      sendPacket(new EtcStatusUpdate(this));
      Broadcast.toKnownPlayers(this, new CharInfo(this));
    }
    else
    {
      int maxLoad = getMaxLoad();
      if(maxLoad > 0)
      {
        //setIsOverloaded(getCurrentLoad() > maxLoad);
        //int weightproc = getCurrentLoad() * 1000 / maxLoad;
        long weightproc = (long) ((getCurrentLoad() - calcStat(Stats.WEIGHT_PENALTY, 1, this, null)) * 1000 / maxLoad);
        int newWeightPenalty;

        if(weightproc < 500)
        {
          newWeightPenalty = 0;
        }
        else if(weightproc < 666)
        {
          newWeightPenalty = 1;
        }
        else if(weightproc < 800)
        {
          newWeightPenalty = 2;
        }
        else if(weightproc < 1000)
        {
          newWeightPenalty = 3;
        }
        else
        {
          newWeightPenalty = 4;
        }

        if(_curWeightPenalty != newWeightPenalty)
        {
          _curWeightPenalty = newWeightPenalty;
          if(newWeightPenalty > 0)
          {
            super.addSkill(SkillTable.getInstance().getInfo(4270, newWeightPenalty));
            sendSkillList(); // Fix visual bug
          }
          else
          {
            super.removeSkill(getKnownSkill(4270));
            sendSkillList(); // Fix visual bug
          }

          sendPacket(new EtcStatusUpdate(this));
          Broadcast.toKnownPlayers(this, new CharInfo(this));
        }
      }
    }
   
    sendPacket(new UserInfo(this));
View Full Code Here

    if(Config.DEBUG)
    {
      _log.fine("players to notify:" + getKnownList().getKnownPlayers().size() + " packet: [S] 03 CharInfo");
    }

    Broadcast.toKnownPlayers(this, new CharInfo(this));
  }
View Full Code Here

      {
        L2PcInstance target = L2World.getInstance().getPlayer(it.next().toString());
        target.getPoly().setPolyInfo("npc", id);
        target.teleToLocation(target.getX(), target.getY(), target.getZ(), true);

        CharInfo info1 = new CharInfo(target);
        target.broadcastPacket(info1);

        UserInfo info2 = new UserInfo(target);
        target.sendPacket(info2);
View Full Code Here

        target.getPoly().setPolyInfo(null, "1");
        target.decayMe();
        target.spawnMe(target.getX(), target.getY(), target.getZ());

        CharInfo info1 = new CharInfo(target);
        target.broadcastPacket(info1);

        UserInfo info2 = new UserInfo(target);
        target.sendPacket(info2);
View Full Code Here

TOP

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

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.