#181 Gestion potions (fabrication)
This commit is contained in:
@ -65,6 +65,11 @@ export class RdDItemSheet extends ItemSheet {
|
||||
isSoins: false,
|
||||
isEnchante: false
|
||||
}
|
||||
if ( this.actor ) {
|
||||
formData.isOwned = true;
|
||||
formData.actorId = this.actor.id;
|
||||
}
|
||||
|
||||
formData.categorieCompetences = RdDItemCompetence.getCategorieCompetences();
|
||||
if ( formData.type == 'tache' || formData.type == 'livre' || formData.type == 'meditation' || formData.type == 'oeuvre') {
|
||||
formData.caracList = duplicate(game.system.model.Actor.personnage.carac);
|
||||
@ -83,11 +88,9 @@ export class RdDItemSheet extends ItemSheet {
|
||||
this.dateUpdated = undefined;
|
||||
}
|
||||
RdDHerbes.updatePotionData(formData);
|
||||
}
|
||||
|
||||
if ( this.actor ) {
|
||||
formData.isOwned = true;
|
||||
formData.actorId = this.actor.id;
|
||||
}
|
||||
if ( formData.isOwned && formData.type == 'herbe' && (formData.data.categorie == 'Soin' || formData.data.categorie == 'Repos') ) {
|
||||
formData.isIngredientPotionBase = true;
|
||||
}
|
||||
formData.bonusCaseList = RdDItemSort.getBonusCaseList(formData, true);
|
||||
|
||||
@ -128,7 +131,12 @@ export class RdDItemSheet extends ItemSheet {
|
||||
let actor = game.actors.get( actorId );
|
||||
actor.consommerPotion( this.item );
|
||||
});
|
||||
|
||||
html.find('.creer-potion-base').click((event) => {
|
||||
let actorId = event.currentTarget.attributes['data-actor-id'].value;
|
||||
let actor = game.actors.get( actorId );
|
||||
actor.dialogFabriquerPotion( this.item );
|
||||
});
|
||||
|
||||
html.find('.alchimie-tache a').click((event) => {
|
||||
let actorId = event.currentTarget.attributes['data-actor-id'].value;
|
||||
let recetteId = event.currentTarget.attributes['data-recette-id'].value;
|
||||
|
Reference in New Issue
Block a user