Fix dragging currency to other actors (#1998)

This commit is contained in:
Carlos Fernandez 2026-06-13 06:11:08 -04:00 committed by GitHub
parent a486ed75a2
commit 44b2adf296
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,6 +39,7 @@ export default class ItemTransferDialog extends HandlebarsApplicationMixin(Appli
const homebrewKey = CONFIG.DH.SETTINGS.gameSettings.Homebrew;
const currencySetting = game.settings.get(CONFIG.DH.id, homebrewKey).currency?.[currency] ?? null;
const max = item?.system.quantity ?? originActor.system.gold[currency] ?? 0;
const isQuantifiable = targetActor.system.metadata.quantifiable?.includes(item?.type);
return {
originActor,
@ -46,7 +47,7 @@ export default class ItemTransferDialog extends HandlebarsApplicationMixin(Appli
itemImage: item?.img,
currencyIcon: currencySetting?.icon,
max,
initial: targetActor.system.metadata.quantifiable?.includes(item.type) ? max : 1,
initial: isQuantifiable || !!currencySetting ? max : 1,
title: item?.name ?? currencySetting?.label
};
}