Skip to content

Commit

Permalink
[#2444]
Browse files Browse the repository at this point in the history
  • Loading branch information
krbz999 authored and Fyorl committed Oct 25, 2023
1 parent b560113 commit d5da3db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions module/documents/active-effect.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ export default class ActiveEffect5e extends ActiveEffect {
const effect = li.dataset.effectId ? owner.effects.get(li.dataset.effectId) : null;
switch ( a.dataset.action ) {
case "create":
const isActor = owner instanceof Actor;
return owner.createEmbeddedDocuments("ActiveEffect", [{
label: game.i18n.localize("DND5E.EffectNew"),
icon: "icons/svg/aura.svg",
label: isActor ? game.i18n.localize("DND5E.EffectNew") : owner.name,
icon: isActor ? "icons/svg/aura.svg" : owner.img,
origin: owner.uuid,
"duration.rounds": li.dataset.effectType === "temporary" ? 1 : undefined,
disabled: li.dataset.effectType === "inactive"
Expand Down

0 comments on commit d5da3db

Please sign in to comment.