public void EquipItem()
    {
        itemInventoryIndex = transform.GetSiblingIndex();

        if (slotIndex < 10)
        {
            if (hero.equipment.GetEquipment[slotIndex] != null)
            {
                equipmentPanel.EquipAndUnEquip(item, hero.equipment.GetEquipment[slotIndex], slotIndex, itemInventoryIndex);
                return;
            }
            equipmentPanel.EquipItem(item, slotIndex, itemInventoryIndex);
        }
        else if (slotIndex == 99)
        {
            if (hero.equipment.GetEquipment[slotIndex] != null)
            {
                equipmentPanel.EquipAndUnEquip(item, hero.equipment.GetEquipment[slotIndex], slotIndex, itemInventoryIndex);
            }
            if (hero.equipment.GetEquipment[slotIndex] != null)
            {
                equipmentPanel.UnEquipItem(item, slotIndex);
                return;
            }
            if (hero.equipment.GetEquipment[slotIndex] == null)
            {
                equipmentPanel.EquipItem(item, 2, itemInventoryIndex);
            }
        }
        detailsPanel.SetActive(false);
    }