[Code Request] Mana use event
itsmeow opened this issue ยท 4 comments
Someone I know wants me to make an addon for this mod that adds an enchant for armor that reduces total mana use in general, but there's no event for mana use. It's hardcoded. I simply want a cancelable event with non-final mana value (a pre event for before armor reduction is applied and a post for after).
I was looking at this exact thing just yesterday, in fact. I'm converting cost over to be part of the modifiers system, so you'll be able to edit it in SpellCastEvent.Pre
(this will also be how the armour does it, so you'll be able to use event priority to control whether your changes are applied before or after the armour reductions).
In the meantime, you can achieve the same result by modifying the wand's durability in SpellCastEvent.Post
. Obviously that's not ideal but it'll work for now!