public void ChangeItemSlot(ItemFunction item, ItemFunction slot)
    {
        //slot = item;
        slot.isBlank = false;
        item.isBlank = true;

        //setIcon logic
        int tempIconNumber;

        tempIconNumber = item.GetIconNumber();
        item.itemImage.SetActive(false);
        slot.itemImage = slot.icons[tempIconNumber];
        slot.SetIconNumber(tempIconNumber);
        slot.itemImage.SetActive(true);


        //Name Swap Logic
        slot.SetName(item.GetName());
        item.name = null;


        //Price Swap Logic
        slot.SetPrice(item.GetPrice());
        item.SetPrice(0.0f);

        //Quality Swap Logic
        slot.SetItemQuality(item.GetQuality());
        item.SetItemQuality(0.0f);

        //Tag Swap Logic
        string tagSwap;

        tagSwap = slot.GetTag();
        slot.SetTag(item.GetTag());
        item.SetTag(tagSwap);
        tagSwap = null;

        //Swap enchantment if item has it
        if (item.isEnchanted == true)
        {
            item.EnchantOff();
            slot.EnchantOn();
        }

        //Swap item type string
        string tempType;

        tempType = item.GetItemType();
        item.SetItemType("");
        slot.SetItemType(tempType);

        //Swap Colour logic
        Color tempColour;

        tempColour = item.GetImageColour();
        item.SetImageColour(new Color(1, 1, 1));
        slot.SetImageColour(tempColour);
    }
    // Update is called once per frame
    void Update()
    {
        infoText.text  = forgeInfo;
        forgeCost.text = (Mathf.RoundToInt(price) + "G");
        if (ForgePart != null && ForgeMaterial != null)
        {
            Debug.Log("Creating item");
            ItemFunction PartFunc, MatFunc;

            MatFunc  = ForgeMaterial.GetComponent <ItemFunction>();
            PartFunc = ForgePart.GetComponent <ItemFunction>();
            resultFunc.SetItemType(PartFunc.GetItemType());
            resultFunc.SetName((MatFunc.GetName() + " " + PartFunc.GetName()));
            resultFunc.SetItemQuality(MatFunc.GetQuality());
            resultFunc.SetTag("Item");
            string CaseTpye = MatFunc.GetName();
            switch (CaseTpye)
            {
            case "Iron":
                matColour = new Color(0.4823529f, 0.4823529f, 0.4823529f);
                break;

            case "Copper":
                matColour = new Color(0.8862745f, 0.5921569f, 0.1529412f);
                break;

            case "Bronze":
                matColour = new Color(0.5849056f, 0.4014046f, 0.06897471f);
                break;

            case "Mythril":
                matColour = new Color(0.6427109f, 0.9528301f, 0.9528302f);
                break;
            }
            resultFunc.SetIcon(PartFunc.GetIconNumber());
            resultFunc.SetImageColour(matColour);
            Debug.Log(resultFunc.GetImageColour());
            resultFunc.SetPrice(PartFunc.GetPrice() * MatFunc.GetPrice());
            price = resultFunc.GetPrice();
        }
    }
    // Update is called once per frame



    public void ShowTooltip(ItemFunction item)
    {
        toolTipPrice.text = (item.GetPrice() + "G");

        float newQual;
        float oldQual = item.GetQuality();

        newQual             = (Mathf.RoundToInt(oldQual / 0.5f) * 0.5f);
        toolTipQuality.text = (newQual + " / 5");

        toolTipName.text = item.GetName();
        toolTipMenu.SetActive(true);
    }
    // Update is called once per frame
    private void Update()
    {
        if (priceRaiseAmount <= -4)
        {
            priceRaiseAmount = -4;
        }
        if (sellSlot.tag != "EmptySlot")
        {
            defaultPrice = sellFunction.GetPrice();

            if (priceRaiseAmount <= -10)
            {
                priceRaiseAmount = -10;
            }
            newPrice = defaultPrice + (defaultPrice * (0.05f * priceRaiseAmount));

            defaultPriceText.text = (defaultPrice + "G");
            newPriceText.text     = (Mathf.RoundToInt(newPrice) + "G");

            changePercent = (5 * priceRaiseAmount);
            if (changePercent >= 0)
            {
                changePercentText.text = ("+ " + changePercent + "%");
            }
            else if (changePercent < 0 && changePercent > -20)
            {
                changePercentText.text = (changePercent + "%");
            }
            else if (changePercent == -20)
            {
                changePercentText.text = (changePercent + "% + Reputation");
            }
        }
        else
        {
            defaultPriceText.text  = ("0G");
            newPriceText.text      = ("0G");
            changePercentText.text = ("");
        }
    }