Examples of addItem()


Examples of l2p.gameserver.TradeController.NpcTradeList.addItem()

              item.setItemId(s.getId());
              item.setOwnersPrice(s.getPrice());
              item.setCount(s.getCanProduce());
              if(item.getCount() > 0 && item.getOwnersPrice() > 0)
              {
                tradeList.addItem(item);
              }
            }
            BuyListSeed bl = new BuyListSeed(tradeList, castleId, player.getAdena());
            player.sendPacket(bl);
          }
View Full Code Here

Examples of l2p.gameserver.model.L2TradeList.addItem()

    // Строим список вещей, годных для продажи имеющихся в инвентаре
    for(L2ItemInstance item : seller.getInventory().getItemsList())
    {
      if(item != null && item.canBeTraded(seller) && item.getItemId() != L2Item.ITEM_ID_ADENA)
      {
        _list.addItem(item);
      }
    }
    _haveList = new ConcurrentLinkedQueue<TradeItem>();
    // Делаем список для собственно передачи с учетом количества
    for(L2ItemInstance item : _list.getItems())
View Full Code Here

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

      {
        seller.reduceAdena(tax, true);
        Stat.addTax(tax);
        seller.sendMessage(new CustomMessage("trade.HavePaidTax", seller).addNumber(tax));
      }
      temp = buyerInv.addItem(TransferItem);
      Log.LogItem(buyer, seller, Log.PrivateStoreBuy, TransferItem, amount);
      if(!temp.isStackable())
      {
        if(temp.getEnchantLevel() > 0)
        {
View Full Code Here

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

      L2ItemInstance found = inventory.getItemByObjectId(itemObjectId);
      if(found == null || !found.canBeDropped(activeChar, false))
      {
        continue;
      }
      warehouse.addItem(inventory.dropItem(found, _items.get(itemObjectId), false), null);
    }
    activeChar.reduceAdena(fee, true);
    activeChar.updateStats();
    // Delete destination L2Player used for freight
    activeChar.sendPacket(Msg.THE_TRANSACTION_IS_COMPLETE);
View Full Code Here

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

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

    }
    if(_amount >= playerItem.getCount())
    {
      playerInventory.dropItem(_objectId, playerItem.getCount(), false);
      playerItem.setCustomFlags(playerItem.getCustomFlags() | L2ItemInstance.FLAG_PET_EQUIPPED, true);
      petInventory.addItem(playerItem);
    }
    else
    {
      L2ItemInstance newPetItem = playerInventory.dropItem(_objectId, _amount, false);
      petInventory.addItem(newPetItem);
View Full Code Here

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

      activeChar.sendPacket(Msg.YOUR_WAREHOUSE_IS_FULL);
    }
    // Перекидываем
    for(L2ItemInstance itemToStore : itemsToStoreList)
    {
      warehouse.addItem(inventory.dropItem(itemToStore, _items.get(itemToStore.getObjectId()), false), activeChar.getName());
    }
    // Платим налог
    activeChar.reduceAdena(fee, true);
    // Обновляем параметры персонажа
    activeChar.updateStats();
View Full Code Here

Examples of l2p.gameserver.serverpackets.InventoryUpdate.addItem()

          {
            player.sendPacket(Msg.YOU_DO_NOT_HAVE_ENOUGH_ADENA);
            return;
          }
          InventoryUpdate iu = new InventoryUpdate();
          iu.addItem(player.addAdena(ancientAdenaConvert));
          iu.addItem(player.getInventory().destroyItemByItemId(SevenSigns.ANCIENT_ADENA_ID, ancientAdenaConvert, true));
          player.sendPacket(iu);
          player.sendPacket(SystemMessage.removeItems(5575, ancientAdenaConvert));
          player.sendPacket(SystemMessage.obtainItems(57, ancientAdenaConvert, 0));
          break;
View Full Code Here

Examples of l2p.gameserver.templates.L2PlayerTemplate.addItem()

        // 5items must go here
        for(int x = 1; x < 6; x++)
        {
          if(rset.getInt("char_templates.items" + x) != 0)
          {
            ct.addItem(rset.getInt("char_templates.items" + x));
          }
        }
        _templates.put(ct.classId.getId(), ct);
        //
        // Female class
View Full Code Here

Examples of lineage2.gameserver.data.xml.holder.BuyListHolder.NpcTradeList.addItem()

              item.setItemId(s.getId());
              item.setOwnersPrice(s.getPrice());
              item.setCount(s.getCanProduce());
              if ((item.getCount() > 0) && (item.getOwnersPrice() > 0))
              {
                tradeList.addItem(item);
              }
            }
            BuyListSeed bl = new BuyListSeed(tradeList, castleId, player.getAdena());
            player.sendPacket(bl);
          }
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.