//moves the item to the inventory
        public bool moveItem(Item item, Inventory inventory)
        {
            item.activateEffects(false);
            item.activateEffects(true);
            int itemCount = inventoryToItems[inventory.getInventoryHash()].Count;
            if (itemCount < inventory.getMaximumSize())
                return moveItem(item, inventory.getInventoryHash());

            return false;
        }
예제 #2
0
 public bool isInInventory(Inventory inventory)
 {
     return ItemFactoryManager.getInstance().getItemInventoryHash(this).Equals(inventory.getInventoryHash());
 }
 //creates the item, puts it into the inventory
 public Item createItem(String XMLFile, Inventory inventory)
 {
     return createItem(XMLFile, inventory.getInventoryHash());
 }