Exemplo n.º 1
0
    public void unequipItem(EquipItem ei)
    {
        //make sure the item is actually in the inventory
        Item it = getItemOfType(ei.getType());

        //does it have the item
        if (!it)
        {
            Debug.LogWarning("The inventory doesnt have this item.");
            return;
        }
        //make sure its in there
        if (hasSlots(ei.getSlots()) == false)
        {
            Debug.LogWarning("The inventory doesnt have this item equipped.");
            return;
        }
        if (_checkSlots(ei) == false)
        {
            Debug.LogWarning("The inventory doesnt have this item equipped. Or perhaps its not in all of the necessary slots.");
            return;
        }
        ei.unequip();
        _removeEffectsFomrUnit(ei);
        _unfillSlots(ei);
    }