/****/ public static void SetDefenceMultiplier(this ItemSpec item, DamageTypeEnum damageType, float value) { var prop = item.GetProperty(ItemSpecPropertyEnum.DefenceValues); Dictionary <DamageTypeEnum, float> map; if (prop == null) { map = new Dictionary <DamageTypeEnum, float>(); } else { map = (Dictionary <DamageTypeEnum, float>)(prop.ObjectValue); } map[damageType] = value; item.SetDefenceMultipliers(map); }