Gestion des signes draconiques #455

Closed
vincent.vandeme wants to merge 233 commits from v1.4-signes-draconiques into master
Showing only changes of commit 8958377fdb - Show all commits

View File

@ -35,49 +35,17 @@ export class RdDActorSheet extends ActorSheet {
/* -------------------------------------------- */ /* -------------------------------------------- */
async getData() { async getData() {
// 0.8.0
const objectData = Misc.data(this.object); const objectData = Misc.data(this.object);
// -------------- version 0.7.9
// let formData = {
// cssClass: this.entity.owner ? "editable" : "locked",
// editable: this.isEditable,
// entity: duplicate(this.entity.data),
// limited: this.entity.limited,
// options: this.options,
// owner: this.entity.owner,
// title: this.title
// }
// // Entity data
// formData.actor = formData.entity;
// formData.data = formData.entity.data;
// // Owned items
// formData.items = formData.actor.items;
// formData.items.sort((a, b) => (a.sort || 0) - (b.sort || 0));
// -------------- version 0.8.0
// // Copy and sort Items
// items.sort((a, b) => (a.sort || 0) - (b.sort || 0));
// data.items = items;
// // Copy Active Effects
// data.effects = effects;
//console.log("---- data");
// // Return template data
let formData = { let formData = {
title: this.title, title: this.title,
id: objectData.id, id: objectData.id,
type: objectData.type, type: objectData.type,
img: objectData.img, img: objectData.img,
name: objectData.name, name: objectData.name,
// actor: this.object,
editable: this.isEditable, editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked", cssClass: this.isEditable ? "editable" : "locked",
data: foundry.utils.deepClone(Misc.templateData(this.object)), data: foundry.utils.deepClone(Misc.templateData(this.object)),
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)), effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
// items: items,
limited: this.object.limited, limited: this.object.limited,
options: this.options, options: this.options,
owner: this.document.isOwner, owner: this.document.isOwner,