Fix #1 for dropping items from compendium
This commit is contained in:
parent
7a1171b774
commit
7d3f880633
@ -426,11 +426,15 @@ export class PegasusItemSheet extends ItemSheet {
|
|||||||
let data = event.dataTransfer.getData('text/plain')
|
let data = event.dataTransfer.getData('text/plain')
|
||||||
let dataItem = JSON.parse( data)
|
let dataItem = JSON.parse( data)
|
||||||
console.log("DROP", event, dataItem )
|
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) {
|
if (!item) {
|
||||||
ui.notifications.warn("Unable to find relevant item - Aborting drag&drop " + data.uuid)
|
ui.notifications.warn("Unable to find relevant item - Aborting drag&drop " + data.uuid)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
console.log("DROP REULT", this.object.type, item.type)
|
||||||
|
|
||||||
if (this.object.type == 'virtue' ) {
|
if (this.object.type == 'virtue' ) {
|
||||||
if (item.type == 'effect') {
|
if (item.type == 'effect') {
|
||||||
|
Loading…
Reference in New Issue
Block a user