forked from public/foundryvtt-reve-de-dragon
Les commerces peuvent appliquer un pourcentage
This commit is contained in:
@ -171,7 +171,6 @@ export class RdDItem extends Item {
|
||||
return typesObjetsConnaissance.includes(this.type)
|
||||
}
|
||||
|
||||
|
||||
getItemGroup() {
|
||||
if (this.isInventaire()) return "equipement";
|
||||
if (this.isOeuvre()) return "oeuvre";
|
||||
@ -258,6 +257,14 @@ export class RdDItem extends Item {
|
||||
return this.system.cout ?? 0
|
||||
}
|
||||
|
||||
calculerPrixCommercant() {
|
||||
if (this.parent?.type == 'commerce') {
|
||||
// appliquer le pourcentage
|
||||
return this.parent.calculerPrix(this);
|
||||
}
|
||||
return this.system.cout;
|
||||
}
|
||||
|
||||
prepareDerivedData() {
|
||||
super.prepareDerivedData();
|
||||
if (this.isInventaire()) {
|
||||
|
Reference in New Issue
Block a user