Package l2p.gameserver.model.items

Examples of l2p.gameserver.model.items.PcFreight


    if(fee + adenaDeposit > activeChar.getAdena())
    {
      activeChar.sendPacket(Msg.YOU_LACK_THE_FUNDS_NEEDED_TO_PAY_FOR_THIS_TRANSACTION);
      return;
    }
    Warehouse warehouse = new PcFreight(_objectID);
    // Item Max Limit Check
    if(_items.size() + warehouse.listItems(ItemClass.ALL).length > activeChar.getFreightLimit())
    {
      activeChar.sendPacket(Msg.THE_CAPACITY_OF_THE_WAREHOUSE_HAS_BEEN_EXCEEDED);
      return;
    }
    // Transfer the items from activeChar's Inventory Instance to destChar's Freight Instance
    for(Integer itemObjectId : _items.keySet())
    {
      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

TOP

Related Classes of l2p.gameserver.model.items.PcFreight

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.