jessev14 / pf2e-staves

MIT License
5 stars 9 forks source link

Add updateItem hook #11

Closed jjnich closed 1 year ago

jjnich commented 1 year ago

This uses the update item hook to delete and recreate the spellcasting entry on the character sheet. I'm sure there's a more graceful way to do this (like reading and updating the spellcasting entry), but this should work.

This solves Issue #9

jessev14 commented 1 year ago

Thanks for starting this. Didn't love duplicating the same logic in both hooks, so I just made the entry handling a function that updates an existing entry or creates a new one if an existing entry isn't found.