Masquer attributs magiques si non-magique

This commit is contained in:
Vincent Vandemeulebrouck
2021-05-06 21:36:40 +02:00
parent b531e97fd1
commit 474a6a7ed8
8 changed files with 18 additions and 16 deletions

View File

@ -349,7 +349,7 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */
async verifierPotionsEnchantees() {
let potionsEnchantees = this.filterItemsData(it => it.type == 'potion' && it.data.isEnchante);
let potionsEnchantees = this.filterItemsData(it => it.type == 'potion' && it.data.magique);
for (let potion of potionsEnchantees) {
if (!potion.prpermanent) {
console.log(potion);
@ -3444,7 +3444,7 @@ export class RdDActor extends Actor {
potionData.alias = this.name;
potionData.supprimer = true;
if (potionData.data.isEnchante) {
if (potionData.data.magique) {
ChatMessage.create({
whisper: ChatUtility.getWhisperRecipientsAndGMs(game.user.name),
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-consommer-potion-soin.html`, potionData)
@ -3476,7 +3476,7 @@ export class RdDActor extends Actor {
potionData.alias = this.name;
potionData.supprimer = true;
if (potionData.data.isEnchante) {
if (potionData.data.magique) {
ChatMessage.create({
whisper: ChatUtility.getWhisperRecipientsAndGMs(game.user.name),
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-consommer-potion-repos.html`, potionData)