Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warning when using non-spell concentration item #4278

Closed
arbron opened this issue Sep 16, 2024 · 0 comments · Fixed by #4299
Closed

Deprecation warning when using non-spell concentration item #4278

arbron opened this issue Sep 16, 2024 · 0 comments · Fixed by #4299
Assignees
Labels
bug Functionality which is not working as intended system: activities
Milestone

Comments

@arbron
Copy link
Collaborator

arbron commented Sep 16, 2024

The createConcentrationEffectData calls getEfffectDurationFromItem, which tries to fetch from system.duration. This triggers a deprecation warning for all items but spells. These methods should be reworked to use activity data rather than item data.

Screenshot 2024-09-16 at 16 49 22
@arbron arbron added this to the D&D5E 4.0.2 milestone Sep 16, 2024
@arbron arbron added bug Functionality which is not working as intended system: activities labels Sep 16, 2024
@arbron arbron self-assigned this Sep 17, 2024
arbron added a commit that referenced this issue Sep 17, 2024
Changes a number of concentration implementation details to fully
work with activities and fix issues with concentration on
non-spell items or activities that offer concentration even if the
base item does not.

Modified `beginConcentrating` and `createConcentrationEffectData`
to accept an activity rather than an item, with a fallback that
selects the first activity and shows a deprecation warning.

Deprecated `ActiveEffect5e#getEffectDurationFromItem` and replaced
it with a `getEffectData` method on `DurationField` which serves
the same purpose.

Modified concentration checks in the activity usage process to use
`requiresConcentration` on the activity rather than the item so
that activites that require concentration on items that do not
still properly trigger.

Closes #4278
Closes #4279
Closes #4297
@arbron arbron closed this as completed in 28fbe54 Sep 17, 2024
arbron added a commit that referenced this issue Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended system: activities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant