Package net.sf.l2j.gameserver.serverpackets

Examples of net.sf.l2j.gameserver.serverpackets.StatusUpdate.addAttribute()


      {
        if (su == null)
        {
          su = new StatusUpdate(getObjectId());
        }
        su.addAttribute(StatusUpdate.CAST_SPD, getMAtkSpd());
      }
      // else if (stat==Stats.MAX_HP) // TODO: self only and add more stats...
      // {
      // if (su == null) su = new StatusUpdate(getObjectId());
      // su.addAttribute(StatusUpdate.MAX_HP, getMaxHp());
View Full Code Here


        {
          if (su == null)
          {
            su = new StatusUpdate(getObjectId());
          }
          su.addAttribute(StatusUpdate.MAX_CP, getMaxCp());
        }
      }
      // else if (stat==Stats.MAX_MP)
      // {
      // if (su == null) su = new StatusUpdate(getObjectId());
View Full Code Here

      // Consume MP of the L2Character and Send the Server->Client packet StatusUpdate with current HP and MP to all other L2PcInstance to inform
      double mpConsume = getStat().getMpConsume(skill);
      if (mpConsume > 0)
      {
        getStatus().reduceMp(calcStat(Stats.MP_CONSUME_RATE, mpConsume, null, null));
        su.addAttribute(StatusUpdate.CUR_MP, (int) getCurrentMp());
        isSendStatus = true;
      }
     
      // Consume HP if necessary and Send the Server->Client packet StatusUpdate with current HP and MP to all other L2PcInstance to inform
      if (skill.getHpConsume() > 0)
View Full Code Here

          consumeHp = getCurrentHp() - 1.0;
        }
       
        getStatus().reduceHp(consumeHp, this);
       
        su.addAttribute(StatusUpdate.CUR_HP, (int) getCurrentHp());
        isSendStatus = true;
      }
     
      // Send a Server->Client packet StatusUpdate with MP modification to the L2PcInstance
      if (isSendStatus)
View Full Code Here

      //int cLev = activeChar.getLevel();
      //hp += skill.getPower()/*+(Math.sqrt(cLev)*cLev)+cLev*/;
            target.setLastHealAmount((int)mp);
      target.setCurrentMp(mp+target.getCurrentMp());
      StatusUpdate sump = new StatusUpdate(target.getObjectId());
      sump.addAttribute(StatusUpdate.CUR_MP, (int)target.getCurrentMp());
      target.sendPacket(sump);

            if (actChar instanceof L2PcInstance && actChar != target)
            {
                SystemMessage sm = new SystemMessage(SystemMessageId.S2_MP_RESTORED_BY_S1);
View Full Code Here

      activeChar.sendPacket(iu);
    }
    else sendPacket(new ItemList(activeChar, true));

    StatusUpdate su = new StatusUpdate(activeChar.getObjectId());
    su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad());
    activeChar.sendPacket(su);

    L2World world = L2World.getInstance();
    world.removeObject(removedItem);
  }
View Full Code Here

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

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

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

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

        target.reduceCurrentMp(mp);
        if (damage > 0)
          if (target.isSleeping()) target.stopSleeping(null);

        StatusUpdate sump = new StatusUpdate(target.getObjectId());
        sump.addAttribute(StatusUpdate.CUR_MP, (int) target.getCurrentMp());
        // [L2J_JP EDIT START - TSL]
        target.sendPacket(sump);
        SystemMessage sm = new SystemMessage(SystemMessageId.S2_MP_HAS_BEEN_DRAINED_BY_S1);
        if (activeChar instanceof L2NpcInstance)
        {
View Full Code Here

        // Add Items in player inventory and equip them
    player.sendPacket(playerIU);

        // Send the StatusUpdate Server->Client Packet to the player with new CUR_LOAD (0x0e) information
    StatusUpdate su = new StatusUpdate(player.getObjectId());
    su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
    player.sendPacket(su);

        // Send a Server->Client packet UserInfo to this L2PcInstance and CharInfo to all L2PcInstance in its _KnownPlayers
    player.broadcastUserInfo();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.