forked from public/foundryvtt-reve-de-dragon
Gestion de la capacité des conteneurs et regression fix
This commit is contained in:
@ -169,8 +169,12 @@ export class RdDActorSheet extends ActorSheet {
|
||||
if ( dropID ) { // Dropped over an item !!!
|
||||
let objetId = dragData.id || dragData.data._id;
|
||||
if ( this.objetVersConteneur[objetId] != dropID ) {
|
||||
this.actor.enleverDeConteneur(objetId, this.objetVersConteneur[objetId]);
|
||||
this.actor.ajouterAConteneur(objetId, dropID);
|
||||
if ( this.actor.testConteneurCapacite(objetId, dropID) ) {
|
||||
this.actor.enleverDeConteneur(objetId, this.objetVersConteneur[objetId]);
|
||||
this.actor.ajouterAConteneur(objetId, dropID);
|
||||
} else {
|
||||
ui.notifications.info("Capacité d'encombrement insuffisante dans le conteneur !");
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log("DATA !!!!", dragData, dropID );
|
||||
|
Reference in New Issue
Block a user