Item won't Unequip when Removed from the Inventory?

So, I have a consumable item that I am reducing in my character's inventory using InventoryBase.RemoveItemIdentifierAmount() (so it can give the correct slot # instead of -1). Except when the amount hits 0, the Item Set Manager won't deactivate the item set and move to the rule that has nothing in the given slot, so EquipUnequip is returning false on line 392 and not unequipping.
Why is this happening? And how do I fix it?
 
Without stepping through your code I am not sure, but I would check the condition that is causing StartEquipUnequip to return false at that location. From there you'd be able to determine how to work around it.
 
It's because the ability is not active yet (so !IsActive returns true), and m_ItemSetManager.GetActiveItemSetIndex(m_ItemSetGroupIndex) is returning the same number as the provided itemSetIndex (which, I should think it should be because that's the item set [the currently active item set] I want to unequip).

I went through my code again, and I think it was because the default item set had the item equipped, so on EquipUnequip.cs Line #1163 m_ItemSetManager.GetDefaultItemSetIndex(m_ItemSetGroupIndex) was spitting out the same active index number resulting in the above listed conditions. I had not noticed before that it was getting the default item set index.

I should think that listing a blank item set where the item starts unequipped will cause the code to work as I want. But the problem comes from the fact I want the character to start out with the consumable equipped and ready to use by default at the start of the game.

I've actually already found a work around for my specific use-case that fits more in line with the mechanics and controls for my game, so I'll make this as "solved", but having the ability not start when I want the active/default item set to be unequipped seems like an oversight to me.
 
Top