Fix #1 for dropping items from compendium

This commit is contained in:
sladecraven 2022-09-25 14:13:57 +02:00
parent 7a1171b774
commit 7d3f880633

View File

@ -426,11 +426,15 @@ export class PegasusItemSheet extends ItemSheet {
let data = event.dataTransfer.getData('text/plain')
let dataItem = JSON.parse( data)
console.log("DROP", event, dataItem )
const item = fromUuidSync(dataItem.uuid)
let item = fromUuidSync(dataItem.uuid)
if (item.pack) {
item = await PegasusUtility.searchItem(item)
}
if (!item) {
ui.notifications.warn("Unable to find relevant item - Aborting drag&drop " + data.uuid)
return
}
console.log("DROP REULT", this.object.type, item.type)
if (this.object.type == 'virtue' ) {
if (item.type == 'effect') {