Package l2p.gameserver.serverpackets

Examples of l2p.gameserver.serverpackets.StatusUpdate


    }
  }

  public StatusUpdate makeStatusUpdate(int... fields)
  {
    StatusUpdate su = new StatusUpdate(getObjectId());
    for(int field : fields)
    {
      switch(field)
      {
        case StatusUpdate.CUR_HP:
          su.addAttribute(field, (int) getCurrentHp());
          break;
        case StatusUpdate.MAX_HP:
          su.addAttribute(field, getMaxHp());
          break;
        case StatusUpdate.CUR_MP:
          su.addAttribute(field, (int) getCurrentMp());
          break;
        case StatusUpdate.MAX_MP:
          su.addAttribute(field, getMaxMp());
          break;
        case StatusUpdate.KARMA:
          su.addAttribute(field, getKarma());
          break;
        case StatusUpdate.CUR_CP:
          su.addAttribute(field, (int) getCurrentCp());
          break;
        case StatusUpdate.MAX_CP:
          su.addAttribute(field, getMaxCp());
          break;
        default:
          System.out.println("unknown StatusUpdate field: " + field);
          Thread.dumpStack();
          break;
View Full Code Here


    }
    if(!needStatusUpdate())
    {
      return;
    }
    StatusUpdate su = makeStatusUpdate(StatusUpdate.CUR_HP, StatusUpdate.CUR_MP, StatusUpdate.CUR_CP);
    for(L2Character temp : list)
    {
      if(!Config.FORCE_STATUSUPDATE)
      {
        if(temp.getTarget() == this)
View Full Code Here

   * Если парти нет, то отправляет лично игроку
   */
  private void sendPartyInfo()
  {
    // Эти статы нужно рассылать только для партии игрока
    StatusUpdate partyUpdate = new StatusUpdate(_activeChar.getObjectId());
    if(_maxCp != _activeChar.getMaxCp())
    {
      partyUpdate.addAttribute(StatusUpdate.MAX_CP, _activeChar.getMaxCp());
    }
    if(_maxHp != _activeChar.getMaxHp())
    {
      partyUpdate.addAttribute(StatusUpdate.MAX_HP, _activeChar.getMaxHp());
    }
    if(_maxMp != _activeChar.getMaxMp())
    {
      partyUpdate.addAttribute(StatusUpdate.MAX_MP, _activeChar.getMaxMp());
    }
    L2Party party = _activeChar.getParty();
    if(partyUpdate.hasAttributes())
    {
      if(party != null)
      {
        party.broadcastToPartyMembers(partyUpdate);
      }
View Full Code Here

TOP

Related Classes of l2p.gameserver.serverpackets.StatusUpdate

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.