He gives items that you don't already have. If you get a duplicate it's because you already have everything for THAT character. Weapons are not class specific so you must have all the weapons available that Xur can give you. (he cannot give you the raid specific items, etc..) Armor is based solely on the class you buy the engram with. If you are on your Titan and you have opened up all the exotic armor that the Titan can use and you buy the engram it will give you a duplicate. If you have an exotic armor that you are missing for a specific class then you need to make sure you buy the engram using that class. I learned this the hard way myself. I needed a set of Hunter legs but kept getting Sunshot despite already having 3 of them one of which i had equipped!