etiquettestartshere / effectivetray

A module for dnd5e on foundryvtt that allows the effects and damage trays to be used more effectively.
MIT License
4 stars 2 forks source link

[#91] Add socket event for `ActiveEffect5e#addDependent`. #92

Closed krbz999 closed 2 months ago

krbz999 commented 2 months ago

Closes #91.

When attempting to use ActiveEffec5e#addDependent ownership was not checked. This results in players attempting to update a concentration tracking effect they do not have ownership of.

This PR adds a fallback, such that if the user is not owner of the concentration effect (if it exists), they won't themselves call addDependent but provide a hook operation option that a different user will respond to.

When implementing this change, I tested before and after on dnd5e v3.3.0 and saw no other issues regarding effect transfer.