public void LoadAttributes(int itemID, int typeID) { attributes = ItemDB.GetAttributesForItem(itemID); // Add the default attributes Dictionary <string, ItemAttribute> def = ItemDB.GetDefaultAttributesForType(typeID); foreach (KeyValuePair <string, ItemAttribute> pair in def) { if (attributes.ContainsKey(pair.Key) == false) { attributes.Add(pair.Key, pair.Value); } } }