change armor and weapon to be attachableItem

This commit is contained in:
psitacus 2025-07-11 19:11:04 -06:00
parent 1fc136c81b
commit a78e1533d7
5 changed files with 82 additions and 19 deletions

View file

@ -129,7 +129,7 @@ export async function handleAttachmentEffectsOnEquipChange({ parentItem, newEqui
// Item is being unequipped - remove attachment effects
const parentUuidProperty = `${parentType}Uuid`;
const effectsToRemove = actor.effects.filter(effect => {
const attachmentSource = effect.flags?.daggerheart?.attachmentSource;
const attachmentSource = effect.getFlag(CONFIG.DH.id, CONFIG.DH.FLAGS.itemAttachmentSource);
return attachmentSource && attachmentSource[parentUuidProperty] === parentItem.uuid;
});