Fix objet dans lui-même

This commit is contained in:
sladecraven 2021-01-08 08:19:44 +01:00
parent a4289d1ea6
commit 67e95229cb

View File

@ -282,7 +282,7 @@ export class RdDUtility {
let dropID = $(event.target).parents(".item").attr("data-item-id"); // Only relevant if container drop let dropID = $(event.target).parents(".item").attr("data-item-id"); // Only relevant if container drop
if ( dropID ) { // Dropped over an item !!! if ( dropID ) { // Dropped over an item !!!
let objetId = dragData.id || dragData.data._id; let objetId = dragData.id || dragData.data._id;
if ( actorSheet.objetVersConteneur[objetId] != dropID ) { if ( actorSheet.objetVersConteneur[objetId] != dropID && objetId != dropID) {
if ( actorSheet.actor.testConteneurCapacite(objetId, dropID) ) { if ( actorSheet.actor.testConteneurCapacite(objetId, dropID) ) {
await actorSheet.actor.enleverDeConteneur(objetId, actorSheet.objetVersConteneur[objetId]); await actorSheet.actor.enleverDeConteneur(objetId, actorSheet.objetVersConteneur[objetId]);
await actorSheet.actor.ajouterAConteneur(objetId, dropID); await actorSheet.actor.ajouterAConteneur(objetId, dropID);