Package net.sf.l2j.gameserver.serverpackets

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


            if (partnerIU != null) _partner.sendPacket(partnerIU);
            else _partner.sendPacket(new ItemList(_partner, false));

            // Update current load as well
            StatusUpdate playerSU = new StatusUpdate(_owner.getObjectId());
            playerSU.addAttribute(StatusUpdate.CUR_LOAD, _owner.getCurrentLoad());
            _owner.sendPacket(playerSU);
            playerSU = new StatusUpdate(_partner.getObjectId());
            playerSU.addAttribute(StatusUpdate.CUR_LOAD, _partner.getCurrentLoad());
            _partner.sendPacket(playerSU);

            success = true;
        }
        // Finish the trade
View Full Code Here


                   
                    activeChar.sendPacket(iu);
                }
                else activeChar.sendPacket(new ItemList(activeChar, true));
           
                StatusUpdate su = new StatusUpdate(activeChar.getObjectId());
                su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad());
                activeChar.sendPacket(su);
           
                activeChar.broadcastUserInfo();
           
                L2World world = L2World.getInstance();
                world.removeObject(destroyItem);
            }
            else
            {
                item.setEnchantLevel(0);
                item.updateDatabase();
            }
        }
        sm = null;
       
        StatusUpdate su = new StatusUpdate(activeChar.getObjectId());
        su.addAttribute(StatusUpdate.CUR_LOAD, activeChar.getCurrentLoad());
        activeChar.sendPacket(su);     
        su = null;
       
        activeChar.sendPacket(new EnchantResult(item.getEnchantLevel())); //FIXME i'm really not sure about this...
        activeChar.sendPacket(new ItemList(activeChar, false)); //TODO update only the enchanted item
View Full Code Here

      soldMsg.setHtml(html.replaceAll("%objectId%", String.valueOf(merchant.getObjectId())));
      player.sendPacket(soldMsg);
    }

      // Update current load as well
    StatusUpdate su = new StatusUpdate(player.getObjectId());
    su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
    player.sendPacket(su);
    player.sendPacket(new ItemList(player, true));
  }
View Full Code Here

        // Send updated item list to the player
    if (playerIU != null) player.sendPacket(playerIU);
    else 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);
  }
View Full Code Here

    {
      _log.fine("Broadcast Status Update for " + getObjectId() + "(" + getName() + "). HP: " + getCurrentHp());
    }
   
    // Create the Server->Client packet StatusUpdate with current HP and MP
    StatusUpdate su = new StatusUpdate(getObjectId());
    su.addAttribute(StatusUpdate.CUR_HP, (int) getCurrentHp());
    su.addAttribute(StatusUpdate.CUR_MP, (int) getCurrentMp());
   
    // Go through the StatusListener
    // Send the Server->Client packet StatusUpdate with current HP and MP
   
    synchronized (getStatus().getStatusListener())
View Full Code Here

   
    // Check if this skill consume mp on start casting
    int initmpcons = getStat().getMpInitialConsume(skill);
    if (initmpcons > 0)
    {
      StatusUpdate su = new StatusUpdate(getObjectId());
      getStatus().reduceMp(calcStat(Stats.MP_CONSUME_RATE, initmpcons, null, null));
      su.addAttribute(StatusUpdate.CUR_MP, (int) getCurrentMp());
      sendPacket(su);
    }
   
    // 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
    if (reuseDelay > 10)
View Full Code Here

      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) // TODO: self only and add more stats...
      // {
      // 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

            ((L2Summon) target).updateEffectIcons(true);
          }
        }
      }
     
      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)
      {
        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)
      {
        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

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

      //client.getConnection().sendPacket(iu);
      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

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.