private static ExtendedPropertiesStruct GetProps(ItemObject item) { if (!ExtendedProperties.ContainsKey(item)) { ExtendedProperties[item] = ExtendedPropertiesStruct.CreateDefault(); } return(ExtendedProperties[item]); }
private static void SetProps(ItemObject item, ExtendedPropertiesStruct props) { ExtendedProperties[item] = props; }
public static void SetQuantity(this ItemObject item, int amount) { ExtendedPropertiesStruct props = GetProps(item); props.Quantity = amount; }