Package net.sf.l2j.gameserver.serverpackets

Examples of net.sf.l2j.gameserver.serverpackets.StatusUpdate$Attribute


      // Send a Server->Client packet MyTargetSelected to the L2PcInstance player
      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


        double mp = ( damage > target.getCurrentMp() ? target.getCurrentMp() : damage);
        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

    // Send the InventoryUpdate Server->Client Packet to the player
        // 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

    if (Config.DEBUG)
      _log.fine("Learned skill " + _id + " for " + _requiredSp + " SP.");

    player.setSp(player.getSp() - _requiredSp);

    StatusUpdate su = new StatusUpdate(player.getObjectId());
    su.addAttribute(StatusUpdate.SP, player.getSp());
    player.sendPacket(su);

        SystemMessage sp = new SystemMessage(SystemMessageId.SP_DECREASED_S1);
        sp.addNumber(_requiredSp);
        sendPacket(sp);
View Full Code Here

    if(mp > maxmp)
    {
      mp = maxmp;
    }
    getEffected().setCurrentMp(mp);
    StatusUpdate sump = new StatusUpdate(getEffected().getObjectId());
    sump.addAttribute(StatusUpdate.CUR_MP, (int)mp);
    getEffected().sendPacket(sump);
    return true;
  }
View Full Code Here

    if(hp > maxhp)
    {
      hp = maxhp;
    }
    getEffected().setCurrentHp(hp);
    StatusUpdate suhp = new StatusUpdate(getEffected().getObjectId());
    suhp.addAttribute(StatusUpdate.CUR_HP, (int)hp);
    getEffected().sendPacket(suhp);
    return true;
  }
View Full Code Here

      double hpAdd = _absorbAbs + _absorbPart * damage;
      double hp = ((activeChar.getCurrentHp() + hpAdd) > activeChar.getMaxHp() ? activeChar.getMaxHp() : (activeChar.getCurrentHp() + hpAdd));

            activeChar.setCurrentHp(hp);

      StatusUpdate suhp = new StatusUpdate(activeChar.getObjectId());
      suhp.addAttribute(StatusUpdate.CUR_HP, (int)hp);
      activeChar.sendPacket(suhp);

            // Check to see if we should damage the target
            if (damage > 0 && (!target.isDead() || getTargetType() != SkillTargetType.TARGET_CORPSE_MOB))
            {
View Full Code Here

        if(cp > maxcp)
        {
            cp = maxcp;
        }
        getEffected().setCurrentCp(cp);
        StatusUpdate sump = new StatusUpdate(getEffected().getObjectId());
        sump.addAttribute(StatusUpdate.CUR_CP, (int)cp);
        getEffected().sendPacket(sump);
        return true;
    }
View Full Code Here

              sm = null;
          }
      }
        player.sendPacket(new ItemList(player, false));

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

        // finally, give the tax to the castle...
    if (merchant.getIsInTown() && merchant.getCastle().getOwnerId() > 0)
View Full Code Here

      {
        sendPacket(new ItemList(this, false));
      }
     
      // Update current load as well
      StatusUpdate su = new StatusUpdate(getObjectId());
      su.addAttribute(StatusUpdate.CUR_LOAD, getCurrentLoad());
      sendPacket(su);
     
      // Cursed Weapon
      if (CursedWeaponsManager.getInstance().isCursed(newitem.getItemId()))
      {
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.serverpackets.StatusUpdate$Attribute

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.