Sorts en réserve éditables
This commit is contained in:
@ -84,32 +84,36 @@ export class RdDItemSheet extends ItemSheet {
|
||||
}
|
||||
|
||||
formData.categorieCompetences = RdDItemCompetence.getCategorieCompetences()
|
||||
if (formData.type == 'tache' || formData.type == 'livre' || formData.type == 'meditation' || formData.type == 'oeuvre') {
|
||||
if (this.item.type == 'tache' || this.item.type == 'livre' || this.item.type == 'meditation' || this.item.type == 'oeuvre') {
|
||||
formData.caracList = duplicate(game.system.model.Actor.personnage.carac)
|
||||
formData.caracList["reve-actuel"] = duplicate(game.system.model.Actor.personnage.reve.reve)
|
||||
formData.competences = await RdDUtility.loadCompendium('foundryvtt-reve-de-dragon.competences')
|
||||
}
|
||||
if (formData.type == 'arme') {
|
||||
if (this.item.type == 'arme') {
|
||||
formData.competences = await RdDUtility.loadCompendium('foundryvtt-reve-de-dragon.competences', it => RdDItemCompetence.isCompetenceArme(it));
|
||||
console.log(formData.competences)
|
||||
}
|
||||
if (formData.type == 'recettealchimique') {
|
||||
if (this.item.type == 'recettealchimique') {
|
||||
RdDAlchimie.processManipulation(this.item, this.actor && this.actor.id);
|
||||
}
|
||||
if (formData.type == 'gemme') {
|
||||
if (this.item.type == 'gemme') {
|
||||
formData.gemmeTypeList = RdDGemme.getGemmeTypeOptionList();
|
||||
RdDGemme.calculDataDerivees(this.item);
|
||||
}
|
||||
if (formData.type == 'potion') {
|
||||
if (this.item.type == 'potion') {
|
||||
if (this.dateUpdated) {
|
||||
formData.system.prdate = this.dateUpdated;
|
||||
this.dateUpdated = undefined;
|
||||
}
|
||||
RdDHerbes.updatePotionData(formData);
|
||||
}
|
||||
if (formData.isOwned && formData.type == 'herbe' && (formData.system.categorie == 'Soin' || formData.system.categorie == 'Repos')) {
|
||||
if (formData.isOwned && this.item.type == 'herbe' && (formData.system.categorie == 'Soin' || formData.system.categorie == 'Repos')) {
|
||||
formData.isIngredientPotionBase = true;
|
||||
}
|
||||
if (this.item.type == 'sortreserve') {
|
||||
const sortId = this.item.system.sortid;
|
||||
formData.sort = formData.isOwned ? this.item.actor.items.get(sortId) : game.items.get(sortId);
|
||||
}
|
||||
formData.bonusCaseList = RdDItemSort.getBonusCaseList(formData, true);
|
||||
|
||||
return formData;
|
||||
|
Reference in New Issue
Block a user