forked from public/foundryvtt-reve-de-dragon
Fix: vente depuis un commerce
La quantité proposée est limitée à la quantité disponible ou illimité si le commerce est illimité
This commit is contained in:
@ -259,8 +259,12 @@ export class RdDItem extends Item {
|
||||
return this.system.cout ?? 0
|
||||
}
|
||||
|
||||
isItemCommerce() {
|
||||
return this.parent?.type == 'commerce';
|
||||
}
|
||||
|
||||
calculerPrixCommercant() {
|
||||
if (this.parent?.type == 'commerce') {
|
||||
if (this.isItemCommerce()) {
|
||||
// appliquer le pourcentage
|
||||
return this.parent.calculerPrix(this);
|
||||
}
|
||||
|
Reference in New Issue
Block a user