Package lineage2.gameserver.model.items

Examples of lineage2.gameserver.model.items.PcInventory.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


        {
          continue;
        }
        ItemInstance item = inventory.removeItemByObjectId(_items[i], _itemQ[i]);
        Log.LogItem(player, Log.FreightDeposit, item);
        freight.addItem(item);
      }
    }
    catch (ArithmeticException ae)
    {
      player.sendPacket(SystemMsg.YOU_HAVE_EXCEEDED_THE_QUANTITY_THAT_CAN_BE_INPUTTED);
View Full Code Here

                  }
                  if (augmentationId != 0)
                  {
                    product.setAugmentationId(augmentationId);
                  }
                  inventory.addItem(product);
                  activeChar.sendPacket(SystemMessage2.obtainItems(product));
                  break cycle1;
                 
                }
                chanceFrom += chance;
View Full Code Here

                }
                if (augmentationId != 0)
                {
                  product.setAugmentationId(augmentationId);
                }
                inventory.addItem(product);
                activeChar.sendPacket(SystemMessage2.obtainItems(product));
              }
            }
            else
            {
View Full Code Here

                }
                chanceFrom += chance;
              }
              else
              {
                inventory.addItem(product);
                activeChar.sendPacket(SystemMessage2.obtainItems(product));
              }
            }
          }
        }
View Full Code Here

            }
            item.setLocation(ItemLocation.INVENTORY);
            item.setCustomFlags(FLAGS);
            if (ITEM_COUNT > 0)
            {
              newItem = inv.addItem(item);
              if (newItem == null)
              {
                _log.warn("Unable to delayed create item " + ITEM_ID + " request " + PAYMENT_ID);
                continue;
              }
View Full Code Here

      if (!CommissionShopDAO.getInstance().removeItem(auctionId))
      {
        return;
      }
      container.removeItem(itemInfo.getItem());
      inventory.addItem(itemInfo.getItem());
      Log.LogItem(player, Log.CommissionItemDelete, itemInfo.getItem());
    }
    catch (Exception e)
    {
      e.printStackTrace();
View Full Code Here

        return;
      }
      int receiverId = itemInfo.getItem().getOwnerId();
      inventory.reduceAdena(price);
      container.removeItem(itemInfo.getItem());
      inventory.addItem(itemInfo.getItem());
      player.sendPacket(new ExResponseCommissionBuyItem(1, itemInfo.getItem().getItemId(), itemInfo.getItem().getCount()));
      long fee = (long) Math.max(1000, price * SALE_FEE);
      Mail mail = new Mail();
      mail.setSenderId(receiverId);
      mail.setSenderName(itemInfo.getSellerName());
View Full Code Here

    if (!activeChar.getInventory().validateCapacity(slots))
    {
      sendPacket(Msg.YOUR_INVENTORY_IS_FULL);
      return;
    }
    playerInventory.addItem(petInventory.removeItemByObjectId(_objectId, _amount));
    pet.sendChanges();
    activeChar.sendChanges();
  }
}
View Full Code Here

    if (!pet.getInventory().validateCapacity(slots))
    {
      sendPacket(Msg.DUE_TO_THE_VOLUME_LIMIT_OF_THE_PETS_INVENTORY_NO_MORE_ITEMS_CAN_BE_PLACED_THERE);
      return;
    }
    petInventory.addItem(playerInventory.removeItemByObjectId(_objectId, _amount));
    pet.sendChanges();
    activeChar.sendChanges();
  }
}
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.