I have narrowed it down, my custom loot system is conflicting with mana restore. Can anyone see in this script how it is blocking my mana potions?
function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
return...