Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.InventoryUpdate


    if (equipped)
    {
      activeChar.getInventory().equipItem(_item);
      activeChar.getInventory().isRefresh = false;
    }
    activeChar.sendPacket(new InventoryUpdate().addModifiedItem(_item));
    activeChar.sendPacket(new ExChangeAttributeOk());
  }
View Full Code Here


   */
  @Override
  protected void sendAddItem(ItemInstance item)
  {
    Player actor = getActor();
    actor.sendPacket(new InventoryUpdate().addNewItem(item));
    if (item.getTemplate().getAgathionEnergy() > 0)
    {
      actor.sendPacket(new ExBR_AgathionEnergyInfo(1, item));
    }
  }
View Full Code Here

   */
  @Override
  protected void sendModifyItem(ItemInstance item)
  {
    Player actor = getActor();
    actor.sendPacket(new InventoryUpdate().addModifiedItem(item));
    if (item.getTemplate().getAgathionEnergy() > 0)
    {
      actor.sendPacket(new ExBR_AgathionEnergyInfo(1, item));
    }
  }
View Full Code Here

   * @param item ItemInstance
   */
  @Override
  protected void sendRemoveItem(ItemInstance item)
  {
    getActor().sendPacket(new InventoryUpdate().addRemovedItem(item));
  }
View Full Code Here

      {
        sm = new SystemMessage(SystemMessage.S1S_REMAINING_MANA_IS_NOW_0_AND_THE_ITEM_HAS_DISAPPEARED);
      }
      else
      {
        player.sendPacket(new InventoryUpdate().addModifiedItem(item));
      }
      if (sm != null)
      {
        sm.addItemName(item.getItemId());
        player.sendPacket(sm);
View Full Code Here

    targetItem.update();
    if (equipped)
    {
      activeChar.getInventory().equipItem(targetItem);
    }
    InventoryUpdate iu = new InventoryUpdate().addModifiedItem(targetItem);
    SystemMessage sm = new SystemMessage(SystemMessage.AUGMENTATION_HAS_BEEN_SUCCESSFULLY_REMOVED_FROM_YOUR_S1);
    sm.addItemName(targetItem.getItemId());
    activeChar.sendPacket(new ExVariationCancelResult(1), iu, sm);
    for (ShortCut sc : activeChar.getAllShortCuts())
    {
View Full Code Here

          return "30747_13a.htm";
        }
        dragonflute.setItemId((Dragon_Bugle_of_Wind + dragonflute.getItemId()) - Dragonflute_of_Wind);
        dragonflute.setJdbcState(JdbcEntityState.UPDATED);
        dragonflute.update();
        st.getPlayer().sendPacket(new InventoryUpdate().addModifiedItem(dragonflute));
        st.playSound(SOUND_FINISH);
        st.exitCurrentQuest(true);
        return "30747_13.htm";
      }
    }
View Full Code Here

        {
          activeChar.getInventory().unEquipItemInBodySlot(EhchantItem.getEquipSlot());
        }
        EhchantItem.setEnchantLevel(EchantVal);
        activeChar.getInventory().equipItem(EhchantItem);
        activeChar.sendPacket(new InventoryUpdate().addModifiedItem(EhchantItem));
        activeChar.broadcastUserInfo();
        activeChar.sendMessage("" + EhchantItem.getTemplate().getName() + " was enchanted to " + EchantVal + ". Thanks.");
        onBypassCommand(activeChar, "_bbsechant;");
      }
      else
      {
        activeChar.sendPacket(SystemMsg.INCORRECT_ITEM_COUNT);
      }
    }
    if (command.startsWith("_bbsechant;enchantgoAtr;"))
    {
      StringTokenizer st = new StringTokenizer(command, ";");
      st.nextToken();
      st.nextToken();
      int EchantVal = Integer.parseInt(st.nextToken());
      int AtrType = Integer.parseInt(st.nextToken());
      Element el = Element.getElementById(AtrType);
      int EchantPrice = Integer.parseInt(st.nextToken());
      int EchantObjID = Integer.parseInt(st.nextToken());
      ItemTemplate item = ItemHolder.getInstance().getTemplate(Config.ENCHANTER_ITEM_ID);
      ItemInstance pay = activeChar.getInventory().getItemByItemId(item.getItemId());
      ItemInstance EhchantItem = activeChar.getInventory().getItemByObjectId(EchantObjID);
      if (EhchantItem.isWeapon())
      {
        if ((pay != null) && (pay.getCount() >= EchantPrice))
        {
          activeChar.getInventory().destroyItem(pay, EchantPrice);
          if (EhchantItem.isEquipped())
          {
            activeChar.getInventory().unEquipItemInBodySlot(EhchantItem.getEquipSlot());
          }
          EhchantItem.setAttributeElement(el, EchantVal);
          activeChar.getInventory().equipItem(EhchantItem);
          activeChar.sendPacket(new InventoryUpdate().addModifiedItem(EhchantItem));
          activeChar.broadcastUserInfo();
          activeChar.sendMessage("" + EhchantItem.getTemplate().getName() + " was enchanted to " + EchantVal + ". Thanks.");
          onBypassCommand(activeChar, "_bbsechant;");
        }
        else
        {
          activeChar.sendPacket(SystemMsg.INCORRECT_ITEM_COUNT);
        }
      }
      else if (EhchantItem.isArmor())
      {
        if (!canEnchantArmorAttribute(AtrType, EhchantItem))
        {
          activeChar.sendMessage("attribute reservation by region?");
          onBypassCommand(activeChar, "_bbsechant;");
          return;
        }
        if ((pay != null) && (pay.getCount() >= EchantPrice))
        {
          activeChar.getInventory().destroyItem(pay, EchantPrice);
          if (EhchantItem.isEquipped())
          {
            activeChar.getInventory().unEquipItemInBodySlot(EhchantItem.getEquipSlot());
          }
          EhchantItem.setAttributeElement(el, EchantVal);
          activeChar.getInventory().equipItem(EhchantItem);
          activeChar.sendPacket(new InventoryUpdate().addModifiedItem(EhchantItem));
          activeChar.broadcastUserInfo();
          activeChar.sendMessage("" + EhchantItem.getTemplate().getName() + " was enchanted to " + EchantVal + ". Thanks.");
          onBypassCommand(activeChar, "_bbsechant;");
        }
      }
View Full Code Here

    if (itemId == 0)
    {
      return;
    }
    player.getInventory().unEquipItem(item);
    player.sendPacket(new InventoryUpdate().addRemovedItem(item));
    item.setItemId(itemId);
    player.sendPacket(new ShortCutInit(player));
    for (int shotId : player.getAutoSoulShot())
    {
      player.sendPacket(new ExAutoSoulShot(shotId, true));
    }
    player.sendPacket(new InventoryUpdate().addNewItem(item));
    player.sendPacket(new SystemMessage2(SystemMsg.YOU_HAVE_EQUIPPED_YOUR_S1).addItemNameWithAugmentation(item));
    player.getInventory().equipItem(item);
  }
View Full Code Here

      if (control != null)
      {
        control.setCustomType2(1);
        control.setJdbcState(JdbcEntityState.UPDATED);
        control.update();
        player.sendPacket(new InventoryUpdate().addModifiedItem(control));
      }
      show("�?м�? �?терто.", player);
    }
    else if (Config.SERVICES_CHANGE_PET_NAME_ITEM == 57)
    {
View Full Code Here

TOP

Related Classes of lineage2.gameserver.network.serverpackets.InventoryUpdate

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.