Research:Trading and Services

Barter function
All bartering and services use a common function to evaluate costs. Uses common formula fatigueTerm for each side of a transaction.

Trainers
Standard Morrowind uses the current skill value, including fortifies and drains, which allows cheap training exploits with drain spells. A new implementation should use the skill's base value.

Comments
Multiple enchantments stack in a expensive manner, as both variables y and enchantPoints are accumulators. Strangely, the price is based on the equivalent to the spellmaking accumulator rather than the enchantment points used. Constant effect enchantments override the duration in an over-complicated manner. As fEnchantmentConstantDurationMult is 100 by default, it would be much cleaner to use that for duration in both cases.