SobranDM / foundryvtt-wwn

GNU General Public License v3.0
12 stars 18 forks source link

pass actor as data.actor instead of actor.system #65

Closed mascarenhas closed 1 year ago

mascarenhas commented 1 year ago

A fix for https://github.com/SobranDM/foundryvtt-wwn/issues/64. The use of this.system as data.actor was not affecting the other rolls as they did not use data.actor at all, but also fix them so if they use actor in the future it will be the expected object.

Loading of the table also was not working, as the type of table is prefixed with Compendium. (so Compendium.wwn.instinct, while the packs collection has wwn.instinct. Changed the code so it also works if you use a RollTable in the collection, instead of straight from the compendium pack.