If there's only one item of each type, then the basic concept that you want to have is: whenever a hero picks up an item, check to see if he already has one. If he does, drop the item he picked up.
However, if you have multiple "breastplate"-type items, you'll want to make sets of items, and whenever an item is picked up, see if he as any of the set of items in his inventory, intead of just the one.
Fairly basic idea. Now get implementing!