Fix potions permanente

This commit is contained in:
2022-03-02 20:19:02 +01:00
parent a3e1c2e1fc
commit 2ce8b35da0
3 changed files with 4 additions and 4 deletions

View File

@ -388,7 +388,7 @@ export class RdDActor extends Actor {
async verifierPotionsEnchantees() {
let potionsEnchantees = this.filterItemsData(it => it.type == 'potion' && it.data.categorie.toLowerCase().includes('enchant'));
for (let potion of potionsEnchantees) {
if (!potion.prpermanent) {
if (!potion.data.prpermanent) {
console.log(potion);
let newPr = (potion.data.pr > 0) ? potion.data.pr - 1 : 0;
let update = { _id: potion._id, 'data.pr': newPr };