Package com.l2jfrozen.gameserver.network.serverpackets

Examples of com.l2jfrozen.gameserver.network.serverpackets.StatusUpdate$Attribute


    // Check if this skill consume mp on start casting
    int initmpcons = getStat().getMpInitialConsume(skill);

    if(initmpcons > 0)
    {
      StatusUpdate su = new StatusUpdate(getObjectId());

      if(skill.isDance())
      {
        getStatus().reduceMp(calcStat(Stats.DANCE_MP_CONSUME_RATE, initmpcons, null, null));
      }
      else if(skill.isMagic())
      {
        getStatus().reduceMp(calcStat(Stats.MAGICAL_MP_CONSUME_RATE, initmpcons, null, null));
      }
      else
      {
        getStatus().reduceMp(calcStat(Stats.PHYSICAL_MP_CONSUME_RATE, initmpcons, null, null));
      }

      su.addAttribute(StatusUpdate.CUR_MP, (int) getCurrentMp());
      sendPacket(su);
      su = null;
    }

    // Disable the skill during the re-use delay and create a task EnableSkill with Medium priority to enable it at the end of the re-use delay
View Full Code Here


    if(stats == null || stats.isEmpty())
      return;

    boolean broadcastFull = false;
    boolean otherStats = false;
    StatusUpdate su = null;

    for(Stats stat : stats)
    {
      if(stat == Stats.POWER_ATTACK_SPEED)
      {
        if(su == null)
        {
          su = new StatusUpdate(getObjectId());
        }

        su.addAttribute(StatusUpdate.ATK_SPD, getPAtkSpd());
      }
      else if(stat == Stats.MAGIC_ATTACK_SPEED)
      {
        if(su == null)
        {
          su = new StatusUpdate(getObjectId());
        }

        su.addAttribute(StatusUpdate.CAST_SPD, getMAtkSpd());
      }
      //else if (stat==Stats.MAX_HP) //
      //{
      //  if (su == null) su = new StatusUpdate(getObjectId());
      //  su.addAttribute(StatusUpdate.MAX_HP, getMaxHp());
      //}
      else if(stat == Stats.MAX_CP)
      {
        if(this instanceof L2PcInstance)
        {
          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

    }
     
     
    try{
     
      StatusUpdate su = new StatusUpdate(getObjectId());
      boolean isSendStatus = false;

      // 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)
      {
        if(skill.isDance())
        {
          getStatus().reduceMp(calcStat(Stats.DANCE_MP_CONSUME_RATE, mpConsume, null, null));
        }
        else if(skill.isMagic())
        {
          getStatus().reduceMp(calcStat(Stats.MAGICAL_MP_CONSUME_RATE, mpConsume, null, null));
        }
        else
        {
          getStatus().reduceMp(calcStat(Stats.PHYSICAL_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)
      {
        double consumeHp;

        consumeHp = calcStat(Stats.HP_CONSUME_RATE, skill.getHpConsume(), null, null);

        if(consumeHp + 1 >= getCurrentHp())
        {
          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

    MyTargetSelected my = new MyTargetSelected(trasformedNpc.getObjectId(), this.getLevel() - trasformedNpc.getLevel());
    this.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(trasformedNpc.getObjectId());
    su.addAttribute(StatusUpdate.CUR_HP, (int) trasformedNpc.getCurrentHp());
    su.addAttribute(StatusUpdate.MAX_HP, trasformedNpc.getMaxHp());
    this.sendPacket(su);
    su = null;
  }
View Full Code Here

    {
      activeChar.sendPacket(new ItemList(activeChar, false));
    }

    // status & user info
    StatusUpdate su = new StatusUpdate(activeChar.getObjectId());
    su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad());
    activeChar.sendPacket(su);

    activeChar.broadcastUserInfo();

    L2World world = L2World.getInstance();
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);
      }
      else
      {
        // Send a Server->Client packet MyTargetSelected to the
View Full Code Here

      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());
      su.addAttribute(StatusUpdate.CUR_HP, (int) getStatus().getCurrentHp());
      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));
View Full Code Here

    {
      player.sendPacket(new ItemList(player, false));
    }

    // Update current load status on player
    StatusUpdate su = new StatusUpdate(player.getObjectId());
    su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
    player.sendPacket(su);

    player.setActiveWarehouse(null);
  }
View Full Code Here

        _log.fine("Learned skill " + _skillId + " for " + _requiredSp + " SP.");
      }

      player.getStat().removeExpAndSp(_requiredExp, _requiredSp);

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

      SystemMessage ep = new SystemMessage(SystemMessageId.EXP_DECREASED_BY_S1);
      ep.addNumber(_requiredExp);
      sendPacket(ep);
View Full Code Here

    }

    // Send update packets
    player.sendPacket(playerIU);

    StatusUpdate su = new StatusUpdate(player.getObjectId());
    su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
    player.sendPacket(su);
  }
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.network.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.