Package l2p.gameserver.model.items

Examples of l2p.gameserver.model.items.PcInventory.addItem()


      sendPacket(Msg.YOU_HAVE_EXCEEDED_THE_WEIGHT_LIMIT);
      return;
    }
    L2ItemInstance item = petInventory.dropItem(_objectId, _amount, false);
    item.setCustomFlags(item.getCustomFlags() & ~L2ItemInstance.FLAG_PET_EQUIPPED, true);
    playerInventory.addItem(item);
    pet.sendItemList();
    pet.broadcastPetInfo();
    Log.LogItem(activeChar, activeChar.getPet(), Log.GetItemFromPet, petItem);
  }
}
View Full Code Here


          activeChar.sendPacket(SystemMessage.obtainItems(product));
          if(logExchange)
          {
            msgb.append("\t<add id=").append(product.getItemId()).append(" count=").append(product.getCount()).append(">\n");
          }
          inv.addItem(product);
        }
        else
        {
          for(int i = 0; i < _amount; i++)
          {
View Full Code Here

        }
        else
        {
          for(int i = 0; i < _amount; i++)
          {
            L2ItemInstance product = inv.addItem(ItemTable.getInstance().createItem(in.getItemId()));
            if(_keepenchant)
            {
              product.setEnchantLevel(_enchant);
              if(_enchantAttr != L2Item.ATTRIBUTE_NONE)
              {
View Full Code Here

    {
      System.out.println("WTF? Request to enchant " + itemToEnchant.getItemId());
      activeChar.sendPacket(EnchantResult.CANCEL);
      activeChar.sendActionFailed();
      activeChar.sendPacket(Msg.SYSTEM_ERROR);
      inventory.addItem(removedScroll);
      return;
    }
    if(scroll.isDivineEnchantScroll()) // Item Mall divine
    {
      chance = 100;
View Full Code Here

          if(count < 1)
          {
            count = 1;
          }
          crystalsToAdd.setCount(count);
          inventory.addItem(crystalsToAdd);
          Log.LogItem(activeChar, Log.Sys_GetItem, crystalsToAdd);
          activeChar.sendPacket(new EnchantResult(1, crystalsToAdd.getItemId(), count), SystemMessage.obtainItems(crystalId, count, 0));
        }
        else
        {
View Full Code Here

            item.setLocation(ItemLocation.INVENTORY);
            item.setCustomFlags(FLAGS, false);
            // При нулевом количестве выдача предмета не производится
            if(ITEM_COUNT > 0)
            {
              newItem = inv.addItem(item);
              if(newItem == null)
              {
                _log.warning("Unable to delayed create item " + ITEM_ID + " request " + PAYMENT_ID);
                continue;
              }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.