forked from public/foundryvtt-reve-de-dragon
Rename data to formData
This commit is contained in:
@ -47,26 +47,26 @@ export class RdDItemSheet extends ItemSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
let data = super.getData();
|
||||
data.categorieCompetences = RdDItemCompetence.getCategorieCompetences();
|
||||
if ( data.item.type == 'tache' || data.item.type == 'livre' || data.item.type == 'meditation' || data.item.type == 'oeuvre') {
|
||||
data.caracList = duplicate(game.system.model.Actor.personnage.carac);
|
||||
data.competences = await RdDUtility.loadCompendiumNames( 'foundryvtt-reve-de-dragon.competences' );
|
||||
let formData = super.getData();
|
||||
formData.categorieCompetences = RdDItemCompetence.getCategorieCompetences();
|
||||
if ( formData.item.type == 'tache' || formData.item.type == 'livre' || formData.item.type == 'meditation' || formData.item.type == 'oeuvre') {
|
||||
formData.caracList = duplicate(game.system.model.Actor.personnage.carac);
|
||||
formData.competences = await RdDUtility.loadCompendiumNames( 'foundryvtt-reve-de-dragon.competences' );
|
||||
}
|
||||
if (data.item.type == 'arme') {
|
||||
data.competences = await RdDUtility.loadCompendium( 'foundryvtt-reve-de-dragon.competences', it => RdDItemCompetence.isCompetenceArme(it));
|
||||
if (formData.item.type == 'arme') {
|
||||
formData.competences = await RdDUtility.loadCompendium( 'foundryvtt-reve-de-dragon.competences', it => RdDItemCompetence.isCompetenceArme(it));
|
||||
}
|
||||
if ( data.item.type == 'recettealchimique' ) {
|
||||
RdDAlchimie.processManipulation(data.item, this.actor && this.actor._id );
|
||||
if ( formData.item.type == 'recettealchimique' ) {
|
||||
RdDAlchimie.processManipulation(formData.item, this.actor && this.actor._id );
|
||||
}
|
||||
if ( this.actor ) {
|
||||
data.isOwned = true;
|
||||
data.actorId = this.actor._id;
|
||||
formData.isOwned = true;
|
||||
formData.actorId = this.actor._id;
|
||||
}
|
||||
data.bonusCaseList = RdDItemSort.getBonusCaseList(data, true);
|
||||
data.isGM = game.user.isGM; // Pour verrouiller certaines éditions
|
||||
formData.bonusCaseList = RdDItemSort.getBonusCaseList(formData, true);
|
||||
formData.isGM = game.user.isGM; // Pour verrouiller certaines éditions
|
||||
|
||||
return data;
|
||||
return formData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user